Matching, Euler Tours and the Chinese Postman IV: Every Connected, Even, Symmetric Mixed Graph Has an Euler TourResearch Paper
Motivation
A postman, a snowplough or a street sweeper must traverse every street of a district and return to the depot. When some streets are one-way, the street network is a mixed graph: some edges are directed and must be traversed in a prescribed direction, the others are undirected and may be traversed either way. The first question about such a route is whether a closed route exists that traverses every street exactly once, an Euler tour of the mixed graph. When one exists, it is an optimal postman route; when none exists, the postman problem asks which streets to repeat.
J. Edmonds and E.L. Johnson treat this question in §6 of Matching, Euler tours and the Chinese postman (Mathematical Programming 5, 1973), the paper that solved the undirected Chinese postman problem by matching. Section 6 gives an algorithm that finds an Euler tour in any mixed graph that is connected, of even degree and symmetric, and §7 uses it for the mixed postman problem.
Timeline.
- 1736: Euler's condition for undirected graphs (even degrees, connectivity).
- 1951: T. van Aardenne-Ehrenfest and N.G. de Bruijn enumerate the Euler tours of a symmetric directed graph through spanning arborescences ("circuits and trees in oriented linear graphs"). Edmonds and Johnson cite this as the source of their arborescence rule.
- 1962: L.R. Ford and D.R. Fulkerson (Flows in Networks, §II.7) characterize, by a flow argument, when a mixed graph has an Euler tour without assuming symmetry.
- 1973: Edmonds and Johnson give the combined orientation and Rule algorithm of §6 for connected, even, symmetric mixed graphs, and the existence criterion of §7 for mixed postman tours.
- 1976: C.H. Papadimitriou shows the mixed postman problem NP-hard, so the polynomial-time picture of §6 does not extend to its optimization version.
Setting
A mixed graph has a finite set of nodes and a finite set of edges. Each edge meets two distinct nodes; several edges may meet the same pair of nodes. Some edges are directed: an edge directed away from node toward node must be traversed from to . In Lean an edge has a tail, a head (distinct) and a Boolean directed; for an undirected edge the order of the two ends carries no meaning.
- The degree of a node is the total number of edges, regardless of direction, meeting it. is even if every degree is even.
- and count the directed edges directed away from and toward . is symmetric if for every node .
- is connected if it is connected when the directions on the edges are ignored.
- A mixed walk is a sequence in which each directed goes from its tail to its head and each undirected meets and . It is a tour if , an Euler tour if it contains every edge exactly once, and a postman tour if it contains every edge at least once.
- An arborescence with root is a tree of directed edges in which every node of has precisely one edge of directed away from . Following those edges from any node of leads to . It is spanning if it contains every node.
Formalization targets
Goal: the mixed Euler tour theorem (§6, pp. 115–118)
If is connected, even and symmetric, then for every node
Milestones
- Cut balance (p. 116). If is symmetric, every node set has as many directed edges leaving it as entering it.
- Maximal arborescences span (pp. 115–116). Suppose the directed edges form a symmetric, connected spanning subgraph. Then an arborescence of directed edges to which no directed edge entering it from outside can be added contains every node.
- The Rule (pp. 116–117). Suppose the directed edges form a symmetric connected spanning subgraph and the undirected edges have even degree. Fix a spanning arborescence with root and order the directed edges leaving each node so that the arborescence edge comes last. Then the following traversal from is an Euler tour: leave by the next unused undirected edge if there is one, otherwise by the next unused directed edge.
- The assignment outcome (p. 118). If is connected, even and symmetric, directions can be assigned to some undirected edges so that the result is symmetric, its directed edges form a connected spanning subgraph, and the unassigned edges have even degree.
- Mixed postman criterion (§7, p. 120). A connected mixed graph has a postman tour if and only if no nonempty proper node set has every boundary edge directed away from .
Significance
The goal contains two classical theorems as special cases. With every edge undirected it is Euler's theorem for connected even multigraphs. With every edge directed it is the theorem that a connected balanced digraph is Eulerian. The milestones connect the two cases: an orientation reduces the mixed case to one the Rule can handle. The Rule itself is the van Aardenne-Ehrenfest–de Bruijn construction, which underlies the BEST theorem counting Euler tours. Milestone 5 decides whether the mixed postman problem has any feasible solution. The mixed postman problem is the standard model for routing on one-way street networks.
All results here are proved in the paper, so none is open. No Lean proof of any of them in this form is known. Mathlib's Eulerian walks are for simple graphs; it has no multigraph or mixed-graph Euler theorem, no directed Euler theorem and no arborescence-based traversal. The mission produces these, together with a reusable vocabulary of mixed multigraphs, walks that respect directions, and arborescences given by parent edges.
Difficulty
The obvious approach to the goal is to forget the directions and apply Euler's theorem. This fails because the tour it produces may traverse a directed edge backwards. Orienting all undirected edges at once also fails: an arbitrary orientation of the undirected edges need not keep every node balanced.
The difficult part of the Rule is showing that the greedy traversal does not get stuck before using every edge. It cannot stop at a node other than because of the degree conditions. The hard step is showing that no edge is left unused when it stops at . The answer depends on the ordering condition: without the arborescence edge last at every node, the Rule can return to with edges still unused. The assignment step needs an invariant: the orientation must keep every node symmetric while it extends a spanning structure of directed edges.
Formalization scope
- Graphs. Nodes and edges are finite types (
Fintype V,Fintype E). Parallel edges are allowed, including a directed and an undirected edge on the same pair. Loops are excluded (tail e ≠ head e), following the paper's standing setting of §2 (p. 91: edges meet two different nodes). Edges are a type, not a relation on nodes, so parallel edges stay distinct in every walk. - Hypotheses as on p. 115. "Even" counts all edges, directed or undirected. "Symmetric" counts only directed edges. "Connected" ignores directions. Strong connectivity is not assumed. "Symmetric" does not mean that every node has even in-degree, and an Euler tour of the underlying undirected multigraph does not satisfy the goal: the tour must traverse each directed edge from its tail to its head.
- Walks are a node list and an edge list of length one less. The one-node walk is allowed, so the graph with one node and no edges satisfies the goal.
- Arborescences are given by an optional edge at each node, with an edge required for each non-root node of ; following those edges leads to . A maximal arborescence is one where no directed edge enters from outside. The optional choice represents the root-only arborescence when the graph has no edges.
- The Rule is computed by a fuel-bounded traversal (at most steps) that keeps a global list of used edges. Its conclusion is that the computed sequences form a mixed Euler tour from .
- The assignment is an existential statement over a second mixed graph on the same edges, with the same unordered ends and every directed edge kept. The paper's algorithm (Steps 0–3) is not formalized.
- Postman criterion. "Proper subset" means nonempty and proper. Connectivity is assumed, as throughout §7, and the node set is nonempty (with no nodes there is no tour, while the criterion holds vacuously).
- Not formalized. The §7 evenness argument (p. 122) and the min-cost flow formulations are outside the scope.
Contributions are welcome at every level: proofs of the milestones, a direct proof of the goal, and general lemmas about mixed multigraph walks.
Selected references
- J. Edmonds and E.L. Johnson, Matching, Euler tours and the Chinese postman, Mathematical Programming 5 (1973) 88–124. https://doi.org/10.1007/BF01580113
- T. van Aardenne-Ehrenfest and N.G. de Bruijn, Circuits and trees in oriented linear graphs, Simon Stevin 28 (1951) 203–217.
- L.R. Ford and D.R. Fulkerson, Flows in Networks, Princeton University Press, 1962.
- C.H. Papadimitriou, On the complexity of edge traversing, Journal of the ACM 23 (1976) 544–554. https://doi.org/10.1145/321958.321974