All revision notes topics

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 nn vertices needs a Hamiltonian cycle of exactly nn 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 nn vertices and fewer than nn edges cannot have one.
Key termsHamiltonian cycle
Common mistake

Writing a route that visits every vertex but does not return to the start. That is a Hamiltonian path, not a cycle.

Exam tip

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.

Key termsplanarity algorithmchord

Section 3

The planarity algorithm step by step

  1. Find a Hamiltonian cycle and draw it as a polygon.
  2. List the edges not in the cycle (the chords).
  3. 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.
  4. 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.
  5. 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 XYXY and chord UVUV, check whether UU and VV lie on different arcs of the cycle between XX and YY.
Key termsconflict
Common mistake

Treating chords that share a vertex as conflicting. They can always be drawn on the same side.

Exam tip

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 1−2−3−4−5−6−11-2-3-4-5-6-1 and extra edges 1313, 2424, 1515, 4646. Conflicts: 1313 with 2424 (as 22 is on one side of 1313 and 44 on the other) and 1515 with 4646. No others. Place 1313 inside, so 2424 outside. Place 1515 inside, so 4646 outside. Inside, 1313 and 1515 share vertex 11. Outside, 2424 and 4646 share vertex 44. No crossings, so the graph is planar.

Section 5

Worked example: a non-planar graph, K5K_5

Cycle A−B−C−D−E−AA-B-C-D-E-A, chords ACAC, ADAD, BDBD, BEBE, CECE. Put ACAC inside. BDBD and BEBE conflict with ACAC, so both go outside. CECE conflicts with BDBD, so it goes inside. Now ADAD conflicts with CECE (inside) and BEBE (outside), so it has no valid side. Hence K5K_5 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.

Exam tip

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

  1. A graph has six vertices AA, BB, CC, DD, EE and FF. Its edges are ABAB, BCBC, CDCD, DEDE, EFEF, FAFA, ADAD and BEBE.
    The edge CFCF is added to the graph. Use the planarity algorithm to explain whether the new graph is planar.2 marks
  2. A connected graph has six vertices and exactly five edges.
    Explain why this graph does not have a Hamiltonian cycle.2 marks
  3. Graph HH has vertices 11, 22, 33, 44, 55, 66 and edges 1212, 2323, 3434, 4545, 5656, 6161, 1313, 2424, 1515 and 4646. It contains the Hamiltonian cycle 1−2−3−4−5−6−11-2-3-4-5-6-1. 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 HH that are not in the cycle, and state which pairs of them conflict.3 marks
See the full worksheet

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).