The shortest walk that covers every street

A postman has to walk down every street of a district and return to the office. Some streets must be walked twice; the question is which ones, so that the extra distance is as small as possible.

This site revisits a 1997 final-year engineering project on this problem, the Chinese Postman Problem, with today's implementations, and follows the paths it left open: streets that need no service, several postmen, vehicles with a capacity. Read both reports, run the solver in your browser, or use the code.

walked once walked twice odd junction The 1997 example: 12 streets, optimal tour 63 = 54 + 9.

The problem

A route that walks every street exactly once and returns to its start exists only when every junction joins an even number of streets: Euler proved this for the seven bridges of Königsberg, in a paper written in 1735 and published in 1741. Real districts have junctions with an odd number of streets, so some streets must be walked again. The Chinese mathematician Kwan Mei-Ko posed the question in 1960: which streets should be repeated so that the extra distance is as small as possible?

The answer pairs up the odd junctions so that the total distance between paired junctions is minimal, repeats the streets along those connections, and then walks the result. Mail delivery, refuse collection, snow ploughing and street sweeping all build on this problem, usually with added limits such as vehicle capacity or working shifts.

Nearly thirty years later

The method of 1997 is unchanged in outline; each stage now uses what is available today (the polynomial algorithms were already published in 1997; their implementations reach much further), and the paths the project left open are followed up, each with its measured distance from the best known solution.

Problem19972026
Every street, two-wayExact up to about 20 odd junctions on a 150 MHz Pentium, then a time-limited searchExact in polynomial time: 12,000 odd junctions in two minutes
One-way streetsProposed as future workExact
One-way and two-way togetherNot in scopeExact for towns of up to 400 junctions and most up to 1,600; beyond that, within about 1% of a proven bound
Only some streets to serveProposed: a dearer first passExact on every benchmark network; the quick method is within 0.7% on average
Several postmenNoted: a shift limits the workOptimal in 61 of 62 cases where the optimum is known
Vehicles with a capacity—Within 6% of the best published solutions (median)
PlatformTurbo C on MS-DOSPython, open source, also in the browser

Details, charts and every result file: 2026 report, chapters 7 to 10, and Extensions.

Read and run

How to cite

If you use the code, the results or the report, please cite:

Monserrat Pons, M. (2026). The Chinese Postman Problem — 2026 revision (version 2026.3.0). Software and report. https://github.com/miquelmp/chinese-postman-problem

The original project:

Monserrat Pons, M. (1997). Resolución del problema del cartero chino (CPP) mediante la aplicación de un proceso de branch and bound. Final-year project, ETSEIB, Universitat Politècnica de Catalunya. Supervisor: R. Companys Pascual.

GitHub shows the same reference in APA and BibTeX under “Cite this repository”, from the file CITATION.cff.