Eulerian and Hamiltonian Routes

Stage 23 of 23 Strand 3 of 5 3 lessons

3 illustrated lessons, each teaching the why before the how.

Start with Walks, Trails, Paths, Circuits and Cycles in the app →
Revise Eulerian and Hamiltonian Routes with flashcards →

Jump to a lesson

Walks, Trails, Paths, Circuits and Cycles

Five words for five different kinds of route.

A trail repeats no edge, a path repeats no vertex, and a circuit is a trail that closes

Read the full lesson →

ABCDE

A walk is any sequence of edges, each one starting where the last ended. A-B-C-B uses the edge B to C twice.

ABCDE

A trail uses no edge twice. A-B-C-D-E-C passes through C twice, which is allowed.

ABCDE

A path uses no vertex twice: A-B-C-D-E, and no edge can repeat either.

ABCDE

A circuit is a trail that ends where it began: A-B-C-D-E-C-A.

ABCDE

A cycle is a circuit that repeats no vertex except the one at both ends: A-B-C-A.

Now you

ABCDE

In this graph, what is the route A-B-C-D-E-C-A?

ABCDE

In this graph, what is the route A-B-C-D-E?

Eulerian Trails and Circuits

Every edge once, and the degrees decide.

A graph has an Eulerian circuit exactly when it is connected and every degree is even

Read the full lesson →

A2B2C4D2E2

Can one trail use every edge exactly once? Count the degrees first: 2, 2, 4, 2, 2.

ABCDE

Every degree is even, and a trail does use all six edges and return: an Eulerian circuit.

ABC4DE

One edge arrives and one leaves at each visit, so passing through needs an even degree.

A2B2C3D2E1

Drop one edge and C and E have odd degree: exactly two odd vertices are left.

ABCDE

A trail still covers every edge, but it has to start at C and finish at E: an Eulerian trail.

A5B3C3D3

With four odd vertices no trail can cover every edge: the bridges of Königsberg.

Now you

A2B2C3D2E1

Does this graph have an Eulerian circuit?

A2B2C4D2E2

A connected graph has exactly two vertices of odd degree. What follows?

Hamiltonian Paths and Cycles

Every vertex once, and no test to lean on.

A Hamiltonian cycle visits every vertex exactly once and returns to where it started

Read the full lesson →

ABCDE

An Eulerian circuit uses every edge. A Hamiltonian cycle visits every vertex.

ABCDE

This route touches all five vertices once and closes: a Hamiltonian cycle.

ABCDE

Drop the closing edge and it is a Hamiltonian path: every vertex once, without returning to the start.

ABCDE

Here E has one edge, so a cycle through E would use that edge twice: none exists.

ABCDE

There is no degree test for a Hamiltonian cycle, so routes have to be tried one by one.

Now you

ABCDE

What is the marked route A-B-C-D-E-A?

ABCDE

What is the marked route A-B-C-D-E?

Continue your journey in the app — save your progress