Eulerian and Hamiltonian Graphs | Applications and Interpretation IB Maths notes

Free preview: Eulerian and Hamiltonian Graphs

Eulerian Graphs: Every Edge Exactly Once

Applications and interpretation: HL only (AHL 3.16)

Let's start with an old puzzle: can you draw a shape without lifting your pen and without going over any line twice? You can spend ages trying. Graph theory answers it in one line, using degrees (from the previous note).

The new words

  • A graph is traversable if you can travel along every edge exactly once in one continuous trail.
  • An Eulerian graph has a closed trail (finishing where it started) that uses every edge exactly once. That trail is an Eulerian circuit.
  • A semi-Eulerian graph has a trail using every edge exactly once, but it must start and finish at different vertices.

Why degrees decide it

  • Think about a vertex in the middle of your pen trail. Each time you arrive there along one edge, you leave along another.
  • So every visit uses up two edge ends at that vertex: one in, one out.
  • If you only ever pass through a vertex, its degree must be a multiple of 2: even.
  • The start is different: you leave it once at the beginning without arriving. The finish: you arrive once at the end without leaving.
  • If start and finish are the same vertex, those two single ends pair up, so it is even too.

&connected, every vertex even⟹Eulerian&connected, exactly two odd vertices⟹semi-Eulerian (start at one odd, finish at the other)

💡 In plain words

  • Every time the trail passes through a vertex, it uses two edge ends there: one in, one out. So a vertex you only pass through must be even.
  • Only the start and finish can be odd. If they are the same vertex, it is even too.
  • More than two odd vertices: no single trail can use every edge once.

Three graphs. Left: two triangles sharing vertex C, degrees 2, 2, 4, 2, 2, labelled Eulerian. Middle: a square PQRS with a roof vertex T joined to P and Q; P and Q have degree 3; labelled semi-Eulerian. Right: a pentagon VWXYZ with an extra edge VX; the pentagon is highlighted green as a Hamiltonian cycle

Following the diagram

  • Left: all degrees are even. An Eulerian circuit is A–B–C–D–E–C–A, which uses all 6 edges and returns to A.
  • Middle: P and Q are odd (degree 3), the rest are even. A trail must start at P and end at Q (or the reverse): P–T–Q–P–S–R–Q.
  • Right: V and X have degree 3, so this graph is not Eulerian. But the green cycle V–W–X–Y–Z–V visits every vertex once: it is Hamiltonian (page 3).

The recipe: Eulerian, semi-Eulerian or neither?

  1. Check the graph is connected. Why: even degrees are no help if the edges are in two separate pieces.
  2. Find every degree and count the odd vertices. Why: the number of odd vertices is always 0, 2, 4, ... (handshaking lemma).
  3. 0 odd: Eulerian. 2 odd: semi-Eulerian. 4 or more: neither.
  4. Write down an actual route and count its edges. Why: the question usually asks you to show it.

✏️ YOUR TURN 1

Try this first:

Each graph is connected, with the degree sequence shown. Say whether it is Eulerian, semi-Eulerian or neither.

  1. 2, 4, 2, 4, 2, 2
  2. 3, 3, 2, 2
  3. 1, 3, 2, 3, 3

Answer:

  1. All even: Eulerian.
  2. Exactly two odd (the 3s): semi-Eulerian, starting at one degree 3 vertex and finishing at the other.
  3. Four odd vertices (1, 3, 3, 3): neither.

Finding the Route

Knowing a route exists is half the job. Now let's actually find one, without getting stuck.

The recipe for writing an Eulerian trail

  1. Choose the start. All even: anywhere. Two odd: one of the odd vertices. Why: from the degree argument, an odd vertex must be the start or finish.
  2. Walk along any unused edge and cross it off. Why: each edge must be used exactly once.
  3. Avoid using an edge that would cut you off from the edges you haven't used yet, unless there is no other choice. Why: once you cross a "bridge" you can't come back.
  4. Stop when every edge is crossed off. Count the edges in your route to check.

👀 Watch me do it: an Eulerian circuit of K5 (vertices A to E)

Unlock the full note: start 7 days free.

Log in or subscribe to read the rest of this note. Members also get the AI tutor, practice quizzes, mock exams and flashcards for this topic.

Log in · Subscribe · Start free trial

All notes in HL: Graphs and networks (AHL 3.14–3.16)

  1. The Language of Graphs: Degrees, Paths, Trees and Special Graphs
  2. Eulerian and Hamiltonian Graphs
  3. Adjacency Matrices, Counting Walks and Transition Matrices
  4. Kruskal's and Prim's Algorithms on a Network
  5. Prim's Algorithm on a Distance Matrix and Spanning Tree Problems
  6. Route Inspection: Eulerian Routes and Two Odd Vertices
  7. Route Inspection with Four Odd Vertices and Different Start and Finish Points
  8. The Travelling Salesperson Problem: Least Distances and Nearest Neighbour Upper Bounds
  9. Lower Bounds for the Travelling Salesperson Problem: The Deleted Vertex Method

What's inside for this topic

9 teacher notes, 65 practice questions, 40 flashcards, 2 quizzes.

Get the full notes, every practice question, flashcards, quizzes and mock papers.

Start your free 7-day trial

Questions? Chat with us on WhatsApp · Try one live lesson

Previous note: The Language of Graphs: Degrees, Paths, Trees and Special Graphs Next note: Adjacency Matrices, Counting Walks and Transition Matrices

All Applications and Interpretation IB Maths topics · IB Maths