Ask Your Question

enumerate subgraphs with edge sets

asked 2014-01-27 17:32:09 -0500

nkothari gravatar image


I have been using Sage for the past few months now, and I use the subgraph_search_iterator() heavily. So far, I did not care for the edge set of the subgraph found. But now that I do, it seems that the subgraph_search_iterator() returns only the vertex sets of the corresponding subgraphs.

In particular, I am looking for subdivisions of K3,3 in an input graph. But I want the additional constraint that two fixed vertices (say, u and v) must be branch vertices of the subgraph found - by branch vertices I mean vertices of degree exactly 3 in the subgraph.

Any help would be greatly appreciated. Thanks!

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2014-01-28 00:15:59 -0500

Nathann gravatar image

updated 2014-01-28 00:16:08 -0500

Hello !

When you call G.subgraph_search_iterator(H), the first vertex of the list is matched with H.vertices()[0], the second with H.vertices()[1], etc ... So you know how edges of H are mapped to edges of G

1- This should appear in the documentation of subgraph_search_iterator -- if it does not, that should be fixed

2- It would be better to ask questions on our sage-devel or sage-support google group. If you were to answer my comment I would have no way to know, while Google groups sends us emails in that case. That's way easier :-P

Have fuuuuuuuuuuuuuuuuuuuuuuuuuuun !


edit flag offensive delete link more



@Nathann - I was almost worried your body had been snatched when you spelled "Hello" with only one "o"! Luckily you snatched it back by the end of your answer :)

kcrisman gravatar imagekcrisman ( 2014-01-28 06:39:16 -0500 )edit

@nkothari - regarding point 2, actually it is fine to ask questions here. But one does have to know that there aren't automatic email updates when comments are posted on this site.

kcrisman gravatar imagekcrisman ( 2014-01-28 06:40:19 -0500 )edit

Your Answer

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

Add Answer

Question Tools


Asked: 2014-01-27 17:32:09 -0500

Seen: 72 times

Last updated: Jan 28 '14