Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Graph Isomorphism

Is there an algorithm or heuristics for graph isomorphism?

Corollary: A graph can be represented in different different drawings.

What s the best approach to find different drawing of a graph?

like image 355
DarthVader Avatar asked Nov 08 '09 02:11

DarthVader


2 Answers

It is a hell of a problem.

In general, the basic idea is to simplify the graph into a canonical form, and then perform comparison of canonical forms. Spanning trees are generated with this objective, but spanning trees are not unique, so you need to have a canonical way to create them.

After you have canonical forms, you can perform isomorphism comparison (relatively) easy, but that's just the start, since non-isomorphic graphs can have the same spanning tree. (e.g. think about a spanning tree T and a single addition of an edge to it to create T'. These two graphs are not isomorph, but they have the same spanning tree).

Other techniques involve comparing descriptors (e.g. number of nodes, number of edges), which can produce false positive in general.

I suggest you to start with the wiki page about the graph isomorphism problem. I also have a book to suggest: "Graph Theory and its applications". It's a tome, but worth every page.

As from you corollary, every possible spatial distribution of a given graph's vertexes is an isomorph. So two isomorph graphs have the same topology and they are, in the end, the same graph, from the topological point of view. Another matter is, for example, to find those isomorph structures enjoying particular properties (e.g. with non crossing edges, if exists), and that depends on the properties you want.

like image 162
Stefano Borini Avatar answered Oct 30 '22 08:10

Stefano Borini


One of the best algorithms out there for finding graph isomorphisms is VF2.

I've written a high-level overview of VF2 as applied to chemistry - where it is used extensively. The post touches on the differences between VF2 and Ullmann. There is also a from-scratch implementation of VF2 written in Java that might be helpful.

like image 30
Rich Apodaca Avatar answered Oct 30 '22 07:10

Rich Apodaca