org.jgrapht.experimental.isomorphism
Interface GraphIsomorphismInspector<E>

All Superinterfaces:
Iterator<E>

public interface GraphIsomorphismInspector<E>
extends Iterator<E>

Isomorphism Overview

Isomorphism is the problem of testing whether two graphs are topologically 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.

In Formal Math: Input description: Two graphs, G and H. Problem description: Find a (or all) mappings f of the vertices of G to the vertices of H such that G and H are identical; i.e. (x,y) is an edge of G iff (f(x),f(y)) is an edge of H. http://www2.toki.or.id/book/AlgDesignManual/BOOK/BOOK4/NODE180.HTM.

Efficiency: The general algorithm is not polynomial, however polynomial algorithms are known for special cases, like acyclic graphs, planar graphs etc. There are several heuristic algorithms which gives quite good results (polynomial) in general graphs, for most but not all cases.

Usage:

  1. Choose comparators for the vertexes and edges. You may use the default comparator by sending null parameters for them to the constructor. Example: Assume Your graphs are of human relations. Each vertex is either a man or a woman and also has the person name. You may decide that isomorphism is checked according to gender, but not according to the specific name. So you will create a comparator that distinguishes vertexes only according to gender.
  2. Use the isIsomorphic() method as a boolean test for isomorphism
  3. Use the Iterator interface to iterate through all the possible isomorphism ordering.

Since:
Jul 15, 2005
Author:
Assaf Lehr

Method Summary
 boolean isIsomorphic()
           
 
Methods inherited from interface java.util.Iterator
hasNext, next, remove
 

Method Detail

isIsomorphic

boolean isIsomorphic()
Returns:
true iff the two graphs are isomorphic


Copyright © 2013. All rights reserved.