igraph-help
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [igraph] Maximum Common Subgraph


From: Tamas Nepusz
Subject: Re: [igraph] Maximum Common Subgraph
Date: Fri, 11 Mar 2011 12:04:52 +0100
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.14) Gecko/20110223 Lightning/1.0b2 Thunderbird/3.1.8

Hi Mark,

I've just realized that the "labeled subisomorphism" you are looking for has been added in igraph 0.6 a while ago, and it supports both vertex and edge labels. Try compiling and installing the latest nightly snapshot of igraph from http://code.google.com/p/igraph.

--
T.

On 03/11/2011 11:56 AM, Mark Galea wrote:
Hi Tamas, 

The problem I am facing with that approach is that the subgraph isomorphism is just considering the structure of the graph and thus is not restricting the sub-isomorphism to just labels which match.  

Given Graph 1:
A - B
B - C

Graph 2: 
D - E

The sub graph isomorphism returns something like this ( I will be using : to imply maps to) 
A:D, B: E
B:D, A: E
B:D, C: E
C:D, B: E

In this case there is no common subgraph and the result should have been {}

Regards, 

Mark





On Fri, Mar 11, 2011 at 10:50 AM, Tamas Nepusz <address@hidden> wrote:

> I think, it is quite easy to write a code to select the edges, that are
> including in both graphs.
Assuming that the vertices are in the same order in both graphs (i.e.
vertex C has the same index in both graphs). Otherwise it is equivalent
to the subgraph isomorphism problem; one possible way to solve it would
be to re-arrange the vertices in both graphs such that vertices with the
same name also have the same ID, and then run the subgraph isomorphism
search.

--
Tamas


_______________________________________________
igraph-help mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/igraph-help


reply via email to

[Prev in Thread] Current Thread [Next in Thread]