Problem Solving

Hamiltonian Path

Students trace a route across a map of small towns.

Hamiltonian Path definition

A Hamiltonian path visits every vertex of a graph exactly once.

In Spanish
camino hamiltoniano
Topic
Graph theory

Hamiltonian Path in a picture

Hamiltonian Path diagramA → B → C → D visits every vertex once while leaving edge DA unused.ABCD
A → B → C → D visits every vertex once while leaving edge DA unused.

How it works

The sequence follows edges between consecutive vertices. A graph can have a Hamiltonian path even though some edges are unused. The key requirement is to visit every vertex once. In a directed graph, each step also follows the direction of its edge.

Worked examples

Give a Hamiltonian path in the triangle with edges AB, BC, and CA.

A → B → C.

Is A → B → A → C a Hamiltonian path in that triangle?

No, because it repeats A.

Can a three-leaf star have a Hamiltonian path?

No. Visiting all three leaves would require repeating the center.

Common mistake

Track the vertices. An Eulerian trail asks whether each edge was used exactly once.

Quick check

Does a Hamiltonian path have to use every edge?

Show answer

No.

How many edges are in a Hamiltonian path on five vertices?

Show answer

Four.

Can two vertices in separate components occur in one Hamiltonian path?

Show answer

No.

Sources

Flashcard

Hamiltonian Path

Reveal the definition

A Hamiltonian path visits every vertex of a graph exactly once.

Effortless Math. “Hamiltonian Path.” Math Dictionary.