Chinese Postman Problem (DP IB Applications & Interpretation (AI)): Revision Note

Naomi C

Written by: Naomi C

Reviewed by: Dan Finlay

Updated on

Eulerian trails & circuits

What are Eulerian trails and circuits?

  • An Eulerian trail is a trail that visits each edge in a graph exactly once

  • An Eulerian circuit is a trail that visits each edge in a graph exactly once and begins and ends at the same vertex

  • A graph which contains an Eulerian circuit is called an Eulerian graph

    • In an Eulerian graph the degree of each vertex is even

  • A semi-Eulerian graph contains an Eulerian trail but not an Eulerian circuit

    • In a semi-Eulerian graph exactly one pair of vertices have an odd degree

      • These are the start and finish points of any Eulerian trail

Examiner Tips and Tricks

If you can draw a graph without taking your pen off the paper and without going over any edge more than once, then you have an Eulerian or semi-Eulerian graph!

Worked Example

Let G be the graph shown below.

3-10-4-ib-ai-hl-chinese-postman-problem-we-1

a) Show that G is a semi-Eulerian graph.

3-10-4-ib-ai-hl-chinese-postman-problem-we-1a-solution

b) Write down an Eulerian trail for G.

3-10-4-ib-ai-hl-chinese-postman-problem-we-1b-solution

Chinese postman problem

What is the Chinese postman problem?

  • The Chinese postman problem requires you to find the route of least weight such that

    • it starts and finishes at the same vertex

    • and it traverses every edge in the graph at least once

  • Some edges may need to be traversed twice and the challenge is to minimise the total weight of these repeated edges

How do I solve the Chinese postman problem?

  • Inspect the degree of all the vertices and identify any odd vertices

If all the vertices in the graph are even

  • Any Eulerian circuit solves the problem

  • The length of the shortest route is the sum of the weights of the edges in the graph

If there is one pair of odd vertices in the graph

  • Find the shortest route between the two odd vertices

  • Add repeats of the edges in this route to the graph

  • Any Eulerian circuit using including these edges solves the problem

  • The length of the shortest route is the sum of

    • the weights of the edges in the graph

    • and the weights of the repeated edges

If there are two pairs of odd vertices in the graph

  • Suppose the odd vertices are A, B, C and D

  • Find the shortest route between each pair of these vertices

  • Identify which combination has the smallest total weight

    • AB and CD

    • AC and BD

    • AD and BC

  • Add repeats of the edges in the routes in this combination to the graph

  • Any Eulerian circuit using including these edges solves the problem

  • The length of the shortest route is the sum of

    • the weights of the edges in the graph

    • and the weights of the repeated edges

Examiner Tips and Tricks

The maximum number of odd vertices that could appear in an exam question is 4.

What if I can start and end on different vertices?

  • There is a variation of the problem which allows the postman to start and end on different vertices

    • The solution is no different if all the vertices are even

If there is one pair of odd vertices in the graph

  • Start on one odd vertex and end on the other

  • The length of the route is equal to the weight of the graph

If there are two pairs of odd vertices in the graph

  • Suppose the odd vertices are A, B, C and D

  • Find the shortest route between each pair of these vertices

    • Choose the pair that has the smallest route and repeat those edges on the graph

  • Start and end on the other two odd vertices

  • The length of the route is equal to the weight of the graph plus the length of the repeated route

Examiner Tips and Tricks

Look carefully for the shortest route between two vertices exam questions often have graphs where a combination of edges will turn out to be a shorter distance than a more direct route

Worked Example

The graph G shown below displays the distances, in kilometres, of the main roads between towns A, B, C, D and E. Each road is to be inspected for potholes.

3-10-4-ib-ai-hl-chinese-postman-problem-we-2

a) Explain why G does not contain an Eulerian circuit.

3-10-4-ib-ai-hl-chinese-postman-problem-we-2a-solution

b) Find the shortest route that starts and finishes at town A and allows for each road to be inspected.

3-10-4-ib-ai-hl-chinese-postman-problem-we-2b-solution

c) State the total length of the shortest route.

3-10-4-ib-ai-hl-chinese-postman-problem-we-2c-solution

Unlock more, it's free!

Join the 100,000+ Students that ❤️ Save My Exams

the (exam) results speak for themselves:

Naomi C

Author: Naomi C

Expertise: Maths Content Creator

Naomi graduated from Durham University in 2007 with a Masters degree in Civil Engineering. She has taught Mathematics in the UK, Malaysia and Switzerland covering GCSE, IGCSE, A-Level and IB. She particularly enjoys applying Mathematics to real life and endeavours to bring creativity to the content she creates.

Dan Finlay

Reviewer: Dan Finlay

Expertise: Maths Subject Lead

Dan graduated from the University of Oxford with a First class degree in mathematics. As well as teaching maths for over 8 years, Dan has marked a range of exams for Edexcel, tutored students and taught A Level Accounting. Dan has a keen interest in statistics and probability and their real-life applications.