GraphTheory
IsEulerian
test if graph is Eulerian
FindEulerianPath
find Eulerian path
Calling Sequence
Parameters
Description
Examples
Compatibility
IsEulerian(G)
IsEulerian(G, T)
FindEulerianPath(G)
G
-
graph
T
(optional) name
The IsEulerian command returns true if the input graph is an Eulerian graph, i.e there exists a closed walk in the graph that uses each edge exactly once. It returns false otherwise.
An optional second argument T is assigned an Eulerian Trail of the graph if such a trail exists, and FAIL otherwise.
The FindEulerianPath command returns a list corresponding to an Eulerian trail if one exists, and NULL otherwise.
The algorithm used to construct the Eulerian trail is depth-first-search. The complexity is O⁡n+m where n=|V| and m=|E|.
with⁡GraphTheory:
IsEulerian⁡CompleteGraph⁡4
false
IsEulerian⁡CompleteGraph⁡5,T
true
Trail⁡1,2,3,1,4,2,5,3,4,5,1
FindEulerianPath⁡SpecialGraphs:-BookGraph⁡3
1,2,4,3,1,5,6,2,8,7,1
The GraphTheory[FindEulerianPath] command was introduced in Maple 2020.
For more information on Maple 2020 changes, see Updates in Maple 2020.
See Also
IsHamiltonian
Trail
Download Help Document
What kind of issue would you like to report? (Optional)