The planarity algorithm and Hamiltonian cyclesEdexcel A-Level Further Maths: Revision notes
Section 1
Hamiltonian cycles
A Hamiltonian cycle is a cycle that passes through every vertex once and only once and returns to its start vertex. A graph with vertices needs a Hamiltonian cycle of exactly edges. Do not confuse it with an Eulerian cycle:
- Eulerian: uses every edge exactly once (vertices may be repeated).
- Hamiltonian: visits every vertex exactly once (some edges are left unused). A graph can be Eulerian, Hamiltonian, both or neither. A tree has no cycles at all, so it cannot have a Hamiltonian cycle. A graph with vertices and fewer than edges cannot have one.
Writing a route that visits every vertex but does not return to the start. That is a Hamiltonian path, not a cycle.
To find a Hamiltonian cycle, write down the vertices of degree 2 first: both of their edges must be in the cycle.
Section 2
Planar graphs and the idea of the algorithm
A graph is planar if it can be drawn with no edges crossing. Deciding by trial and error can fail, so the planarity algorithm gives a systematic test for a graph that has a Hamiltonian cycle. Idea: draw the Hamiltonian cycle as a closed loop. Every other edge (a chord) joins two points on the loop, so it can be drawn either inside the loop or outside it. The graph is planar exactly when the chords can be shared between inside and outside with no crossings on either side.
Section 3
The planarity algorithm step by step
- Find a Hamiltonian cycle and draw it as a polygon.
- List the edges not in the cycle (the chords).
- Two chords conflict if their end points alternate around the cycle, so each chord separates the other's ends. Chords that share a vertex never conflict.
- Put one chord inside. Any chord that conflicts with it must go outside. Continue placing chords so that conflicting chords are always on opposite sides.
- If every chord can be placed, the graph is planar. If some chord conflicts with chords on both sides, the graph is non-planar. To test for a conflict between chord and chord , check whether and lie on different arcs of the cycle between and .
Treating chords that share a vertex as conflicting. They can always be drawn on the same side.
Make a short list of conflicting pairs before you place anything. Placing then becomes a matter of choosing inside or outside.
Section 4
Worked example: a planar graph
Graph with Hamiltonian cycle and extra edges , , , . Conflicts: with (as is on one side of and on the other) and with . No others. Place inside, so outside. Place inside, so outside. Inside, and share vertex . Outside, and share vertex . No crossings, so the graph is planar.
Section 5
Worked example: a non-planar graph,
Cycle , chords , , , , . Put inside. and conflict with , so both go outside. conflicts with , so it goes inside. Now conflicts with (inside) and (outside), so it has no valid side. Hence is not planar. You may choose any valid starting chord. The final verdict is the same. The six-vertex graph made from a hexagon with its three long diagonals is also non-planar by the same method: all three diagonals conflict with each other, and three mutually conflicting chords cannot be shared between two sides.
In the exam, state each conflict with a reason, then the placement, then the conclusion. A bare diagram earns no marks for the reasoning.
That's the notes covered.
Carry on to the next subtopic.
Exam questions on The planarity algorithm and Hamiltonian cycles
- A graph has six vertices , , , , and . Its edges are , , , , , , and .The edge is added to the graph. Use the planarity algorithm to explain whether the new graph is planar.2 marks
- A connected graph has six vertices and exactly five edges.Explain why this graph does not have a Hamiltonian cycle.2 marks
- Graph has vertices , , , , , and edges , , , , , , , , and . It contains the Hamiltonian cycle . In the planarity algorithm, two edges that are not in the cycle conflict if they cannot both be drawn on the same side of the cycle without crossing.List the edges of that are not in the cycle, and state which pairs of them conflict.3 marks
Written by the Exaim team, led by Shaun Daswani (Head of Upper Secondary, Improve ME Institute; MSc Financial Mathematics, Imperial College London; BSc, UCL) and Jason Daswani (operational lead, Improve ME Institute; LSE).