GraphTheory
IsEulerian
test if graph is Eulerian
FindEulerianCycle
find Eulerian cycle
FindEulerianPath
find Eulerian path
Calling Sequence
Parameters
Description
Eulerian graphs in SpecialGraphs
Examples
Compatibility
IsEulerian(G)
IsEulerian(G, T)
FindEulerianCycle(G)
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 Eulerian cycle, a closed walk in the graph that traverses each edge exactly once. It returns false otherwise.
An Eulerian path is a walk that traverses each edge exactly once, but whose initial and final vertices are not required to be the same. Every Eulerian cycle is an Eulerian path, but the reverse is not true.
An optional second argument T is assigned a Trail corresponding to an Eulerian cycle of the graph if such a cycle exists, and FAIL otherwise.
The FindEulerianCycle command returns a trail corresponding to an Eulerian cycle if one exists, and NULL otherwise.
The FindEulerianPath command returns a list corresponding to an Eulerian path if one exists, and NULL otherwise.
The algorithm used to construct the trail is depth-first-search. The complexity is O⁡n+m where n=|V| and m=|E|.
The following are graphs in the SpecialGraphs subpackage which are Eulerian.
Graph
Number of Vertices
Number of Edges
Butterfly graph
5
6
Octahedron graph
12
Chvatal graph
24
Hoffman graph
16
32
Shrikhande graph
48
Robertson graph
19
38
Folkman graph
20
40
Brinkmann graph
21
42
Doyle graph
27
54
Schlaefli graph
216
Harborth graph
52
104
Gewirtz graph
56
280
Perkel graph
57
171
Mirzakhani graph
63
183
Meredith graph
70
140
M22 graph
77
616
Brouwer-Haemers graph
81
810
Higman-Sims graph
100
1100
Hall-Janko graph
1800
Cameron graph
231
3465
Berlekamp-van Lint-Seidel graph
243
2673
McLaughlin graph
275
15400
Suzuki graph
1782
370656
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[FindEulerianCycle] and GraphTheory[FindEulerianPath] commands were introduced in Maple 2020.
For more information on Maple 2020 changes, see Updates in Maple 2020.
See Also
IsHamiltonian
Trail
Download Help Document