It finds an Eulerian cycle using a
\(O(q)\) algorithm where \(q\) is the number of edges of
the graph.
Usage
find_euler(G, v)
Value
A two-element list: the $walk component is a
\(q\times2\) matrix edgelist, and the $graph component is
the input graph with no edges; it is used in intermediate
steps, when the function calls itself.
Arguments
G
Eulerian and connected graph
v
Any vertex as starting point of the cycle
Disclaimer
This function is part of the subject "Graphs and Network
Optimization". It is designed for teaching purposes only, and
not for production.
It is introduced in the "Connectivity" section.
It is used as a subroutine in the "TSP" section.
Author
Cesar Asensio (2021)
Details
Recursive algorithm for undirected graphs.
The input graph should be Eulerian and connected.