Math 2.0

Combinatorics Proof

Proof of Euler's theorem on Eulerian circuits by a longest trail

Builds on MultigraphGraphEulerian trailTrailWalkDegree of a vertexConnected graph

Proof

A graph is a special multigraph, so we work with a multigraph G=(V,E,r)G = (V, E, r), where VV and EE are finite. We show necessity by counting, and sufficiency with a longest trail.

  1. Conventions. A walk is a sequence (w0,e1,w1,…,ek,wk)(w_0, e_1, w_1, \dots, e_k, w_k) of vertices wtw_t and edges ete_t. We require r(et)={wt−1,wt}r(e_t) = \set{w_{t-1}, w_t} for each tt. It is a trail if e1,…,eke_1, \dots, e_k are pairwise distinct.
  2. In a graph an edge is determined by its ends, so these are the usual walks and trails. GG is connected if V≠∅V \ne \varnothing and any two vertices are joined by a walk.
  3. Let xx be a vertex and ee an edge. Let mx(e)=2m_x(e) = 2 if ee is a loop at xx, and mx(e)=1m_x(e) = 1 if ee is not a loop and x∈r(e)x \in r(e). Otherwise mx(e)=0m_x(e) = 0. The degree is deg⁡(x)=∑e∈Emx(e)\deg(x) = \sum_{e \in E} m_x(e).
  4. For a condition φ\varphi, let [φ][\varphi] be 11 if φ\varphi holds and 00 otherwise. For each tt, mx(et)=[wt−1=x]+[wt=x]m_x(e_t) = [w_{t-1} = x] + [w_t = x]. Both cases of a loop and a non-loop agree with step 3.
  5. Let WW be a trail as in step 1, and let cW(x)=∑t=1kmx(et)c_W(x) = \sum_{t=1}^{k} m_x(e_t). By step 4, cW(x)=2∑t=1k−1[wt=x]+[w0=x]+[wk=x]c_W(x) = 2 \sum_{t=1}^{k-1} [w_t = x] + [w_0 = x] + [w_k = x] if k≥1k \ge 1.
  6. Hence cW(x)≡[w0=x]+[wk=x](mod2)c_W(x) \equiv [w_0 = x] + [w_k = x] \pmod 2. This also holds for k=0k = 0, where both sides are even.
  7. Necessity. Let WW be an Eulerian circuit. Each edge of GG is exactly one ete_t, so cW(x)=deg⁡(x)c_W(x) = \deg(x) for every xx.
  8. Since w0=wkw_0 = w_k, step 6 gives deg⁡(x)≡2[w0=x]≡0(mod2)\deg(x) \equiv 2[w_0 = x] \equiv 0 \pmod 2. So every vertex has even degree.
  9. Sufficiency. Assume every vertex has even degree. A trail has length at most ∣E∣\abs{E}, so there is a trail W=(w0,e1,…,ek,wk)W = (w_0, e_1, \dots, e_k, w_k) of largest length.
  10. GG has an edge ee, with r(e)={a,b}r(e) = \set{a, b} or {a}\set{a}. Then (a,e,b)(a, e, b) or (a,e,a)(a, e, a) is a trail of length 11. So k≥1k \ge 1.
  11. WW is closed. Suppose w0≠wkw_0 \ne w_k, and let x=wkx = w_k. By step 6, cW(x)c_W(x) is odd, while deg⁡(x)\deg(x) is even.
  12. So cW(x)≠deg⁡(x)c_W(x) \ne \deg(x). Since cW(x)c_W(x) sums mxm_x over the edges of WW, some edge ff not in WW has mx(f)>0m_x(f) > 0, so x∈r(f)x \in r(f).
  13. Let yy be the other end of ff, or y=xy = x if ff is a loop. Then (w0,e1,…,ek,wk,f,y)(w_0, e_1, \dots, e_k, w_k, f, y) is a trail of length k+1k + 1. This contradicts step 9, so w0=wkw_0 = w_k.
  14. Let S={w0,…,wk}S = \set{w_0, \dots, w_k}, and suppose some edge of GG is not in WW. We claim that some edge not in WW has an end in SS.
  15. Suppose not, and take an edge gg not in WW with an end zz. Then z∉Sz \notin S.
  16. Since GG is connected, there is a walk from w0∈Sw_0 \in S to z∉Sz \notin S. Some edge hh of this walk has an end in SS and an end outside SS.
  17. By the assumption in step 15, hh lies in WW. But every edge of WW has both ends in SS, a contradiction.
  18. So there is an edge gg not in WW with an end ws∈Sw_s \in S, where 0≤s≤k0 \le s \le k. Since wk=w0w_k = w_0, we may take s≤k−1s \le k - 1.
  19. Then (ws,es+1,…,ek,wk,e1,w1,…,es,ws)(w_s, e_{s+1}, \dots, e_k, w_k, e_1, w_1, \dots, e_s, w_s) is a trail. It uses the same kk edges as WW, because wk=w0w_k = w_0. For s=0s = 0 it is WW itself.
  20. Appending gg and its other end to this trail, as in step 13, gives a trail of length k+1k + 1. This contradicts step 9.
  21. So the assumption of step 14 fails, and every edge of GG lies in WW. Since WW is a trail, each edge appears exactly once, and w0=wkw_0 = w_k by step 13.
  22. So WW is an Eulerian circuit of GG.

Idea

A trail passes through a vertex by using two of its edges, so only its ends can have an unpaired edge. For necessity this shows all degrees are even. For sufficiency take a longest trail. Even degrees leave a free edge at an open end, so the trail is closed. Connectedness gives a free edge at some vertex of the closed trail, and starting the trail there would make it longer.

Reading path

To understand this page from the ground up, read these 10 pages in order. The foundations come first.

Show the path as a graph
Each page uses the pages above it. The colour of the bar on a box shows how strong the evidence is, and the box also gives it as text. The list has the same pages.
  • no evidence level
  1. Graph definition
  2. Multigraph definition
  3. Neighbourhood definition
  4. Walk definition
  5. Degree of a vertex definition
  6. Reachability definition
  7. Trail definition
  8. Connected graph definition
  9. Eulerian trail definition
  10. Proof of Euler's theorem on Eulerian circuits by a longest trail proof

Where this leads

1 page builds on this one.

Further reading

  1. Web https://arxiv.org/pdf/2308.04512
About this page
TagJSB2RB25Y8
URIm2://JSB2RB25Y8
Kindproof
WritingW0 stub
MSC05C45
ProvesEuler's theorem on Eulerian circuits
UsesMultigraph, Graph, Eulerian trail, Trail, Walk, Degree of a vertex, Connected graph
Changed4 November 2026

Markdown · JSON · Edit on GitHub

What this page needs for W1

  • an inventory row: the row of the inventory that the node accounts for (0 of 1)
  • a source with a locator (0 of 1)

The writing levels say how complete the text of a page is. They do not measure its truth.

What links here

No page links to this page yet.