1.5.9 Graph Isomorphism

Problem Input | Problem Output

INPUT                    OUTPUT


Input Description: Two graphs, g and h.} Problem: Find a (all) mappings f of the vertices of g to the vertices of h such that g and h are identical, ie. (x,y) is an edge of g iff (f(x),f(y)) is an edge of h.

Excerpt from The Algorithm Design Manual: Isomorphism is the problem of testing whether two graphs are really the same. Suppose we are given a collection of graphs and must perform some operation on each of them. If we can identify which of the graphs are duplicates, they can be discarded so as to avoid redundant work.

We need some terminology to settle what is meant when we say two graphs are the same. Two labeled graphs G=(V_g,E_g) and H=(V_h,E_h) are identical when (x,y) \in Eg iff (x,y) \in E_h. The isomorphism problem consists of finding a mapping from the vertices of G to H such that they are identical. Such a mapping is called an isomorphism.

Identifying symmetries is another important application of graph isomorphism. A mapping of a graph to itself is called an automorphism, and the collection of automorphisms (its automorphism group) provides a great deal of information about symmetries in the graph. For example, the complete graph K_n has n! automorphisms (any mapping will do), while an arbitrary random graph is likely to have few or perhaps only one, since G is always identical to itself.


Implementations

  • NAUTY -- Graph Isomorphism (C) (rating 10)
  • GMT - Graph Matching Toolkit (Binary) (rating 9)
  • Combinatorica (Mathematica) (rating 3)

    Related Problems

  • Generating Graphs
  • Shape Similarity
  • Shortest Path
  • String Matching


    Previous Problem Next Problem

    View the graph for this file

    Bulletin Board
    About ``The Algorithm Design Manual''.
    Send us Mail
    The Stony Brook Algorithm Repository -- go to front page

    This page last modified on Wed Mar 07, 2001 .