Motivation
Graph theory began with a unicursal problem: Euler's question whether the bridges of Königsberg can be crossed in one closed walk using each bridge exactly once. For graphs whose arcs are all undirected, or all directed, the answer has been known since the nineteenth century: a connected graph has such a closed walk exactly when every node has even degree, respectively when every node has as many incoming as outgoing arcs. Street networks mix one-way and two-way streets, so routing problems such as the Chinese postman problem live on mixed graphs, where neither criterion applies.
Chapter II, §7 of Ford and Fulkerson's Flows in Networks (RAND Report R-375-PR, 1962; Princeton University Press, 1962) settles the mixed case with a necessary and sufficient condition read off from network flows. The same chapter treats, in §4 and §8, the other classical min–max theorems of combinatorics that flow theory reproves in a few lines: the König–Egerváry theorem on bipartite graphs, Menger's theorem on disjoint chains, and Dilworth's chain decomposition theorem for partially ordered sets.
Setting
A mixed graph G=[N;A] has a finite set N of nodes and a set A of arcs. An arc is either directed, an ordered pair (x,y) leading from x to y, or undirected, an unordered pair {x,y}. No arc joins a node to itself, and there is at most one arc leading from one node to another: at most one directed arc (x,y), at most one undirected arc {x,y}, and never both an undirected and a directed arc on the same pair. Directed arcs (x,y) and (y,x) may both be present.
A closed route is a sequence x0,a0,x1,a1,…,am−1,xm=x0 of nodes and arcs in which each ai leads from xi to xi+1: a directed arc is traversed with its direction, an undirected arc in either direction. Nodes may repeat, and a single node (m=0) is a closed route. The graph G is unicursal if some closed route contains every arc of G exactly once and every node of G at least once.
G is connected if N is nonempty and any two nodes are joined by a path, arcs being allowed against their direction. The degree of a node counts the arcs incident with it, directed and undirected together. For X⊆N with complement Xˉ=N−X, write d+(X) and d−(X) for the numbers of directed arcs from X to Xˉ and from Xˉ to X, and u(X) for the number of undirected arcs joining X and Xˉ.
For §4, a chain in a directed graph is a sequence of at least two distinct nodes with consecutive pairs arcs, and an S,T disconnecting set of nodes meets every chain from S to T. For §8, P={1,…,n} is partially ordered by ≻, a decomposition partitions P into chains i1≻⋯≻ik, and the bipartite graph of P has an arc (xi,yj) whenever i≻j; independent arcs are pairwise node disjoint, and a proper cover is a node set meeting every arc with no proper subset doing so.
Formalization targets
Goal: Chapter II, Theorem 7.1 (pp. 42–43)
The mixed graph G is unicursal if and only if
- G is connected;
- every node of G is incident with an even number of arcs;
- for every X⊆N,
d+(X)−d−(X)≤u(X).
Milestones
- Theorem 4.1 (König–Egerváry, p. 32): in a bipartite graph [S,T;A] the maximal number of pairwise node disjoint arcs equals the minimal number of nodes in an S,T disconnecting set. This is a reference to the published
MatousekLP.Integrality.konig.
- Theorem 4.2 (Menger, p. 34): for disjoint S,T⊆N,
max#{pairwise node disjoint chains from S to T}=min{∣D∣:D an S,T disconnecting set of nodes}.
- Lemma 8.1 (p. 46): every independent set J of arcs of the bipartite graph of P yields a decomposition Δ of P with ∣J∣+∣Δ∣=n.
- Lemma 8.2 (p. 47): every proper cover X yields a set U of mutually unrelated elements with ∣X∣+∣U∣=n.
- Dilworth's theorem (p. 45): the maximal number of mutually unrelated elements of P equals the number of chains in a minimal decomposition. This is a reference to the published
AppliedComb.Posets.dilworth.
Significance
Theorem 7.1 contains both classical Euler criteria: for an undirected graph condition 3 is vacuous, and for a directed graph, applied to single nodes and their complements, it forces equal in- and out-degrees. In the mixed case, condition 3 is a cut condition over all node subsets, which is what makes unicursality decidable by one feasible-circulation computation. That computation is the first step of the Edmonds–Johnson treatment of the mixed Chinese postman problem (Edmonds & Johnson, 1973). Lemmas 8.1 and 8.2 are the bridge by which König's theorem gives Dilworth's theorem, and through it minimal chain decompositions that a bipartite matching algorithm can compute.
All results here are classical and proved; none of the book's statements has been formalized in this form. The platform has Proved formalizations of König's theorem and of Dilworth's theorem, used here as references. It also has an undirected set-to-set Menger theorem (Menger.menger_set), Euler's criterion for undirected multigraphs (AppliedComb.Graphs.eulerian_iff), and the existence of an Euler tour in a connected, even, symmetric mixed graph (ChinesePostman.Mixed.mixed_euler_tour). That last result is one step of the sufficiency direction of Theorem 7.1, not the theorem itself. The directed, node-disjoint, set-to-set Menger theorem and the mixed-graph criterion are new.
Difficulty
Necessity in Theorem 7.1 is a counting argument. Sufficiency is not: conditions 2 and 3 do not by themselves say which way to orient each undirected arc. A wrong local choice can leave a node unbalanced with no way to repair it, so a greedy orientation does not work. The global information is the cut condition over all 2∣N∣ subsets, and turning it into an orientation needs a feasibility theorem for circulations with integral solutions. Only then does the classical Euler argument apply, and that argument also needs an induction that splits off closed routes and reassembles connected pieces. For Lemma 8.2 it is showing that a proper cover never contains both copies xi and yi of an element; this uses transitivity, and finding F2 shows it fails without it.
Formalization scope
Nodes are a Fintype with decidable equality. A mixed graph has directed arcs in a Finset (N × N) and undirected arcs in a Finset (Sym2 N); an arc is an element of (N × N) ⊕ Sym2 N. A closed route with m arcs is a pair of maps Fin (m+1) → N and Fin m → MixedArc N, and "each arc exactly once" is injectivity plus surjectivity onto the arcs of G. Unicursality is defined by the existence of such a route, never by conditions 1–3, and condition 3 is quantified over every subset X⊆N with the difference taken in Z. These two choices rule out the trivializing formalization in which "unicursal" is defined by the theorem's own conditions or condition 3 is checked only at single nodes. Connectedness includes nonemptiness of N, so the empty graph is neither unicursal nor connected.
For §4, chains are lists of distinct nodes, and Theorem 4.2 states the maximum and the minimum as attained (IsGreatest, IsLeast) with a common value. For §8, P is Fin n with a relation carrying IsStrictOrder; the bipartite graph's nodes are Fin n ⊕ Fin n, and a decomposition is a Finpartition of Fin n into chains.
Beyond the paper. Two variant items stand beside the faithful statements. [Strengthened] Lemma 8.1 replaces the partial order by any relation without directed cycles. The book asserts this on p. 47, and the proof uses only that an independent arc set gives each element at most one successor and one predecessor (finding F1). [Sharpness probe] Lemma 8.2 makes the same weakening for Lemma 8.2 and is expected to be false: on five elements 0,…,4 with 0≻1, 0≻2, 0≻3, 1≻4, 2≻4, 3≻4 and no other relations, {y1,y2,y3,x1,x2,x3} is a proper cover of size 6>n (finding F2).
A complete development needs Euler-tour infrastructure for mixed graphs, Hoffman's circulation theorem with integrality, and integral max-flow for Menger. Of these, the circulation theorem is the subject of a sibling mission (Flows in Networks III). Proofs of any item by any method are welcome, including direct combinatorial proofs that avoid flows.
Selected references
- L. R. Ford, Jr. and D. R. Fulkerson, Flows in Networks, The RAND Corporation, Report R-375-PR, 1962; Princeton University Press, 1962. https://doi.org/10.1515/9781400875184
- 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
- K. Menger, Zur allgemeinen Kurventheorie, Fundamenta Mathematicae 10 (1927), 96–115. https://doi.org/10.4064/fm-10-1-96-115
- R. P. Dilworth, A decomposition theorem for partially ordered sets, Annals of Mathematics 51 (1950), 161–166. https://doi.org/10.2307/1969503
- D. König, Gráfok és mátrixok, Matematikai és Fizikai Lapok 38 (1931), 116–119.