ArticleslgStudy

computer science

Chinese postman problem

Chinese postman problem is a computer science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Chinese postman problem rather than just read about it. In short: In graph theory and combinatorial optimization, Guan's route problem, the Chinese postman problem, postman tour or route inspection problem is to find a shortest closed path or circuit that visits every edge of an (connected) undirected graph at least once. When the graph has an Eulerian circuit (a closed walk that covers every edge once), that circuit is an optimal solution.

Chinese postman problem — main illustration
Chinese postman problem — illustration

Key takeaways

  • Chinese postman problem belongs to computer science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Chinese postman problem to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Chinese postman problem from memory before moving on to harder problems.

Reference excerpt

In graph theory and combinatorial optimization, Guan's route problem, the Chinese postman problem, postman tour or route inspection problem is to find a shortest closed path or circuit that visits every edge of an (connected) undirected graph at least once. When the graph has an Eulerian circuit (a closed walk that covers every edge once), that circuit is an optimal solution. Otherwise, the optimization problem is to find the smallest number of graph edges to duplicate (or the subset of edges with the minimum possible total weight) so that the resulting multigraph does have an Eulerian circuit. It can be solved in polynomial time, unlike the travelling salesman problem which is NP-hard. It is different from the travelling salesman problem in that the travelling salesman cannot repeat visited nodes and does not have to visit every edge. The problem was originally studied by the Chinese mathematician Meigu Guan in 1960, whose Chinese paper was translated into English in 1962. The original name "Chinese postman problem" was coined in his honor; different sources credit the coinage either to Alan J. Goldman or Jack Edmonds, both of whom were at the U.S. National Bureau of Standards at the time. A generalization takes as input any set T of evenly many vertices, and must produce as output a minimum-weight edge set in the graph whose odd-degree vertices are precisely those of T. This output is called a T-join. This problem, the T-join problem, is also solvable in polynomial time by the same approach that solves the postman problem.

Undirected solution and T-joins The undirected route inspection problem can be solved in polynomial time by an algorithm based on the concept of a T-join. Let T be a set of vertices in a graph. An edge set J is called a T-join if the collection of vertices that have an odd number of incident edges in J is exactly the set T. A T-join exists whenever every connected component of the graph contains an even number of vertices in T. The T-join problem is to find a T-join with the minimum possible number of edges or the minimum possible total weight. For any T, a smallest T-join (when it exists) necessarily consists of 12|T| paths that join the vertices of T in pairs. The paths will be such that the total length or total weight of all of them is as small as possible. In an optimal solution, no two of these paths will share any edge, but they may have shared vertices. A minimum T-join can be obtained by constructing a complete graph on the vertices of T, with edges that represent shortest paths in the given input graph, and then finding a minimum weight perfect matching in this complete graph. The edges of this matching represent paths in the original graph, whose union forms the desired T-join. Both constructing the complete graph, and then finding a matching in it, can be done in O(n3) computational steps. For the route inspection problem, T should be chosen as the set of all odd-degree vertices. By the assumptions of the problem, the whole graph is connected (otherwise no tour exists), and by the handshaking lemma it has an even number of odd vertices, so a T-join always exists. Doubling the edges of a T-join causes the given graph to become an Eulerian multigraph (a connected graph in which every vertex has even degree), from which it follows that it has an Euler tour, a tour that visits each edge of the multigraph exactly once. This tour will be an optimal solution to the route inspection problem.

Directed solution On a directed graph, the same general ideas apply, but different techniques must be used. If the directed graph is Eulerian, one need only find an Euler cycle. If it is not, one must find T-joins, which in this case entails finding paths from vertices with an in-degree greater than their out-degree to those with an out-degree greater than their in-degree such that they would make in-degree of every vertex equal to its out-degree. This can be solved as an instance of the minimum-cost flow problem in which there is one unit of supply for every unit of excess in-degree, and one unit of demand for every unit of excess out-degree. As such it is solvable in O(|V|2|E|) time. A solution exists if and only if the given graph is strongly connected.

Applications Various combinatorial problems have been reduced to the Chinese Postman Problem, including finding a maximum cut in a planar graph and a minimum-mean length circuit in an undirected graph.

Variants A few variants of the Chinese Postman Problem have been studied and shown to be NP-complete.

The windy postman problem is a variant of the route inspection problem in which the input is an undirected graph, but where each edge may have a different cost for traversing it in one direction than for traversing it in the other direction. In contrast to the solutions for directed and undirected graphs, it is NP-complete. The Mixed Chinese postman problem: for this problem, some of the edges may be directed and can therefore only be visited from one direction. When the problem calls for a minimal traversal of a digraph (or multidigraph) it is known as the "New York Street Sweeper problem." The k-Chinese postman problem: find k cycles all starting at a designated location such that each edge is traversed by at least one cycle. The goal is to minimize the cost of the most expensive cycle. The "Rural Postman Problem": solve the problem with some edges not required.

See also Arc routing Mixed Chinese postman problem

References

External links Weisstein, Eric W., "Chinese Postman Problem", MathWorld Media related to Route inspection problem at Wikimedia Commons

Illustrations

Chinese postman problem: A worked example of an undirected Chinese postman problem:
Each street must be traversed at least once, starting and ending at the post office at A.Four vertices with odd degree (orange) are found on its equivalent graph.The pairing with the lowest total length is found.After corresponding edges are added (red), the length of the Eulerian circuit is found.
A worked example of an undirected Chinese postman problem: Each street must be traversed at least once, starting and ending at the post office at A.Four vertices with odd degree (orange) are found on its equivalent graph.The pairing with the lowest total length is found.After corresponding edges are added (red), the length of the Eulerian circuit is found.

Worked examples

Example 1 — a first encounter with Chinese postman problem

Start with the simplest possible case. Write down what Chinese postman problem claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Chinese postman problem before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Chinese postman problem ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Chinese postman problem

In research
Chinese postman problem appears in computer science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Chinese postman problem in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Chinese postman problem is common in secondary-school and first-year university syllabi. It links to neighbouring topics Computational problems in graph theory, NP-complete problems, so understanding it makes those chapters shorter.
In everyday life
Look for Chinese postman problem outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Chinese postman problem” →

How to study Chinese postman problem in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Chinese postman problem means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Chinese postman problem out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Chinese postman problem in simple terms?

In graph theory and combinatorial optimization, Guan's route problem, the Chinese postman problem, postman tour or route inspection problem is to find a shortest closed path or circuit that visits every edge of an (connected) undirected graph at least once. When the graph has an Eulerian circuit (a…

Why does Chinese postman problem matter?

Because it connects several computer science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Chinese postman problem?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Chinese postman problem.

Tags

  • Computational problems in graph theory
  • NP-complete problems

Keep exploring