Chinese postman problem
The Chinese postman problem (CPP), also known as the route inspection problem, is a fundamental challenge in graph theory and combinatorial optimization that requires determining the shortest closed walk in a connected undirected graph such that every edge is traversed at least once.[1] This problem generalizes the Eulerian circuit concept, where edges must be covered exactly once if possible, but allows repetitions to minimize total length when the graph lacks an Eulerian circuit.[2] Originating from practical concerns like efficient route planning, the CPP was first formally studied and solved by Chinese mathematician Mei-Ko Kwan in 1962, who proposed an algorithm inspired by optimizing postal delivery paths in urban networks. Kwan's work built on Leonhard Euler's 1736 exploration of the Seven Bridges of Königsberg, which laid the foundations of graph theory by addressing traversability without edge repetition.[1]
For undirected connected graphs, the CPP admits a polynomial-time algorithm, making it one of the few NP-hard-related problems with an efficient exact solution.[3] The method, refined by Jack Edmonds and Ellis L. Johnson, proceeds by identifying the even number of odd-degree vertices (guaranteed by the handshaking lemma), computing a minimum-weight perfect matching among these vertices where edge weights represent shortest-path distances, and duplicating the edges along these matching paths to create a multigraph with all even degrees.[2] An Eulerian circuit can then be found in this augmented multigraph using Hierholzer's algorithm, yielding the optimal tour whose length equals the sum of all original edge weights plus the matching cost.[1] This approach ensures the solution traverses each original edge exactly once, except for the duplicated segments, and runs in time dominated by the matching computation, which is polynomial via the blossom algorithm.[2]
Variants of the CPP extend to directed and mixed graphs, with the directed case solvable in polynomial time for strongly connected digraphs, achieved by adding minimum-cost arcs to balance in- and out-degrees at each vertex if necessary.[3] In mixed graphs containing both directed and undirected edges, the problem becomes NP-hard, though approximation algorithms exist with ratios like 3/2.[4] The CPP serves as a cornerstone for arc-routing problems and finds wide applications in logistics, such as optimizing garbage collection routes, snow plowing operations, street sweeping, and automated drilling in printed circuit boards, where minimizing traversal cost directly impacts efficiency and resource use.[5]
Problem Definition and Background
The Chinese postman problem (CPP) seeks the shortest closed walk in a connected undirected graph that traverses each edge at least once.[2] Formally, given a connected undirected graph G = (V, E) with vertex set V and edge set E, and a positive length function l: E \to \mathbb{R}^+, the objective is to find a closed walk W covering every edge in E at least once such that the total length \sum_{e \in W} l(e) (counting multiplicities) is minimized.[2]
This problem is closely related to Eulerian circuits, which are closed walks traversing each edge exactly once and exist if and only if every vertex in G has even degree.[2] If G is Eulerian, an Eulerian circuit solves the CPP with no duplications. Otherwise, the optimal solution requires duplicating a minimum-length set of edges (possibly along paths) to form a multigraph G' where all degrees are even, after which an Eulerian circuit in G' yields the shortest covering walk.[2] A proof sketch proceeds as follows: any minimum-length covering walk in G induces a multigraph G' obtained by adding edges corresponding to excess traversals; for W to be Eulerian in G', all degrees in G' must be even, which means the added edges must increase the degrees of the original odd-degree vertices by an odd amount each (effectively pairing them), while preserving even degrees elsewhere; minimizing the length of these additions ensures optimality, as any other covering walk would require at least as much extra length.[2]
The CPP generalizes to directed and mixed graphs. In the directed variant, the input is a strongly connected digraph G = (V, A) with arc set A, and the walk must follow arc directions; an Eulerian circuit exists if and only if in-degree equals out-degree at every vertex, otherwise requiring minimum-cost arc additions (via shortest paths) to balance degrees.[6] The mixed variant applies to graphs with both undirected edges and directed arcs, where the covering walk respects directions on arcs but allows bidirectional traversal on edges.[7]
Historical Origins
The Chinese postman problem traces its conceptual origins to Leonhard Euler's seminal 1736 work on the Seven Bridges of Königsberg, which explored the conditions for traversing all edges of a graph exactly once and return to the starting point, laying the groundwork for Eulerian paths as a prerequisite concept.
The problem in its modern form emerged in the context of postal route optimization in China, first formally investigated by Chinese mathematician Meigu Guan (also romanized as Mei-Ko Kwan or Kuan Mei-Ko) in a 1960 paper published in Chinese, with an English translation appearing in 1962.[8] Guan's work focused on finding the shortest closed walk that covers every edge of a connected graph at least once, motivated by the practical challenge of minimizing the distance a postman travels while delivering mail along all streets in an assigned area.[9] This formulation addressed non-Eulerian graphs by augmenting them with duplicate edges to create an Eulerian circuit, establishing an early algorithmic framework for the undirected case.
The term "Chinese postman problem" derives directly from Guan's application to postal delivery in China, reflecting the problem's origins in real-world routing efficiency.[8] It is alternatively known as the route inspection problem, a name emphasizing the general task of inspecting or traversing all edges with minimal added length.[9] By the 1960s, the problem's theoretical evolution highlighted its tractability: polynomial-time algorithms were recognized for undirected connected graphs and strongly connected directed graphs, building on Guan's matching-based augmentation approach to pair odd-degree vertices efficiently.[8] In contrast, the general case—particularly for mixed graphs combining directed and undirected edges—was later identified as NP-hard, but early developments up to this period solidified the problem's status as a cornerstone of graph theory and optimization.[9]
Solutions for Undirected Graphs
Matching-Based Approach
The matching-based approach to solving the Chinese postman problem (CPP) on undirected graphs transforms the problem into finding a minimum-weight perfect matching in an auxiliary graph, thereby identifying the minimal set of edges to duplicate to make the graph Eulerian. This method, originally developed by Edmonds and Johnson, relies on the fact that an undirected connected graph admits an Eulerian circuit if and only if all vertices have even degree.[2]
The first step is to identify the set T of all vertices with odd degree in the input graph G = (V, E). By the handshaking lemma, |T| is even, ensuring the feasibility of pairing these vertices.[10] Next, construct a complete graph H on the vertex set T, where the weight of each edge \{u, v\} in H is the length of the shortest path from u to v in G. These shortest path distances can be computed using Floyd-Warshall's algorithm in O(|V|^3) time.[2]
Solve for a minimum-weight perfect matching M in H using Edmonds' blossom algorithm, which pairs all vertices in T at minimum total cost. For each matched pair \{u, v\} in M, duplicate the edges along a corresponding shortest path from u to v in G, adding these as parallel edges to form a multigraph G'. The resulting G' has even degrees at all vertices and remains connected, thus admitting an Eulerian circuit that traverses each original edge exactly once and the duplicated edges as needed. This circuit provides the optimal CPP tour of length equal to the total edge weight of G plus the matching cost.[10]
The overall time complexity is O(|V|^3), dominated by the all-pairs shortest paths computation and the matching algorithm on up to |V| vertices. This approach is equivalent to finding a minimum-cost T-join in the graph, where T is the set of odd-degree vertices.[2]
Example: Consider an undirected graph with vertices A, B, C, D and edges AB, BC, CD, DA, AC (forming a square with one diagonal), where all edges have unit length. Vertices B and D have degree 2 (even), while A and C have degree 3 (odd), so T = \{A, C\}. The auxiliary graph H has a single edge AC with weight 1 (direct edge). The minimum matching duplicates the path A-C, making all degrees even. The Eulerian circuit in the augmented graph, such as A-B-C-D-A-C-A, traverses each original edge once and the duplicate AC once, for a total length of 6 (5 original edges plus 1 for the duplicate). For a case with four odd-degree vertices, say adding pendant edges to make B and D odd (introducing new odd-degree vertices), the auxiliary graph on the odd vertices would use shortest-path distances; a minimum matching pairs them at minimal total cost, such as pairing adjacent odds where possible to duplicate short paths.[2]
T-Joins and Minimum Cost Augmentation
In the context of the undirected Chinese postman problem (CPP), the set of edges to duplicate can be characterized as a minimum-weight T-join, where T is the set of vertices with odd degree in the original graph. A T-join in an undirected graph G = (V, E) with edge weights c: E → ℝ⁺ is defined as a subset J ⊆ E such that the subgraph (V, J) has odd degree exactly at the vertices in T (assuming |T| is even, which holds for connected graphs). This structure ensures that adding J to the original edges results in an Eulerian multigraph, where all degrees are even, allowing an Eulerian tour that traverses each original edge at least once.[2]
The optimal solution to the CPP corresponds precisely to the minimum-weight T-join plus the original edges, as the cost of the added traversals is minimized while achieving Eulerian connectivity. This equivalence stems from the fact that the duplicated edges must pair up the odd-degree vertices via paths, effectively correcting the parity without unnecessary additions. The seminal algorithm by Edmonds and Johnson formalizes this by reducing the T-join problem to a minimum-weight perfect matching on the odd-degree vertices.[2]
The minimum T-join can be formulated as an integer linear program (ILP). Let x_e be a binary variable indicating whether edge e is included in the T-join (x_e = 1 if e ∈ J, 0 otherwise). The ILP is:
\begin{align*}
\min &\quad \sum_{e \in E} c_e x_e \\
\text{s.t.} &\quad \sum_{e \in \delta(v)} x_e \equiv \begin{cases}
1 \pmod{2} & \text{if } v \in T, \\
0 \pmod{2} & \text{if } v \notin T,
\end{cases} \\
&\quad x_e \in \{0, 1\} \quad \forall e \in E,
\end{align*}
where δ(v) is the set of edges incident to v. This formulation ensures the parity constraints for degrees in the T-join subgraph while minimizing the total cost. The polyhedron defined by the LP relaxation of these constraints is known to have half-integral vertices, allowing polynomial-time solvability via matching techniques.
To solve this efficiently, the problem reduces to finding a minimum-weight perfect matching in an auxiliary complete graph H on vertex set T, where the weight of edge {u, v} ∈ E(H) (u, v ∈ T) is the shortest-path distance d_G(u, v) in the original graph G under costs c. The matching pairs the vertices in T, and for each matched pair {u_i, v_i}, the edges of a corresponding shortest path in G are added to the T-join (with multiplicity if paths overlap). This construction yields the minimum T-join because its cost equals the matching cost, and no cheaper T-join exists due to the triangle inequality of shortest paths. As noted in the matching-based approach, this leverages blossom algorithms for the perfect matching in O(|T|^3) time.[2]
The optimality follows from a decomposition theorem: any T-join J can be partitioned into |T|/2 edge-disjoint paths that connect pairs of vertices in T (plus even cycles, which can be omitted without increasing cost under non-negative weights). The minimum cost of such a decomposition is at least the cost of the minimum perfect matching on T using shortest-path distances, as each path cost is at least d_G(u, v) for its endpoints. Conversely, the matching construction achieves exactly this lower bound by selecting shortest paths, ensuring minimality. This path-decomposition property holds for any minimal T-join and underpins the equivalence.[2]
For non-complete graphs, the auxiliary graph H requires precomputing all-pairs shortest paths between vertices in T, which can be done using Floyd-Warshall algorithm in O(|V|^3) time if |T| is small relative to |V|, or Dijkstra's algorithm from each vertex in T for sparse graphs. This extension preserves the polynomial-time solvability while handling arbitrary connected undirected graphs with non-negative edge costs.
Solutions for Directed Graphs
Feasibility Conditions
For the directed Chinese Postman Problem (DCPP), a solution exists if and only if the underlying directed graph is strongly connected, meaning there is a directed path from every vertex to every other vertex.[11] Without strong connectivity, no closed tour can traverse all arcs, as some parts of the graph would be unreachable in a cyclic manner.[11] Strong connectivity can be verified in polynomial time using algorithms such as Floyd-Warshall or depth-first search variants.[11]
If the graph is strongly connected and balanced—meaning the in-degree equals the out-degree at every vertex—then it is Eulerian, and an Eulerian circuit provides the exact solution to the DCPP, traversing each arc precisely once.[11] In the general case, the graph may be unbalanced, where for some vertices the in-degree and out-degree differ. To address this, define the imbalance at each vertex v as \delta(v) = d^+(v) - d^-(v), where d^+(v) is the out-degree and d^-(v) is the in-degree.[11] The sum of imbalances over all vertices is always zero, \sum_v \delta(v) = 0, because the total number of out-arcs equals the total number of in-arcs in any directed graph.[11]
Vertices with \delta(v) > 0 form the set D^+, representing excess outgoing arcs (demand for additional incoming arcs to balance). Conversely, vertices with \delta(v) < 0 form the set D^-, representing excess incoming arcs (supply of additional outgoing arcs).[11] The absolute imbalances must match in total: \sum_{v \in D^+} \delta(v) = -\sum_{v \in D^-} \delta(v) = k, where k is the minimum number of additional paths needed to balance the graph.[11]
Given strong connectivity, it is always possible to balance the degrees by adding duplicate traversals along shortest paths from vertices in D^- to vertices in D^+, without compromising the connectivity of the augmented graph.[11] Thus, the DCPP has a solution if and only if the graph is strongly connected; the balance condition can always be satisfied under this prerequisite.[11] If feasible, the problem is solvable in polynomial time via reduction to minimum-cost flow or assignment problems; otherwise, infeasibility is reported. This contrasts briefly with the undirected case, where an even number of odd-degree vertices is required for feasibility, analogous to pairing imbalances.
Reduction to Assignment Problem
For directed graphs that satisfy the feasibility conditions—strong connectivity (the feasibility condition for the DCPP)—the directed Chinese postman problem (DCPP) can be solved by augmenting the graph to make it Eulerian while minimizing the added traversal cost. The core of the algorithm involves reducing the problem of selecting optimal paths to duplicate into a minimum-cost transportation or assignment problem on a bipartite graph. This approach was formalized in early network optimization literature and has been widely adopted due to its polynomial-time solvability.[11]
After verifying feasibility, identify the imbalanced vertices: let the supply vertices be those with excess in-degree (in-degree > out-degree), each supplying an amount equal to the difference, and the demand vertices those with excess out-degree (out-degree > in-degree), each demanding an amount equal to the difference. Construct a bipartite graph with supply vertices on one partite set and demand vertices on the other. The edges in this bipartite graph connect each supply vertex u to each demand vertex v, weighted by the cost of the shortest path from u to v in the original directed graph. These shortest path costs are precomputed using the Floyd-Warshall algorithm, which handles all-pairs shortest paths in O(|V|^3) time, where |V| is the number of vertices.[11]
Solve the minimum-cost assignment problem on this bipartite graph to pair supplies with demands, minimizing the total shortest path cost. If all imbalances are of unit size (one excess per vertex), this is a standard balanced assignment problem solvable via the Hungarian algorithm in O(n^3) time, where n is half the number of imbalanced vertices (since total supply equals total demand). For general imbalances, replicate vertices according to their supply/demand amounts to reduce it to a unit-demand assignment, or solve the equivalent transportation problem using minimum-cost flow algorithms, still yielding polynomial time bounded by O(|V|^3) overall. The solution provides a set of shortest paths to duplicate: for each assigned pair (u, v), add one copy of every arc along the shortest path from u to v. This augmentation increases the out-degree at each supply vertex and the in-degree at each demand vertex without altering the balance at intermediate vertices, resulting in an Eulerian digraph where in-degree equals out-degree for all vertices.[11]
Finally, compute an Eulerian circuit in the augmented digraph using Hierholzer's algorithm, which traverses every arc exactly once in O(|E|) time, where |E| is the number of arcs. This circuit corresponds to the minimum-cost closed walk traversing every original arc at least once. The overall time complexity is dominated by the Floyd-Warshall step and the assignment solution, achieving O(|V|^3).[11]
To illustrate, consider a simple directed graph with four vertices: supplies S_1 and S_2 (each with excess in-degree of 1) and demands D_1 and D_2 (each with excess out-degree of 1). The shortest path costs are: from S_1 to D_1 costs 2, to D_2 costs 3; from S_2 to D_1 costs 4, to D_2 costs 1 (assuming unit arc weights). The minimum-cost assignment pairs S_1 to D_1 (cost 2) and S_2 to D_2 (cost 1), for a total added cost of 3. Duplicating the arcs along these paths balances the degrees, and the resulting Eulerian digraph yields the optimal postman tour. This example demonstrates how the bipartite assignment selects non-overlapping paths to minimize duplication while achieving balance.[11]
Applications and Practical Implementations
Real-World Uses in Routing
The Chinese Postman Problem (CPP) is widely applied in postal and delivery services to optimize routes for carriers who must traverse every street in an assigned area at least once while minimizing total travel distance. This application directly addresses the need for efficient mail distribution, where graphs represent road networks and edges denote streets requiring coverage for delivery points. For instance, large postal systems like Deutsche Post in Germany have adapted CPP variants, such as the windy rural postman problem, to incorporate real-world constraints like turn penalties and cluster-based deliveries, enabling optimized routes for over 72,000 carriers handling 20 billion letters annually.[12] Similarly, the United States Postal Service (USPS) employs CPP-inspired routing strategies to ensure comprehensive street coverage in urban and rural areas, reducing fuel consumption and delivery times through graph-based planning.[13]
In urban planning and maintenance, CPP facilitates trash collection and snow plowing by modeling road networks as graphs, ensuring all edges (roads) are serviced exactly once where possible or with minimal duplication. For trash collection, vehicles follow CPP solutions to cover assigned neighborhoods efficiently, avoiding unnecessary backtracking and supporting capacity constraints in larger variants. Snow plowing operations use CPP to determine plow routes that clear all streets during storms, with adaptations for directed graphs accounting for one-way streets or uphill/downhill costs; a study on urban snowplow optimization combined CPP with tabu search in simulated city networks.[13][14] These applications highlight CPP's role in cost-effective public services, where billions of dollars are spent annually on such arc routing tasks.[13]
In manufacturing, particularly printed circuit board (PCB) production, CPP minimizes tool travel by modeling the board as a graph where edges represent paths between drilling sites, ensuring the drill head traverses necessary connections with minimal redundancy. This approach optimizes the sequence of hole drilling operations, reducing machine idle time and wear in high-volume production lines.[15]
Telecommunications networks leverage CPP for cable laying and inspection tours, where technicians must cover all links in a fiber-optic or transmission line graph to install or verify connections without excessive retracing. For example, in power transmission line inspections, CPP solutions guide patrols along all segments of the network, minimizing vehicle or drone travel while ensuring complete coverage of infrastructure. Recent extensions apply CPP to coordinated vehicle-drone routing for infrastructure inspection and surveillance, where drones handle subsets of arcs to reduce overall tour length.[5][16]
Implementing CPP in real-world routing faces challenges, including weighted edges reflecting actual distances or travel times, obstacles like traffic restrictions or no-entry zones, and the scale of large urban graphs requiring approximations. Exact solutions via matching-based approaches become computationally intensive for graphs with thousands of edges, prompting heuristics like tabu search or genetic algorithms for near-optimal routes in postal and plowing operations. These adaptations ensure practicality.[12][14]
To illustrate the matching-based approach for undirected graphs, consider a simple connected undirected graph with vertices labeled a, b, c, d, e, f and weighted edges: a-b (3), a-c (1), b-d (5), b-f (6), c-e (2), d-f (1), e-f (4). The degrees are even for a, c, d, and e but odd for b and f.[17]
The odd-degree vertices form the set T = {b, f}. The auxiliary complete graph on T has a single edge b-f with weight equal to the shortest-path distance of 6 (direct b-f or via b-d-f). The minimum-weight perfect matching is b-f (6), adding this cost by duplicating edges along a shortest path (e.g., the direct b-f edge). The augmented multigraph has all even degrees. An Eulerian tour can then be found, with total length equal to the sum of all original edge weights (22) plus the added cost (6) = 28.[17]
For directed graphs, consider a weighted directed graph with vertices a, b, c, d, e and edges a→b (8), b→d (5), d→c (1), c→b (2), c→e (3), e→b (7), with imbalances δ(v) = out-degree(v) - in-degree(v): δ(a)=0, δ(b)=-2, δ(c)=1, δ(d)=1, δ(e)=0. The positive imbalance vertices P = {c, d} (total excess 2), negative N = {b} (deficit 2). The bipartite assignment graph from N to P has costs as shortest-path distances: b to c (6), b to d (5), d to c (1). The optimal assignment adds two paths b→d (5 each) and one d→c (1), total added 11. The augmented multigraph has balanced degrees, allowing an Eulerian circuit: a→b→d→c→b→d→c→e→b→d→e→a, total length 44.[18]
Several software libraries facilitate CPP implementations. The Python library NetworkX provides functions for shortest paths (dijkstra_path_length), minimum-weight perfect matching (max_weight_matching with negated weights for minimization), and Eulerian circuits (eulerian_circuit), enabling full CPP solving by constructing the auxiliary graph on odd-degree vertices and augmenting edges along matching paths.[19] Google's OR-Tools supports CPP via mixed-integer programming models for arc routing, where edges are variables for duplication minimized subject to flow balance and coverage constraints, suitable for directed and undirected cases through its routing APIs.[20] The LEDA library offers efficient minimum-cost perfect matching algorithms (O(n^3) via blossom variants), which form the core for auxiliary graph solving in CPP implementations.
Benchmarks on real-world road networks demonstrate practical performance: instances with up to 1000 vertices and thousands of edges, such as urban graphs, can be solved exactly in seconds using matching-based methods on standard hardware, as the polynomial complexity (dominated by O(|T|^3) for |T| odd vertices) remains feasible when |T| is small relative to |V|.[21]
Open-source pseudocode for auxiliary graph construction in the undirected case, adapted from Python implementations, is as follows:
function chinese_postman_undirected(G):
odds = [v for v in G.vertices if degree(G, v) % 2 == 1]
if len(odds) == 0:
return eulerian_circuit(G), sum(edge_weights(G))
aux = complete_graph(odds)
for i in range(len(odds)):
for j in range(i+1, len(odds)):
u, v = odds[i], odds[j]
dist = shortest_path_length(G, u, v)
aux.add_edge(u, v, weight=dist)
matching = min_weight_perfect_matching(aux)
added_length = 0
for (u, v) in matching:
path = shortest_path(G, u, v)
duplicate_edges(G, path)
added_length += shortest_path_length(G, u, v)
tour = eulerian_circuit(G)
total_length = sum_original_edge_weights + added_length # Use original sum before duplication
return tour, total_length
function chinese_postman_undirected(G):
odds = [v for v in G.vertices if degree(G, v) % 2 == 1]
if len(odds) == 0:
return eulerian_circuit(G), sum(edge_weights(G))
aux = complete_graph(odds)
for i in range(len(odds)):
for j in range(i+1, len(odds)):
u, v = odds[i], odds[j]
dist = shortest_path_length(G, u, v)
aux.add_edge(u, v, weight=dist)
matching = min_weight_perfect_matching(aux)
added_length = 0
for (u, v) in matching:
path = shortest_path(G, u, v)
duplicate_edges(G, path)
added_length += shortest_path_length(G, u, v)
tour = eulerian_circuit(G)
total_length = sum_original_edge_weights + added_length # Use original sum before duplication
return tour, total_length
This constructs the auxiliary graph by computing all-pairs shortest paths among odd vertices (O(|V|^3) via Floyd-Warshall if dense), solves the matching, and augments by duplicating path edges.[22]
Scalability limitations arise for large graphs with |V| > 10^4, particularly if the number of odd-degree vertices |T| is high (up to O(|V|)), as the minimum matching step requires O(|T|^3) time and the all-pairs shortest paths add O(|V|^3); exact solutions become impractical, necessitating heuristics like Christofides-style approximations or metaheuristics for near-optimal tours.[21]
Variants and Extensions
Mixed and Eulerian Variants
The mixed Chinese postman problem (MCPP) extends the standard CPP to graphs containing both directed arcs and undirected edges, requiring a minimum-cost closed tour that traverses each arc and edge at least once.[23] Unlike the purely undirected or directed cases, which are solvable in polynomial time, the MCPP is NP-complete, as proven by reducing the problem of deciding whether a mixed graph admits an Eulerian tour after minimum augmentation to 3-SAT. A high-level sketch of the hardness involves constructing a mixed graph where undirected edges represent choices in variable assignments (similar to Hamiltonian path gadgets for path existence), and directed arcs enforce traversal orders; the minimum augmentation cost is zero if and only if the original instance has a satisfying assignment, linking it to path-finding hardness in mixed structures.
Exact solutions for small MCPP instances rely on integer linear programming (ILP) formulations that minimize the cost of added duplicate arcs and edges to achieve Eulerian properties, subject to flow balance and coverage constraints at each vertex.[23] These ILPs can be relaxed to linear programs with half-integral extreme points, reducible to a capacitated transshipment problem—a bipartite minimum-cost flow variant solvable via network simplex methods for the relaxation, with branch-and-bound for integrality.[23] For larger instances, a 3/2-approximation algorithm computes a near-optimal augmentation by separately solving minimum perfect matchings on the undirected odd-degree components and minimum cost assignments on the directed imbalances, then combining them without exceeding 1.5 times the optimal tour length.
Eulerian variants of the CPP address special cases or relaxations where the graph is nearly Eulerian. The open Chinese postman problem seeks a minimum-cost walk (not necessarily closed) starting at a specified vertex s and ending at t that traverses each edge at least once; for undirected graphs, this is solved by pairing all odd-degree vertices except s and t (if they differ in parity), yielding a polynomial-time algorithm via matching.[9] In directed graphs, feasibility requires balanced in- and out-degrees except for s (out-degree one higher) and t (in-degree one higher), reducible to the closed case by adding a zero-cost arc from t to s.[9]
The windy postman problem models undirected graphs where each edge has distinct traversal costs depending on direction (e.g., due to wind or traffic), requiring a minimum-cost tour traversing each edge at least once in some direction.[24] This variant is NP-hard even for unit costs, generalizing the MCPP by treating each undirected edge as two oppositely directed arcs with asymmetric costs; approximation algorithms exist.
The rural postman problem further extends the CPP by requiring traversal only of a specified subset R of edges (e.g., key roads in a city), finding a minimum-cost closed tour covering R at least once while allowing shortcuts on the rest. It is NP-hard. For practical solution, branch-and-cut methods formulate it as an ILP with subtour elimination and connectivity constraints on the components of R, solved via separation routines for valid inequalities like blossom and comb inequalities, effective for instances up to hundreds of edges.[9]
Generalizations to Higher Dimensions
The geometric Chinese Postman Problem extends the standard formulation to graphs embedded in the Euclidean plane, where edges are represented as line segments and additional traversals use straight-line Euclidean distances between endpoints. The goal is to find the shortest closed tour that traverses each line segment at least once. This is achieved by pairing odd-degree endpoints via a minimum-cost perfect matching under the Euclidean metric and then constructing an Eulerian tour in the augmented multigraph. While exact solutions are possible using general matching algorithms, In higher dimensions, the problem generalizes to \mathbb{R}^d (d > 2), where line segments become higher-dimensional edges, and the matching uses the \ell_2-norm; the same augmentation approach applies, though computational complexity increases with dimension due to higher-dimensional shortest path computations.[25]
The Chinese Postman Problem has been generalized to hypergraphs, where edges are hyperedges connecting multiple vertices, and the tour must traverse each hyperedge at least once. In k-uniform hypergraphs (each hyperedge has exactly k vertices), the problem reduces to finding an Eulerian superpath in an augmented structure. For k=2, this coincides with the standard graph case and is solvable in polynomial time via matching-based augmentation. For general k, formulations in superhypergraphs (allowing hyperedges of varying sizes) can be solved in O(|V|^3) time by constructing an incidence multigraph, pairing odd-degree vertices, and computing an Eulerian circuit, though exact traversal of hyperedges may require additional matroid intersection techniques to ensure feasibility in non-Eulerian settings.[26]
Time-dependent variants of the Chinese Postman Problem incorporate edge traversal costs that vary with time, reflecting real-world scenarios like traffic congestion. Dynamic programming approaches solve this by discretizing time into intervals and computing minimum-cost augmentations that account for time-evolving weights, yielding exact solutions for small instances or approximations for larger graphs. For example, algorithms build state spaces tracking current position and time, minimizing total duration while ensuring all edges are covered.[27]
Stochastic variants address uncertainty, such as probabilistic edge failures or random costs, aiming to minimize the expected tour length. These are modeled as expected-value optimizations over edge presence probabilities, often using integer programming formulations extended from the deterministic case; solutions involve scenario-based approximations or robust matching to pair odd-degree vertices under uncertainty.[28]
Post-2000 developments include quantum algorithms targeting the matching reduction step of the Chinese Postman Problem, offering theoretical speedups for large graphs. Quantum formulations leverage Grover's search or quantum approximate optimization for minimum perfect matching, potentially reducing the O(n^3) classical time to subquadratic in expectation, though practical implementations remain limited to small-scale demonstrations on quantum annealers.
Applications of these generalizations appear in DNA sequencing, where contigs (overlapping sequence fragments) are modeled as edges in a de Bruijn graph, and the Chinese Postman Problem finds the shortest superstring assembling the genome by traversing all contigs; efficient algorithms for bi-directed graphs solve this in polynomial time, aiding whole-genome assembly.[29] In robotics, higher-dimensional variants support 3D path planning, such as multi-robot coverage of volumetric spaces or lattice structures in additive manufacturing, where the problem optimizes tool paths to traverse all required segments while minimizing travel in \mathbb{R}^3.[30]