The BEST theorem #
An Eulerian circuit of a finite multidigraph src tgt : E → V is a closed walk that uses every
arc exactly once. Fixing the arc e₀ with which it starts, it is a duplicate-free list of all the
arcs, starting with e₀, in which each arc ends where the next one starts and the last one ends
where e₀ starts (Cslib.Multidigraph.IsEulerianCircuit). Every Eulerian circuit is a rotation of
exactly one that starts with e₀, so these are the Eulerian circuits counted up to rotation.
The BEST theorem (named after de Bruijn, van Aardenne-Ehrenfest, Smith and Tutte; the result
is due to van Aardenne-Ehrenfest and de Bruijn [vAdB51], while Smith and
Tutte [ST41] counted a special class) counts them. If every vertex has as many outgoing as
incoming arcs and at least one outgoing arc, the number of Eulerian circuits starting with e₀ is
τ * ∏ v, (d⁺ v - 1)!, where τ is the number of spanning in-arborescences rooted at the source
of e₀ and d⁺ v is the number of arcs out of v (Cslib.Multidigraph.natCard_isEulerianCircuit;
[Sta13], Theorem 10.2). With the directed matrix-tree theorem, τ is the determinant of the
reduced Laplacian (Cslib.Multidigraph.natCard_isEulerianCircuit_eq_det_mul; [Sta13],
Corollary 10.5). The source assumes a connected balanced digraph. Connected and balanced with at
least one arc implies that every vertex has an outgoing arc, so the hypotheses here are weaker:
connectivity is not assumed, and a multidigraph that is not connected and in which every vertex
has an outgoing arc has neither Eulerian circuits nor spanning arborescences. Conversely, a
multidigraph with an Eulerian circuit is balanced
(Cslib.Multidigraph.IsEulerianCircuit.card_filter_src_eq).
The proof sorts the arcs out of each vertex v in the order in which a circuit uses them. For
v ≠ r = src e₀ the last of these arcs is the last exit from v, and the last exits form a
spanning in-arborescence rooted at r: the last arc of the circuit leaving a set of vertices that
never reach r would have to end inside that set. The orders determine the circuit, since the
next arc is always the first unused arc out of the current vertex. Conversely, any orders that
start with e₀ at r and end with the arc of a fixed arborescence everywhere else are realized:
the walk that always takes the next arc in the order can stop only at r once all arcs out of r
are used, by the balance, and then every arc is used, because the set of vertices with unused arcs
is closed under following the arborescence and avoids r. There are (d⁺ v - 1)! such orders at
each vertex.
Main definitions #
Cslib.Multidigraph.IsEulerianCircuit: Eulerian circuits starting with a given arc.
Main results #
Cslib.Multidigraph.natCard_isEulerianCircuit: the BEST theorem.Cslib.Multidigraph.natCard_isEulerianCircuit_eq_det_mul: the BEST theorem with the number of arborescences given by the directed matrix-tree theorem.Cslib.Multidigraph.IsEulerianCircuit.equivRotate,Cslib.Multidigraph.IsEulerianCircuit.coe_equivRotate,Cslib.Multidigraph.IsEulerianCircuit.coe_equivRotate_symm,Cslib.Multidigraph.natCard_isEulerianCircuit_eq,Cslib.Multidigraph.natCard_isInArborescence_eq_of_isEulerianCircuit: independence of the Eulerian-circuit count from the starting arc and root independence of the arborescence count ([Sta13], Corollary 10.3).Cslib.Multidigraph.IsEulerianCircuit.card_filter_src_eq: a multidigraph with an Eulerian circuit is balanced.
References #
- R. P. Stanley, Topics in Algebraic Combinatorics, Chapter 10: Theorem 10.2, Corollary 10.3, Theorem 10.4, and Corollary 10.5, with the last-exit proof followed here.
- T. van Aardenne-Ehrenfest, N. G. de Bruijn, Circuits and trees in oriented linear graphs (Theorem 5a, according to [Sta13]; the primary source was not inspected)
- C. A. B. Smith, W. T. Tutte, On unicursal paths in a network of degree 4
l is an Eulerian circuit of the multidigraph src tgt : E → V starting with the arc
e₀: a list of all the arcs, each exactly once, starting with e₀, in which each arc ends where
the next one starts and the last arc ends where e₀ starts.
- nodup : l.Nodup
No arc is used twice.
- mem (e : E) : e ∈ l
Every arc is used.
The circuit starts with
e₀.- isChain : List.IsChain (fun (a b : E) => tgt a = src b) l
Each arc ends where the next one starts.
The last arc ends where
e₀starts.
Lists #
Counting orders #
Walks #
A multidigraph with an Eulerian circuit is balanced: every vertex has as many outgoing as incoming arcs. This is the necessity half of [Sta13], Theorem 10.1.
Last exits #
The circuit is determined by the orders of the arcs out of each vertex #
Every admissible family of orders is realized #
Counting #
The BEST theorem [vAdB51] ([Sta13], Theorem 10.2). In a
finite multidigraph in which every vertex has as many outgoing as incoming arcs, and at least one
outgoing arc, the number of Eulerian circuits starting with the arc e₀ is the number of spanning
in-arborescences rooted at the source of e₀, times ∏ v, (d⁺ v - 1)!, where d⁺ v is the
number of arcs out of v. The source assumes a connected balanced digraph, which implies these
hypotheses; connectivity is not needed.
The BEST theorem, determinant form ([Sta13], Corollary 10.5). In a finite
multidigraph in which every vertex has as many outgoing as incoming arcs, and at least one
outgoing arc, the number of Eulerian circuits starting with the arc e₀ is the determinant of the
reduced Laplacian of the arc-count matrix, with the row and column of the source of e₀ deleted,
times ∏ v, (d⁺ v - 1)!.
Rotation of Eulerian circuits and root independence #
Cyclic rotation gives a bijection between Eulerian circuits starting with e₀ and Eulerian
circuits starting with e₁ ([Sta13], proof of Corollary 10.3, p. 193).
The number of Eulerian circuits starting with a fixed arc e₀ is independent of e₀
([Sta13], proof of Corollary 10.3, p. 193).
Root independence of the arborescence count ([Sta13], Corollary 10.3, p. 193). On a
finite balanced multidigraph in which every vertex has an outgoing arc, any two arcs e₀ and e₁
yield equal spanning in-arborescence counts at their sources src e₀ and src e₁; more generally,
Multidigraph.natCard_isInArborescence_eq establishes root independence across all vertices of any
finite balanced multidigraph.