FindEulerianCycle - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim


GraphTheory

  

IsEulerian

  

test if graph is Eulerian

  

IsSemiEulerian

  

test if graph is semi-Eulerian

  

FindEulerianCycle

  

find Eulerian cycle

  

FindEulerianPath

  

find Eulerian path

 

Calling Sequence

Parameters

Description

Definitions

Eulerian graphs in SpecialGraphs

Examples

Compatibility

Calling Sequence

IsEulerian(G)

IsEulerian(G, T)

IsSemiEulerian(G)

IsSemiEulerian(G, T)

FindEulerianCycle(G)

FindEulerianPath(G)

Parameters

G

-

graph

T

-

(optional) name

Description

• 

IsEulerian(G) returns true if G is an Eulerian graph; that is, if G has an Eulerian cycle. It returns false otherwise.

• 

IsSemiEulerian(G) returns true if G is a semi-Eulerian graph; that is, if G has an Eulerian path. It returns false otherwise.

• 

An optional second argument T is assigned a Trail corresponding to a walk of the specified type if it exists, and FAIL otherwise.

• 

FindEulerianCycle(G) command returns a list corresponding to an Eulerian cycle in G if one exists, and NULL otherwise.

• 

FindEulerianPath(G) command returns a list corresponding to an Eulerian path in G if one exists, and NULL otherwise.

• 

The algorithm used to construct the trail is depth-first-search. The complexity is On+m where n=|V| and m=|E|.

Definitions

• 

An Eulerian cycle is a closed walk in the graph that traverses each edge exactly once. In this context "closed" means the walk must start and finish on the same vertex.

• 

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.

Eulerian graphs in SpecialGraphs

• 

The following are graphs in the SpecialGraphs subpackage which are Eulerian.

Graph

Number of Vertices

Number of Edges

Butterfly graph

5

6

Octahedron graph

6

12

Chvatal graph

12

24

Hoffman graph

16

32

Shrikhande graph

16

48

Robertson graph

19

38

Folkman graph

20

40

Brinkmann graph

21

42

Doyle graph

27

54

Schlaefli graph

27

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

100

1800

Cameron graph

231

3465

Berlekamp-van Lint-Seidel graph

243

2673

McLaughlin graph

275

15400

Suzuki graph

1782

370656

Examples

withGraphTheory:

IsEulerianCompleteGraph4

false

(1)

IsEulerianCompleteGraph5,T

true

(2)

T

Trail1,2,3,1,4,2,5,3,4,5,1

(3)

BGSpecialGraphs:-BookGraph3

BGGraph 1: an undirected graph with 8 vertices and 10 edges

(4)

IsEulerianBG

true

(5)

FindEulerianCycleSpecialGraphs:-BookGraph3

1,2,4,3,1,5,6,2,8,7,1

(6)

PGPathGraph5

PGGraph 2: an undirected graph with 5 vertices and 4 edges

(7)

IsEulerianPG

false

(8)

IsSemiEulerianPG

true

(9)

FindEulerianPathPG

1,2,3,4,5

(10)

Compatibility

• 

The GraphTheory[IsEulerian], GraphTheory[FindEulerianCycle] and GraphTheory[FindEulerianPath] commands were introduced in Maple 2020.

• 

For more information on Maple 2020 changes, see Updates in Maple 2020.

• 

The GraphTheory[IsSemiEulerian] command was introduced in Maple 2025.

• 

For more information on Maple 2025 changes, see Updates in Maple 2025.

See Also

IsHamiltonian

Trail

 


Download Help Document