ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Tue, 28 Jan 2014 13:40:19 +0100enumerate subgraphs with edge setshttps://ask.sagemath.org/question/10969/enumerate-subgraphs-with-edge-sets/Hi,
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!Tue, 28 Jan 2014 00:32:09 +0100https://ask.sagemath.org/question/10969/enumerate-subgraphs-with-edge-sets/Answer by Nathann for <p>Hi,</p>
<p>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.</p>
<p>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.</p>
<p>Any help would be greatly appreciated.
Thanks!</p>
https://ask.sagemath.org/question/10969/enumerate-subgraphs-with-edge-sets/?answer=15976#post-id-15976Hello !
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 !
NathannTue, 28 Jan 2014 07:15:59 +0100https://ask.sagemath.org/question/10969/enumerate-subgraphs-with-edge-sets/?answer=15976#post-id-15976Comment by kcrisman for <p>Hello !</p>
<p>When you call <code>G.subgraph_search_iterator(H)</code>, the first vertex of the list is matched with <code>H.vertices()[0]</code>, the second with <code>H.vertices()[1]</code>, etc ... So you know how edges of <code>H</code> are mapped to edges of <code>G</code></p>
<p>1- This should appear in the documentation of <code>subgraph_search_iterator</code> -- if it does not, that should be fixed</p>
<p>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 <code>:-P</code></p>
<p>Have fuuuuuuuuuuuuuuuuuuuuuuuuuuun !</p>
<p>Nathann</p>
https://ask.sagemath.org/question/10969/enumerate-subgraphs-with-edge-sets/?comment=16380#post-id-16380@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 :)Tue, 28 Jan 2014 13:39:16 +0100https://ask.sagemath.org/question/10969/enumerate-subgraphs-with-edge-sets/?comment=16380#post-id-16380Comment by kcrisman for <p>Hello !</p>
<p>When you call <code>G.subgraph_search_iterator(H)</code>, the first vertex of the list is matched with <code>H.vertices()[0]</code>, the second with <code>H.vertices()[1]</code>, etc ... So you know how edges of <code>H</code> are mapped to edges of <code>G</code></p>
<p>1- This should appear in the documentation of <code>subgraph_search_iterator</code> -- if it does not, that should be fixed</p>
<p>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 <code>:-P</code></p>
<p>Have fuuuuuuuuuuuuuuuuuuuuuuuuuuun !</p>
<p>Nathann</p>
https://ask.sagemath.org/question/10969/enumerate-subgraphs-with-edge-sets/?comment=16379#post-id-16379@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.Tue, 28 Jan 2014 13:40:19 +0100https://ask.sagemath.org/question/10969/enumerate-subgraphs-with-edge-sets/?comment=16379#post-id-16379