ASKSAGE: Sage Q&A Forum - Latest question feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Tue, 27 Aug 2019 07:44:34 -0500Stopiteration Raisedhttps://ask.sagemath.org/question/47619/stopiteration-raised/I am using gray codes to generate a set of of combinations and testing each combination for certain qualities. I have never had the code fail for any reason before this run. I kind of no idea why this would occur. There should be many more test cases. Has anyone seen G.eulerian_circuit() fail with a StopIteration before? I can post more code if needed.
Find all length 13 sets from 36 edges
Processing | | 4329384/2310789600
Traceback (most recent call last):
File "fold.sage.py", line 334, in <module>
planar, G = gray(flatten, all_vertex_pairs)
File "fold.sage.py", line 70, in gray
flag, planar, G = test_edges(all_vertex_pairs, s, flatten)
File "fold.sage.py", line 243, in test_edges
if G.eulerian_circuit() is False:
File "/opt/sagemath-8.6/local/lib/python2.7/site-packages/sage/graphs/generic_graph.py", line 3935, in eulerian_circuit
next_edge = next(g_edge_iter(v))
StopIterationmqpsfTue, 27 Aug 2019 07:44:34 -0500https://ask.sagemath.org/question/47619/Hierholzer's algorithmhttps://ask.sagemath.org/question/26643/hierholzers-algorithm/ Hi, I have a question, I need to implement Hierholzer's algorithm but I don't know how to start it.
The conditions are:
We started with a vertex v of the graph and either we build a ride (one way) with new edges (not previously used) until we reach a vertex in which no edges remain unused. That vertex v must necessarily, because this ride to reach any other vertex (for the first time or several times), will have used an odd number of edges that come together in him (and, by hypothesis, each vertex has degree par - called degree of a vertex the number of edges that meet in him--). So we have obtained a closed $ C $ promenade that no repeated edges. But perhaps C does not contain all edges of G.
If there are edges go, consider the graph G 'that formed from G by removing the edges Ride C (and possible vertices that have been cut). Note that G 'is still satisfy the parity condition grades. Some of the edges of this new graph must have in common a vertex, say w, with the ride C (because G is connected). Now we take w as a new origin with the previous argument, form a closed C ride 'in G' that no repeated edges, and which is attached to C (at least) by w. Redefining now C "inserting" C "in the first vertex have in common.
And we repeat the procedure: either we have included all the edges, or locate an edge with a vertex in common with this new C.
The process ends when you have used all the edges.rocrosnajarSat, 25 Apr 2015 13:05:58 -0500https://ask.sagemath.org/question/26643/Eulerian Cycle of a Digraphhttps://ask.sagemath.org/question/7844/eulerian-cycle-of-a-digraph/Hello,
Is there a function to do an Eulerian cycle of a digraph? eulerian_cycle works on undirected graphs, but not on digraphs. Basically I'm looking for an equivalent to Mathematica's EulerianCycle. Does this exist?
Thanks in advance.Eviatar BachThu, 06 Jan 2011 13:43:08 -0600https://ask.sagemath.org/question/7844/