[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [igraph] Checking whether graph g1 is a subgraph of graph g2
From: |
Tamás Nepusz |
Subject: |
Re: [igraph] Checking whether graph g1 is a subgraph of graph g2 |
Date: |
Fri, 22 Feb 2013 10:23:51 +0100 |
Hi,
Seems like this is the same question as the one asked recently on Stack
Overflow; see my answer there:
http://stackoverflow.com/a/15008720/156771
The bottom line is to use the VF2 subisomorphism algorithm in igraph, which
handles node and edge colors. You just have to convert your node labels into
unique integers because the VF2 algorithm expects integers as colors.
--
T.
On 22 Feb 2013, at 02:52, Kamran Soomro <address@hidden> wrote:
> Hi,
>
> I am new to igraph and would love any help you guys can give me. I want to
> check whether a particular graph g1 is a subgraph of another graph g2. Please
> note that this is not a subgraph polymorphism problem. I do not want to know
> if g1 is a polymorphic subgraph of g2. I want the result to be true if and
> only if the vertex and edge labels of g1 also match with a subgraph in g2.
> How do I achieve this with igraph? Thanks!
>
> –Kamran
>
>
>
> _______________________________________________
> igraph-help mailing list
> address@hidden
> https://lists.nongnu.org/mailman/listinfo/igraph-help