R icon indicating copy to clipboard operation
R copied to clipboard

Vf2 graph isomorphism

Open ArpitaHanjagi opened this issue 2 months ago • 1 comments

Determines whether two graphs are isomorphic (structurally identical).

Uses the VF2 algorithm, which is a backtracking approach with feasibility checks.

Checks both node compatibility and edge compatibility for already-mapped nodes.

Returns TRUE/FALSE indicating isomorphism, and a valid node mapping if they are isomorphic.

Input: Two graphs represented as adjacency lists.

Output: Boolean for isomorphism and mapping vector.

Time Complexity: Exponential in worst case, but efficient pruning reduces search space.

Space Complexity: O(n) for mapping and used arrays, where n is the number of nodes.

ArpitaHanjagi avatar Oct 20 '25 19:10 ArpitaHanjagi