Problem Solving

Hamiltonian Cycle

A student traces a closed route around marked towns.

Hamiltonian Cycle definition

A Hamiltonian cycle visits every vertex exactly once and returns to its starting vertex.

In Spanish
ciclo hamiltoniano
Topic
Graph theory

Hamiltonian Cycle in a picture

Hamiltonian Cycle diagramThe perimeter of a four-vertex square visits every vertex and returns to A.ABCD
The perimeter of a four-vertex square visits every vertex and returns to A.

How it works

Only the starting vertex repeats at the end of the route. Each step needs an edge. The cycle can leave other edges unused. Removing one edge from the cycle gives a Hamiltonian path, so a graph with a Hamiltonian cycle also has a Hamiltonian path.

Worked examples

Give a Hamiltonian cycle in a square with edges AB, BC, CD, and DA.

A → B → C → D → A.

Can a tree with at least two vertices have one?

No. A tree has no cycles.

Can a graph with a vertex of degree one have a Hamiltonian cycle?

No. A vertex on a cycle needs two incident edges.

Common mistake

The closing edge must exist. A route that visits every vertex once but cannot close is a Hamiltonian path only.

Quick check

How many vertices does the cycle visit?

Show answer

All of them.

How many edges are in a Hamiltonian cycle on six vertices?

Show answer

Six.

What can you get by removing one cycle edge?

Show answer

A Hamiltonian path.

Sources

Flashcard

Hamiltonian Cycle

Reveal the definition

A Hamiltonian cycle visits every vertex exactly once and returns to its starting vertex.

Effortless Math. “Hamiltonian Cycle.” Math Dictionary.