Ask Your Question
1

Enumerate isomrphic subgraphs of graph vertex labeled

asked 2010-09-15 02:17:45 +0100

sriram gravatar image

updated 2011-04-28 16:25:38 +0100

Kelvin Li gravatar image

Enumerate all isomorphic subgraphs of given graph given the subgraph adjacency matrix

edit retag flag offensive close merge delete

Comments

1

Can you post your code (up until the computation you want to perform)?

ccanonc gravatar imageccanonc ( 2010-09-17 17:28:52 +0100 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2011-06-03 06:59:46 +0100

staffan gravatar image

All graphs in Sage support iteration over its major subcomponents, at least vertices and to create a graph from its adjacency matrix

mg= Graph(adj) mg.is_isomorphic(mg) -> True

# graph from adjency matrix
adj= Matrix ([ [0, 1, 1], [1, 0, 1], [1, 1, 0] ])
mg= Graph(adj)
mg.is_isomorphic(mg) -> True

If are you looking for the isomorphic subgraphs of the one you specify with the adj. graph you can usemg.subgraph_search_iterator().

too see how it might be used here. If you post the source as suggested above we could get a more detailed answer.

Here is a simple example of looking for the simplest graph, with zero vertices:

eg = Graph()
[p for p in mg.subgraph_search_iterator(eg)]
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2010-09-15 02:17:45 +0100

Seen: 749 times

Last updated: Jun 03 '11