Boost logo

Boost Users :

Subject: Re: [Boost-users] Incorrect result from mcgregor_common_subgraphs. Where can I find more example of this MCS solver?
From: Jeremiah Willcock (jewillco_at_[hidden])
Date: 2013-07-08 14:32:38


On Mon, 8 Jul 2013, dante0125 wrote:

> Hi, I am a beginner with BGL. Currently I am using mcgregor_common_subgraphs
> solver to find all the common subgraphs between two graphs. The following
> link is the only one example showing how to use the library that I can find
> from the Internet.
> http://svn.kulitorum.com/RepSnapper/Libraries/Boost1.40/libs/graph/example/mcgregor_subgraphs_example.cpp
>
> My first question is where can I find more example of this MCS solver?

One place is libs/graph/test/mcgregor_subgraphs_test.cpp in the Boost
source tree.

> My second question is why some times it can not find maximum common
> subgraph. By maximum I mean a common subgraph with largest number of
> vertices which is implemented in the code.
> Here I provide an example. This code is modified from
> mcgregor_subgraphs_example, I change the graph to undirected graph and add
> some vetices and edges. It is obvious that the correct answer should be of
> size 9. The answer return by the code missing edge 8-5 and 8-3.

Have you tried using mcgregor_common_subgraphs_maximum or
mcgregor_common_subgraphs_maximum_unique? The algorithm only returns a
mapping between vertices, so I'm not sure what you mean by the result
missing edges.

-- Jeremiah Willcock


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net