maths2u
Tier
⌕ Search ⌘K
Theorem

Euler's theorem on circuits

T-033Home MU-105Threads structure · number
Statement

Let \( G = (V, E) \) be a finite, connected multigraph (parallel edges and loops permitted, with the convention that a loop at \( v \) contributes \( 2 \) to \( \deg(v) \)) with at least one edge. Then \( G \) admits an Eulerian circuit — a closed walk \( v_0 e_1 v_1 e_2 \cdots e_m v_m = v_0 \) that traverses every edge of \( G \) exactly once — if and only if every vertex of \( G \) has even degree: \[ \exists \text{ Eulerian circuit in } G \iff \forall v \in V : \deg(v) \equiv 0 \pmod{2}. \]

Why it matters

This is the founding theorem of graph theory: Euler's 1736 resolution of the Königsberg bridge problem was the first time a question about a physical configuration was answered by abstracting it to vertices and edges and arguing about pure incidence structure. It is also the archetype of a good characterisation: a global, existential property (a single closed walk covering all edges) is decided by a purely local, trivially checkable condition (degree parity at each vertex).

Beyond its historical role, the theorem is the engine behind linear-time algorithms (Hierholzer), the polynomial solvability of the route-inspection ("Chinese postman") problem, the construction of de Bruijn sequences, and modern Eulerian-path methods in genome assembly. The stark contrast with the Hamiltonian circuit problem — identical-looking question about vertices instead of edges, yet NP-complete — makes it a standing lesson in how fragile algorithmic tractability is.

Hypotheses
Hypothesis.\( G \) is connected. Drop this and parity is not enough: take two vertex-disjoint triangles. Every vertex has degree \( 2 \) (even), but any circuit stays inside one component, so no single closed walk can traverse all six edges.
Hypothesis.Every vertex has even degree. Drop this and no Eulerian circuit can exist: the Königsberg multigraph has degrees \( 5, 3, 3, 3 \); more simply, a single edge \( uv \) gives \( \deg(u) = \deg(v) = 1 \), and a closed walk leaving \( u \) must return, forcing an even number of edge-uses at \( u \).
Hypothesis.\( G \) is finite. The two-way infinite path on vertex set \( \mathbb{Z} \), with edges \( \{n, n+1\} \) for all \( n \in \mathbb{Z} \), is connected and every vertex has degree \( 2 \), yet it has no Eulerian circuit: a circuit is a finite closed walk and cannot traverse infinitely many edges. (Infinite Eulerian lines require the separate Erdős–Grünwald–Vázsonyi conditions.)
Hypothesis.Loop convention: a loop counts \( 2 \) toward the degree. If loops were counted once, the single-vertex graph with one loop would have "odd degree" \( 1 \) yet plainly has an Eulerian circuit (traverse the loop). The convention is forced by the handshake identity \( \sum_{v} \deg(v) = 2\lvert E \rvert \) and makes the theorem exceptionless.
Hypothesis.\( G \) has at least one edge. Purely to make "circuit" non-vacuous: the one-vertex edgeless graph satisfies the parity condition and carries only the empty closed walk. Excluding it avoids a degenerate case rather than a genuine failure.
Proof
1
(\( \Rightarrow \), necessity.) Let \( W = v_0 e_1 v_1 \cdots e_m v_m \) with \( v_m = v_0 \) be an Eulerian circuit, and fix \( v \in V \). Each internal occurrence \( v_i = v \) with \( 0 \lt i \lt m \) uses exactly two edge-ends at \( v \): one end of \( e_i \) (arrival) and one end of \( e_{i+1} \) (departure).
Definition of a walk: consecutive edges share the intermediate vertex, so every passage through \( v \) consumes an incoming and an outgoing edge-end. A loop at \( v \) traversed as \( e_i \) supplies both of its two ends at \( v \) in a single traversal, consistent with the convention \( \deg \)-contribution \( 2 \). A
2
If \( v = v_0 \), the boundary occurrence \( v_0 = v_m \) likewise uses exactly two edge-ends at \( v \): one end of \( e_1 \) and one end of \( e_m \). Hence the total number of edge-ends at \( v \) used by \( W \) is \( 2k \), where \( k \) is the number of occurrences of \( v \) in \( W \) (counting \( v_0, v_m \) as one). Since \( W \) traverses each edge of \( G \) exactly once, it uses every edge-end at \( v \) exactly once, so \[ \deg(v) = 2k \equiv 0 \pmod 2 . \]
The circuit is closed (\( v_m = v_0 \)), so the start/end occurrence pairs up like any other; "Eulerian" means the multiset of traversed edges equals \( E \), so counting used edge-ends counts \( \deg(v) \). B
3
Exit Lemma. Let \( H \) be a finite multigraph in which every vertex has even degree, and let \( u \) satisfy \( \deg_H(u) \gt 0 \). Then \( H \) contains a closed trail of positive length beginning and ending at \( u \).
Proof of Lemma. Grow a trail from \( u \) greedily, never repeating an edge. Suppose the trail currently ends at \( w \neq u \). Count edge-ends at \( w \) used so far: each earlier full passage through \( w \) used \( 2 \), and the final arrival used \( 1 \), so the number used is odd. Since \( \deg_H(w) \) is even, used \( \lt \deg_H(w) \), so an unused edge-end at \( w \) remains and the trail can be extended. As \( H \) is finite the extension process must halt, and by the above it can only halt at \( u \); the first step out of \( u \) exists because \( \deg_H(u) \gt 0 \). The halted trail is closed and has positive length. \( \square \) C
4
(\( \Leftarrow \), sufficiency.) Assume every vertex of \( G \) has even degree. Since \( E \neq \emptyset \), pick \( u \) with \( \deg_G(u) \gt 0 \). By the Exit Lemma (Step 3) the set of closed trails in \( G \) of positive length is nonempty; since \( G \) is finite, choose a closed trail \( T \) with the maximum number of edges.
A nonempty finite set of natural numbers (the possible trail lengths, bounded by \( \lvert E \rvert \)) attains its maximum — no Zorn-type argument is needed in the finite case. A
5
Suppose, for contradiction, that \( T \) does not traverse every edge, and set \( H = G - E(T) \) (delete the edges of \( T \), keep all vertices), so \( E(H) \neq \emptyset \). Then every vertex of \( H \) has even degree: \[ \deg_H(v) = \deg_G(v) - t(v), \] where \( t(v) \) is the number of edge-ends at \( v \) used by \( T \); by the counting of Steps 1–2 applied to the closed trail \( T \), \( t(v) \) is even, and \( \deg_G(v) \) is even by hypothesis, so \( \deg_H(v) \) is even.
Steps 1–2 used only that \( W \) is a closed trail (no edge repeated, endpoints equal), never that it was Eulerian, so the parity count applies verbatim to \( T \). The difference of two even integers is even. B
6
There exists a vertex \( w \in V(T) \) (a vertex visited by \( T \)) with \( \deg_H(w) \gt 0 \).
Let \( S = V(T) \neq \emptyset \). If \( V \setminus S = \emptyset \), every vertex lies on \( T \), so any edge of \( H \) is incident to a vertex of \( T \) and we are done. Otherwise suppose no edge of \( H \) has an endpoint in \( S \). Every edge of \( T \) has both endpoints in \( S \) (a trail visits the ends of each edge it uses), and \( E(G) = E(T) \cup E(H) \), so no edge of \( G \) joins \( S \) to \( V \setminus S \). But \( S \) and \( V \setminus S \) are both nonempty, so \( G \) is disconnected — contradicting the connectivity hypothesis. Hence some \( H \)-edge meets \( S \), giving the required \( w \). C
7
Apply the Exit Lemma (Step 3) to \( H \) at \( w \): there is a closed trail \( T' \) in \( H \) of positive length starting and ending at \( w \), and \( T' \) is edge-disjoint from \( T \) since \( E(H) \cap E(T) = \emptyset \).
Step 5 verified the Lemma's parity hypothesis for \( H \); Step 6 verified \( \deg_H(w) \gt 0 \). Edge-disjointness is by construction of \( H \). B
8
Splice. Write \( T = u \cdots w \cdots u \), choosing any occurrence of \( w \) on \( T \). Define \[ T^{*} = (u \cdots w) \,\cdot\, T' \,\cdot\, (w \cdots u), \] i.e. follow \( T \) until it reaches \( w \), detour around all of \( T' \), then complete \( T \). Then \( T^{*} \) is a closed trail with \( \lvert E(T^{*}) \rvert = \lvert E(T) \rvert + \lvert E(T') \rvert \gt \lvert E(T) \rvert \) — contradicting the maximality of \( T \) from Step 4.
\( T^{*} \) is a walk because consecutive pieces share the junction vertex \( w \); it is a trail because \( T \) and \( T' \) individually repeat no edge and are mutually edge-disjoint (Step 7); it is closed because it starts and ends at \( u \). B
9
Therefore the supposition of Step 5 fails: \( E(H) = \emptyset \), i.e. \( T \) traverses every edge of \( G \) exactly once. \( T \) is an Eulerian circuit, completing the sufficiency direction and the proof. \( \blacksquare \)
Reductio ad absurdum: Steps 5–8 derived a contradiction from \( E(H) \neq \emptyset \). A
Result
\[ G \text{ finite, connected, } E \neq \emptyset : \quad G \text{ has an Eulerian circuit} \iff \forall v \in V,\ \deg(v) \equiv 0 \pmod 2 \]

Reading. You can walk around a connected network, using every link exactly once and returning to your start, precisely when every junction has an even number of links: each visit to a junction pairs one way in with one way out, so nothing can be left unpaired.

Scope. Applies to all finite connected multigraphs with at least one edge — parallel edges and loops allowed (loops counting twice toward degree). It does not apply as stated to disconnected graphs (apply it componentwise to the components carrying edges), to infinite graphs, or to digraphs (where the correct condition is \( \deg^{+}(v) = \deg^{-}(v) \) at every vertex together with connectivity of the underlying graph).

Corollaries & converses
  • Eulerian trail (open) version. A finite connected graph has an open trail using every edge exactly once iff it has exactly two vertices of odd degree; the trail must run between them. (Join the two odd vertices by a new edge, apply the theorem, delete the new edge — Problem 3.)
  • Veblen's theorem (one direction for free). If every vertex of \( G \) has even degree, then \( E(G) \) partitions into edge-disjoint cycles: cut the Eulerian circuit of each edge-bearing component at its repeated vertices (Problem — see Discussion).
  • Handshake constraint. The number of odd-degree vertices in any finite graph is even (\( \sum_v \deg(v) = 2\lvert E \rvert \)); hence "exactly one odd vertex" can never occur, and pen-stroke puzzles have only the cases \( 0 \) or \( 2 \).
  • Directed analogue. A digraph whose underlying graph is connected has a directed Eulerian circuit iff \( \deg^{+}(v) = \deg^{-}(v) \) for all \( v \); a consequence is that such a digraph is automatically strongly connected (Problem 5).
  • Converse. The theorem is already a biconditional. But note the asymmetry of hypotheses: necessity (\( \exists \) circuit \( \Rightarrow \) all degrees even) holds without any connectivity assumption, whereas sufficiency genuinely needs connectivity — two disjoint triangles have all degrees even and no Eulerian circuit. So "all even \( \Rightarrow \) Eulerian" is false as a freestanding converse-style claim; the correct repair is: all degrees even iff each component is Eulerian or edgeless.
Fails without
  • Connectivity dropped. \( G = \) two disjoint triangles \( \{a,b,c\} \) and \( \{x,y,z\} \): every degree is \( 2 \), yet a closed walk starting in one triangle can never reach the other (walks move along edges, and there are none between the components), so no single circuit covers all \( 6 \) edges.
  • Even degrees dropped. The Königsberg multigraph: vertices \( A, B, C, D \) with \( \deg(A) = 5 \), \( \deg(B) = \deg(C) = \deg(D) = 3 \). It is connected, but by the necessity direction (Steps 1–2) any Eulerian circuit would force all degrees even — so none exists; indeed with four odd vertices not even an open Eulerian trail exists.
  • Finiteness dropped. The double ray on \( \mathbb{Z} \) (edges \( \{n, n+1\} \), \( n \in \mathbb{Z} \)): connected, all degrees \( 2 \), no Eulerian circuit — any circuit is a finite walk. The maximality argument of Step 4 also collapses: trail lengths are unbounded and no maximum exists.
Common errors
  • Euler–Hamilton conflation. Concluding facts about visiting every vertex once (Hamiltonian) from a theorem about every edge once. \( K_4 \) is Hamiltonian but not Eulerian (all degrees \( 3 \)); the "bowtie" (two triangles sharing a vertex) is Eulerian but not Hamiltonian.
  • Forgetting connectivity. Announcing "all degrees even, so Eulerian" for a graph never checked to be connected. Parity is local; the circuit is global.
  • "No repeated vertices" misreading. An Eulerian circuit may revisit vertices freely — only edges are used once. Students often reject a correct circuit because a vertex appears twice (the bowtie's circuit must pass its centre twice).
  • Parity of the sum instead of each vertex. Checking that \( \sum_v \deg(v) \) is even proves nothing: it is always even by the handshake lemma. Each individual degree must be even.
  • Loop miscounting. Counting a loop as \( 1 \) toward its vertex's degree, which corrupts every parity check in multigraphs.
  • Wrong digraph condition. Requiring "even total degree \( \deg^{+} + \deg^{-} \)" in a digraph. A vertex with \( \deg^{+} = 2, \deg^{-} = 0 \) has even total degree but no directed circuit can pass through it twice outward without ever entering; the correct condition is \( \deg^{+} = \deg^{-} \).
  • Greedy overconfidence. Assuming any edge-greedy closed trail is automatically Eulerian. A maximal trail need not be maximum; the splice of Step 8 (or Fleury's don't-burn-bridges rule) is exactly what repairs a stuck trail.
Discussion

Euler presented his solution of the Königsberg bridge problem to the St Petersburg Academy in 1735, publishing it as Solutio problematis ad geometriam situs pertinentis (1736). The paper is routinely cited as the birth certificate of graph theory — and of topology, via Leibniz's phrase geometria situs, "the geometry of position": Euler saw that distances and shapes were irrelevant and only the incidence pattern mattered. Historical honesty requires a caveat: Euler carefully proved necessity and asserted sufficiency with only a sketch; the first complete published proof of sufficiency is Hierholzer's, appearing posthumously in 1873. The splice argument in Steps 4–8 above is essentially Hierholzer's, and run as an algorithm with appropriate data structures it constructs the circuit in \( \mathcal{O}(\lvert E \rvert) \) time.

The theorem is a paradigm of a good characterisation: membership ("Eulerian") and non-membership ("some odd vertex" or "disconnected") both come with short certificates. Contrast the Hamiltonian circuit problem, which asks the visually similar question for vertices and is NP-complete: no local condition can capture it unless P \( = \) NP. This single contrast — edges tractable, vertices intractable — recurs throughout combinatorial optimisation. It also explains why the route-inspection (Chinese postman) problem is polynomial: to traverse every edge of a connected graph at least once and return, one duplicates a minimum-weight set of paths pairing up the odd-degree vertices (a minimum-weight perfect matching on the odd vertices), thereby manufacturing the even-degree condition and then invoking this theorem.

Applications flow through the directed version. The de Bruijn digraph \( B(k, n) \) — vertices the words of length \( n - 1 \) over a \( k \)-letter alphabet, edges the words of length \( n \) — has \( \deg^{+} = \deg^{-} = k \) everywhere and is connected, so it carries a directed Eulerian circuit; reading off the circuit yields a de Bruijn sequence, a cyclic word of length \( k^{n} \) containing every length-\( n \) word exactly once. The BEST theorem (de Bruijn–van Aardenne-Ehrenfest–Smith–Tutte) goes further and counts Eulerian circuits in a digraph via arborescences and the matrix-tree theorem — whereas counting Eulerian circuits in undirected graphs is #P-complete. The same circle of ideas underlies Eulerian-path genome assemblers, which recover a DNA sequence as an Eulerian path in a k-mer de Bruijn graph rather than a Hamiltonian path in an overlap graph, precisely because the former is computable at scale.

Structurally, the even-degree condition says that \( E(G) \) is a member of the cycle space \( \mathcal{Z}(G) \subseteq \mathbb{F}_2^{E} \), the kernel of the incidence map \( \partial : \mathbb{F}_2^{E} \to \mathbb{F}_2^{V} \); Veblen's theorem identifies \( \mathcal{Z}(G) \) with the sets of edges expressible as disjoint unions of cycles, and Euler's theorem then reads: the full edge set is a sum of cycles that can be concatenated into one closed trail exactly when \( G \) is connected. For infinite graphs the naive statement fails (see "Fails without"), and the correct analogues are the Erdős–Grünwald–Vázsonyi theorems (1938) characterising one-way and two-way infinite Eulerian trails in countable graphs — conditions involving finitely many odd vertices and the behaviour of ends. Common misconceptions. "One pen stroke" puzzles are about open trails, not circuits: the house-of-Santa-Claus figure is drawable in one stroke (exactly two odd vertices) but you cannot end where you began. And even-degree everywhere does not make a graph Eulerian without connectivity — it makes each edge-bearing component Eulerian separately.

Worked examples

Example 1 (Königsberg, 1736). The city had four land masses — north bank \( B \), south bank \( C \), island \( A \) (Kneiphof), east bank \( D \) — joined by seven bridges: \( A \)–\( B \) twice, \( A \)–\( C \) twice, and one bridge each for \( A \)–\( D \), \( B \)–\( D \), \( C \)–\( D \). Can a stroll cross every bridge exactly once and return home?

1
Model the city as a multigraph \( G \): \( V = \{A, B, C, D\} \), with edge multiplicities \( m(AB) = m(AC) = 2 \), \( m(AD) = m(BD) = m(CD) = 1 \); so \( \lvert E \rvert = 7 \). A closed stroll crossing each bridge once is exactly an Eulerian circuit of \( G \).
Abstraction step: only incidences matter, distances and geography are discarded — this is the move Euler introduced. B
2
Compute degrees: \[ \deg(A) = 2 + 2 + 1 = 5, \qquad \deg(B) = 2 + 1 = 3, \qquad \deg(C) = 2 + 1 = 3, \qquad \deg(D) = 1 + 1 + 1 = 3. \]
Degree of a vertex in a multigraph is the sum of the multiplicities of its incident edges. A
3
All four degrees are odd. By the necessity direction of Euler's theorem, no Eulerian circuit exists. Moreover four vertices have odd degree, so by the open-trail corollary (which allows exactly two), no Eulerian trail exists either: the walk is impossible even without the requirement of returning home.
Necessity direction (Steps 1–2 of the Proof) applied contrapositively; the open-trail criterion is the corollary proved in Problem 3. A
\[ \text{The Königsberg walk is impossible: all four degrees } (5,3,3,3) \text{ are odd.} \]

Reading. Every land mass would need an even number of bridges for a round trip; every single one has an odd number, so the tour fails at every possible starting point.

Scope. The verdict is unconditional — it rules out every conceivable route, not merely the routes people had tried; this totality is what pure parity reasoning buys.

Example 2 (\( K_5 \): existence and explicit construction by Hierholzer splicing). Let \( K_5 \) have vertices \( \{1, 2, 3, 4, 5\} \) and all \( \binom{5}{2} = 10 \) edges. Decide whether an Eulerian circuit exists and construct one.

1
\( K_5 \) is connected and each vertex has degree \( 5 - 1 = 4 \), which is even. By the sufficiency direction of Euler's theorem, an Eulerian circuit exists.
Direct application of the theorem; connectivity of \( K_n \) is immediate since every pair of vertices is adjacent. A
2
Start a closed trail: \( T_0 = 1\,2\,3\,1 \), using edges \( \{12, 23, 31\} \). Remaining edges: \( \{14, 15, 24, 25, 34, 35, 45\} \) — nonempty, so \( T_0 \) is not yet Eulerian.
This is the Exit Lemma in action: from vertex \( 1 \) the greedy trail can only close up at \( 1 \). A
3
Vertex \( 1 \) lies on \( T_0 \) and still has unused edges (\( 14, 15 \)). Find a closed trail among unused edges from \( 1 \): \( T' = 1\,4\,2\,5\,1 \), using \( \{14, 42, 25, 51\} \). Splice \( T' \) into \( T_0 \) at vertex \( 1 \): \[ T_1 = 1\,4\,2\,5\,1\,2\,3\,1, \] a closed trail with \( 7 \) edges. Remaining: \( \{34, 45, 35\} \).
Splice step (Step 8 of the Proof): trails sharing the junction vertex \( 1 \) and edge-disjoint by construction concatenate into a longer closed trail. B
4
Vertex \( 3 \) lies on \( T_1 \) and the unused edges form the triangle \( 3\,4\,5\,3 \). Splice at \( 3 \): \[ T_2 = 1\,4\,2\,5\,1\,2\,3\,4\,5\,3\,1 . \] Edge check: \( 14, 42, 25, 51, 12, 23, 34, 45, 53, 31 \) — ten distinct edges, i.e. all of \( E(K_5) \), each used once; the walk starts and ends at \( 1 \).
Verification against the definition of an Eulerian circuit: closed, no edge repeated, all \( 10 \) edges present. The algorithm terminates because each splice strictly increases the edge count, bounded by \( \lvert E \rvert = 10 \). B
\[ 1 \to 4 \to 2 \to 5 \to 1 \to 2 \to 3 \to 4 \to 5 \to 3 \to 1 \ \text{ is an Eulerian circuit of } K_5. \]

Reading. Parity guaranteed the circuit in one line; two rounds of Hierholzer splicing then produced it explicitly. Note the circuit revisits vertices \( 1, 2, 3, 4, 5 \) repeatedly — only edges are used once.

Scope. The same two-phase pattern (parity check, then splice until no edges remain) constructs an Eulerian circuit in any finite connected even-degree multigraph in \( \mathcal{O}(\lvert E \rvert) \) time.

Problems
  1. Does the complete bipartite graph \( K_{2,4} \) have an Eulerian circuit? If so, exhibit one; if not, prove it.
    Solution

    Let the parts be \( \{a, b\} \) and \( \{1, 2, 3, 4\} \). Every vertex in the first part has degree \( 4 \); every vertex in the second part has degree \( 2 \). All degrees are even, and \( K_{2,4} \) is connected (any two vertices are joined via a vertex of the opposite part). By Euler's theorem an Eulerian circuit exists. Explicitly: \[ a \to 1 \to b \to 2 \to a \to 3 \to b \to 4 \to a, \] which uses the edges \( a1, 1b, b2, 2a, a3, 3b, b4, 4a \) — eight distinct edges, and \( \lvert E(K_{2,4}) \rvert = 2 \cdot 4 = 8 \), so every edge is used exactly once and the walk is closed. It is an Eulerian circuit.

  2. For which \( n \geq 2 \) does \( K_n \) have an Eulerian circuit? For which \( m, n \geq 1 \) does \( K_{m,n} \)?
    Solution

    \( K_n \): it is connected, and every vertex has degree \( n - 1 \). By Euler's theorem, \( K_n \) is Eulerian iff \( n - 1 \) is even, i.e. iff \( n \) is odd. So the answer is: all odd \( n \geq 3 \) (e.g. \( K_3, K_5, K_7, \ldots \)), and no even \( n \) — for even \( n \) every vertex is odd, so by necessity there is no circuit (indeed for even \( n \geq 4 \) there are at least four odd vertices, so not even an open Eulerian trail).

    \( K_{m,n} \): it is connected for \( m, n \geq 1 \). Vertices in the \( m \)-side have degree \( n \); vertices in the \( n \)-side have degree \( m \). By Euler's theorem, \( K_{m,n} \) is Eulerian iff both \( m \) and \( n \) are even (and positive, so that edges exist). E.g. \( K_{2,2} \) (the \( 4 \)-cycle) and \( K_{2,4} \) are Eulerian; \( K_{2,3} \) and \( K_{3,3} \) are not.

  3. Prove the open-trail corollary: a finite connected graph \( G \) has an Eulerian trail (an open walk traversing every edge exactly once) if and only if it has exactly two vertices of odd degree; and any such trail runs between the two odd vertices.
    Solution

    (\( \Leftarrow \)) Suppose exactly two vertices \( x \neq y \) have odd degree. Form the multigraph \( G^{+} = G + e^{*} \), where \( e^{*} \) is a new edge joining \( x \) and \( y \) (allowed even if \( x, y \) are already adjacent, since we work with multigraphs). In \( G^{+} \), the degrees of \( x \) and \( y \) increase by \( 1 \) and become even, and all other degrees are unchanged and even; \( G^{+} \) is connected because \( G \) is. By Euler's theorem, \( G^{+} \) has an Eulerian circuit \( C \). Since a circuit is a cyclic object, re-root \( C \) so that \( e^{*} \) is its first edge: \( C = x \, e^{*} \, y \cdots x \). Deleting the initial \( e^{*} \) leaves a trail from \( y \) to \( x \) that uses every edge of \( G \) exactly once — an Eulerian trail between the odd vertices.

    (\( \Rightarrow \)) Suppose \( G \) has an Eulerian trail \( W \) from \( x \) to \( y \), \( x \neq y \). The edge-end count of Steps 1–2 of the main proof shows: at every vertex \( v \notin \{x, y\} \) the trail uses edge-ends in pairs, so \( \deg(v) \) is even; at \( x \) the initial departure is unpaired, so \( \deg(x) \) is odd, and symmetrically \( \deg(y) \) is odd. Hence exactly two vertices are odd. (If \( x = y \), the trail is a circuit and all degrees are even — the case of the main theorem, with zero odd vertices.) The handshake lemma confirms consistency: the number of odd vertices is always even, so "exactly one odd vertex" can never arise.

  4. A standard "double-six" domino set consists of all \( 28 \) tiles \( [i \mid j] \) with \( 0 \leq i \leq j \leq 6 \). Tiles may be laid end to end when the touching halves show the same number. Prove that the entire set can be arranged in a single closed ring.
    Solution

    Build a multigraph \( G \) with \( V = \{0, 1, \ldots, 6\} \) and one edge per tile: the tile \( [i \mid j] \) with \( i \neq j \) is an edge joining \( i \) and \( j \), and the double \( [i \mid i] \) is a loop at \( i \). A closed ring of all \( 28 \) tiles, matched end to end, is exactly an Eulerian circuit of \( G \): traversing the edge \( [i \mid j] \) corresponds to laying that tile with the \( i \)-end adjoining the previous tile and the \( j \)-end adjoining the next.

    Degrees: each vertex \( i \) is joined to each of the \( 6 \) other vertices by one edge, contributing \( 6 \), and carries one loop, contributing \( 2 \) (loop convention). So \( \deg(i) = 8 \) for every \( i \): all even. \( G \) is connected (it contains \( K_7 \)). By Euler's theorem, an Eulerian circuit exists, and reading off its edges in order gives the closed domino ring. \( \square \)

    Remark. Without the doubles, the \( 21 \) remaining tiles form \( K_7 \), with all degrees \( 6 \) — still even, so a closed ring of the non-doubles also exists; each double \( [i \mid i] \) can then be inserted at any passage through \( i \). By contrast, the analogous "double-seven" set on \( \{0, \ldots, 7\} \) fails: without doubles the underlying graph is \( K_8 \) with all degrees \( 7 \) odd, and doubles only add \( 2 \), so all eight vertices stay odd and no closed ring of the full set exists.

  5. (Directed version.) Let \( D \) be a finite digraph with at least one arc whose underlying graph is connected, and suppose \( \deg^{+}(v) = \deg^{-}(v) \) for every vertex \( v \). Prove that \( D \) has a directed Eulerian circuit, and deduce that \( D \) is strongly connected.
    Solution

    Directed Exit Lemma. If every vertex of a finite digraph \( H \) satisfies \( \deg_H^{+}(v) = \deg_H^{-}(v) \) and \( \deg_H^{+}(u) \gt 0 \), then \( H \) contains a directed closed trail of positive length through \( u \). Proof: extend a directed trail from \( u \), never reusing an arc. If the trail currently ends at \( w \neq u \), then so far it has entered \( w \) one more time than it has left (each earlier passage pairs one entry with one exit; the final arrival is an unmatched entry). Hence used-out \( \lt \) used-in \( \leq \deg_H^{-}(w) = \deg_H^{+}(w) \), so an unused out-arc at \( w \) exists and the trail extends. Finiteness forces termination, which can only occur at \( u \). \( \square \)

    Main argument. Mirror Steps 4–9 of the undirected proof. Choose a directed closed trail \( T \) with the maximum number of arcs (nonempty by the Lemma, since some vertex has \( \deg^{+} \gt 0 \)). If \( T \) misses some arc, let \( H = D - A(T) \). Removing a closed trail removes equally many in-arcs as out-arcs at every vertex (each passage through a vertex uses one of each; the start/end occurrence likewise pairs the first departure with the last arrival), so \( H \) still satisfies \( \deg_H^{+} = \deg_H^{-} \) everywhere. Connectivity of the underlying graph gives, exactly as in Step 6, a vertex \( w \) on \( T \) incident (in either direction) with an arc of \( H \); since at every vertex of \( H \) in-degree equals out-degree, \( \deg_H^{+}(w) \gt 0 \) whenever \( w \) meets any \( H \)-arc (an arc into \( w \) forces \( \deg_H^{-}(w) \gt 0 \), hence \( \deg_H^{+}(w) = \deg_H^{-}(w) \gt 0 \)). The Directed Exit Lemma yields a closed trail \( T' \) in \( H \) through \( w \); splicing \( T' \) into \( T \) at \( w \) produces a strictly longer directed closed trail, contradicting maximality. Hence \( T \) uses every arc: a directed Eulerian circuit.

    Strong connectivity. Every arc lies on the circuit \( T \). First note every vertex lies on \( T \): a vertex \( v \) off \( T \) would have \( \deg^{+}(v) = \deg^{-}(v) = 0 \) (all arcs are on \( T \)), and then \( v \) is isolated in the underlying graph, contradicting its connectivity (as \( D \) has at least one arc, so at least one other vertex). Now for any ordered pair \( (v_1, v_2) \) of vertices on \( T \), follow \( T \) forward from an occurrence of \( v_1 \); since \( T \) is closed and passes through \( v_2 \), a directed \( v_1 \)–\( v_2 \) walk exists. Hence \( D \) is strongly connected. \( \square \)