Eulerian Graphs and Circuits

Can you cross every bridge of a city exactly once and return to where you started? This question was asked of the seven bridges of Königsberg in 1736. It launched graph theory as a subject. Leonhard Euler answered it not by trial and error. Instead, he extracted a simple numerical invariant of the underlying structure. He showed that the answer depends only on the degrees of the vertices. This is one of the earliest examples of a mathematical proof. It shows that a combinatorial search is doomed before it even begins. The idea matters because it exemplifies a recurring theme in discrete mathematics. Local, easily checked conditions can completely determine a global property. Here, the condition is the parity of vertex degrees. The global property is the existence of a circuit traversing every edge exactly once. This property seems hard to verify at first. Unlike its cousin problem — deciding when a graph has a cycle through every vertex — the Eulerian question has a complete answer. That answer is also efficiently checkable. This contrast is itself instructive. It sets up the harder theory of Hamiltonian Graphs. The big picture is this: Eulerian graphs sit at a boundary. That boundary lies between "obviously easy" and "surprisingly deep" problems in graph theory. The characterization theorem is proved by an elegant edge-deletion induction. The same ideas power efficient algorithms for actually constructing an Euler circuit. These include Fleury's algorithm and Hierholzer's algorithm. They apply once you know a circuit exists. These algorithms underlie applications from DNA fragment assembly to street-sweeping route optimization. This article gives the precise definitions of Euler trails and circuits. It states and completely proves the degree-parity characterization. This covers both directed and undirected settings. It works through two non-trivial examples. It shows why every hypothesis in the theorem is load-bearing. It also surveys where Eulerian ideas resurface across mathematics and computer science.

Key takeaways
  • An Euler circuit is a closed walk using every edge of a graph exactly once; an Euler trail does the same but need not close up.
  • A connected graph has an Euler circuit iff every vertex has even degree.
  • A connected graph has an Euler trail (not a circuit) iff it has exactly two vertices of odd degree.
  • The Königsberg bridge graph has four odd-degree vertices, so no Euler trail exists — this is Euler's original 1736 result.
  • The proof is constructive: it produces the circuit by an induction that repeatedly splices in cycles, and this idea becomes Hierholzer's linear-time algorithm.
  • Key idea: parity of degree is the exact obstruction to traversing every edge exactly once.

Where this lives today

Algorithms and routing. Hierholzer's algorithm, a direct descendant of the splicing construction in the proof above, finds an Euler circuit in O(∣E∣)O(|E|) time. It underlies solutions to the Chinese Postman Problem (finding the shortest closed walk covering every edge, relevant to mail delivery, street sweeping, and snow-plow routing), where the degree-parity obstruction tells planners exactly which edges must be duplicated to make a route exist.

Bioinformatics. In DNA sequencing by the de Bruijn graph method, short reads are represented as edges (or vertices, depending on convention) of a large directed graph, and reconstructing the original genome sequence reduces to finding an Euler trail through this graph — a reformulation that replaced the Hamiltonian-path formulation (via overlap graphs) precisely because Eulerian trails are checkable and constructible efficiently, unlike Hamiltonian paths.

Computer science and circuit design. Eulerian circuits appear in the design of universal cycles and de Bruijn sequences (used in cryptographic key-space enumeration and rotor positioning sensors), where a cyclic sequence containing every possible substring of a given length exactly once is built from an Euler circuit of an associated de Bruijn graph.

Topology and combinatorics. The parity argument in the proof — pairing incident edges at each visited vertex — is a prototype for more general "local-to-global" parity arguments seen throughout combinatorics, including arguments about T-joins, matchings, and the structure of Walks, Paths, and Cycles in graph decompositions. The contrast with the NP-complete Hamiltonian Graphs problem is one of the most-cited illustrations in complexity theory of how superficially similar problems can have wildly different computational difficulty.

Puzzle and game design. "Draw this figure without lifting your pen and without retracing a line" puzzles are literally Euler-trail existence questions; the degree criterion gives an instant answer without any trial-and-error tracing.

Ask the tutor: How does the proof's edge-splicing induction turn directly into Hierholzer's linear-time algorithm for constructing an Euler circuit?

DefinitionEuler trails and circuits

Let G=(V,E)G = (V, E) be a finite graph (loops and multiple edges allowed). A walk v0,e1,v1,e2,v2,…,ek,vkv_0, e_1, v_1, e_2, v_2, \dots, e_k, v_k is a trail if e1,…,eke_1, \dots, e_k are pairwise distinct edges (vertices may repeat). A trail is an Euler trail if {e1,…,ek}=E\{e_1, \dots, e_k\} = E, i.e. it uses every edge of GG exactly once. A trail is closed if v0=vkv_0 = v_k. An Euler circuit is a closed Euler trail. A graph is Eulerian if it admits an Euler circuit, and semi-Eulerian if it admits an Euler trail (which may or may not be closed). The directed analogue: in a directed graph DD, a directed trail using every arc exactly once, respecting arc direction, is a directed Euler trail; a closed one is a directed Euler circuit. Throughout, the degree deg⁡(v)\deg(v) of a vertex (undirected case) counts incident edges with loops counted twice, as in the Handshake Lemma; in the directed case we use in-degree deg⁡−(v)\deg^-(v) and out-degree deg⁡+(v)\deg^+(v).

Intuition

Picture a graph as a network of rooms (vertices) connected by doors (edges), and imagine you must walk through every door exactly once. Each time you pass through a vertex vv that is not your start or end point, you use up exactly two of its incident edge-slots: one to enter, one to leave. So every visit to an intermediate vertex consumes edges in pairs. If a vertex is to be fully "used up" by a walk that does not start or end there, its degree must be even — otherwise one edge is left dangling with no partner to leave on. This is the entire idea of the theorem, and it is worth internalizing before reading the proof: degree parity records whether a vertex can be passed through completely. A circuit starts and ends at the same vertex, so even that vertex needs an even degree (the final departure pairs with the initial entry). A trail that is not closed has two special vertices — the start and the end — which are each allowed one unpaired edge, hence odd degree; every other vertex must have even degree.

Figure
The Königsberg bridge graph: four landmasses, seven bridges, all four vertices of odd degree
A (deg 5) B (deg 3) C (deg 3) D (deg 3) 7 bridges total every vertex odd degree

Central theorem

TheoremEuler's characterization of Eulerian and semi-Eulerian graphs

Let G=(V,E)G = (V,E) be a finite, connected graph with at least one edge (loops and multiple edges permitted, isolated vertices excluded since GG is connected with ≥1\ge 1 edge). 1. GG has an Euler circuit if and only if every vertex of GG has even degree. 2. GG has an Euler trail that is not closed if and only if GG has exactly two vertices of odd degree; in that case every Euler trail begins at one of these two vertices and ends at the other.

Proof

Part 1, forward direction (necessity of even degree). Suppose GG has an Euler circuit C=v0,e1,v1,…,em,vmC = v_0, e_1, v_1, \dots, e_m, v_m with v0=vmv_0 = v_m, using every edge of EE exactly once. Fix any vertex u∈Vu \in V. Consider all occurrences of uu in the sequence v0,v1,…,vmv_0, v_1, \dots, v_m. If uu occurs at some interior position viv_i with 0<i<m0 < i < m, the circuit enters uu via edge eie_i and leaves via edge ei+1e_{i+1}; these are two distinct edges (a trail has distinct edges) both incident to uu, and they are used up by this single visit. If u=v0=vmu = v_0 = v_m (the basepoint), the circuit leaves via e1e_1 at the start and enters via eme_m at the end; these too are two distinct edges incident to uu contributed by the "closing up" of the circuit. Every edge of GG appears exactly once in the list e1,…,eme_1,\dots,e_m, and each edge incident to uu is counted in exactly one of these visit-pairs (either as an "enter/leave" pair at an interior visit, or as the "leave-at-start/enter-at-end" pair if uu is the basepoint). Hence the edges incident to uu are partitioned into pairs, so their number — namely deg⁡(u)\deg(u) — is even. (A loop at uu contributes 22 to deg⁡(u)\deg(u) by convention and corresponds to one traversal that both enters and leaves uu, consistent with this pairing.) Since uu was arbitrary, every vertex has even degree.

Part 1, converse (sufficiency), by strong induction on ∣E∣|E|. Claim: if GG is connected, has at least one edge, and every vertex has even degree, then GG has an Euler circuit. Base case. If ∣E∣=1|E| = 1, connectivity with even degrees forces that single edge to be a loop at some vertex vv (a non-loop edge would give its two endpoints degree 11, which is odd). The loop itself, traversed once, is an Euler circuit. Inductive step. Suppose ∣E∣=m≥2|E| = m \ge 2 and the claim holds for all connected graphs with fewer than mm edges in which every vertex has even degree. Let GG satisfy the hypotheses with ∣E∣=m|E| = m. Step A: GG contains a closed trail. Since GG is connected with ≥2\ge 2 edges, some vertex has degree ≥2\ge 2; since all degrees are even, in fact every vertex of positive degree has degree ≥2\ge 2. Start at any vertex v0v_0 and build a trail greedily: having arrived at viv_i via an unused edge, if some incident edge at viv_i is unused, traverse it to vi+1v_{i+1}; repeat. Because degrees are all even, we argue this process cannot get stuck except by returning to v0v_0: suppose the trail reaches a vertex u≠v0u \ne v_0. Each prior visit to uu (if any) used two of its incident edges (one in, one out); since deg⁡(u)\deg(u) is even, the number of unused edges at uu is even after any number of full in/out pairs have been consumed, hence at least one unused edge remains if the count of used edges at uu has not reached deg⁡(u)\deg(u), and in particular right after arriving we have used one more edge (the arriving one) than we have departing, so an even total forces at least one more unused edge to depart on. Thus the walk can always continue from any vertex other than possibly v0v_0. Since GG is finite, the process must terminate, and by the argument above it can only terminate by returning to v0v_0 with no more available edges there being unnecessary — indeed it terminates precisely when we return to v0v_0 (a vertex ≠v0\ne v_0 never terminates the walk because an unused incident edge is always available there, as shown). This produces a closed trail C0C_0 based at v0v_0. Step B: remove C0C_0 and apply induction. Let G′=G−E(C0)G' = G - E(C_0) be the graph on vertex set VV with edge set E∖E(C0)E \setminus E(C_0) (deleting isolated vertices produced, if any, does not affect what follows). For every vertex ww, the edges of C0C_0 incident to ww number an even amount (by the same pairing argument as in Part 1's forward direction, applied to the closed trail C0C_0), so

deg⁡G′(w)=deg⁡G(w)−deg⁡C0(w)\deg_{G'}(w) = \deg_G(w) - \deg_{C_0}(w)

is even, being a difference of two even numbers. Thus every vertex of G′G' has even degree. G′G' may be disconnected; let H1,…,HkH_1, \dots, H_k be its connected components that contain at least one edge (components with no edges are single leftover vertices and are ignored, as they contribute nothing to traverse). Each HjH_j is connected, has all-even degrees, and ∣E(Hj)∣<∣E(G)∣=m|E(H_j)| < |E(G)| = m since E(C0)≠∅E(C_0) \ne \emptyset has been removed. By the induction hypothesis, each HjH_j has an Euler circuit CjC_j. Step C: splice. Because GG is connected and C0C_0 together with H1,…,HkH_1,\dots,H_k covers all edges of GG, each HjH_j must share at least one vertex with C0C_0: if some HjH_j shared no vertex with C0C_0, then since HjH_j has at least one edge, there would be no path in GG from a vertex of C0C_0 to a vertex of HjH_j that avoids... more directly, connectivity of GG guarantees a path from v0v_0 (on C0C_0) to any vertex of HjH_j; the first edge of this path leaving the vertex set of C0C_0 must belong either to C0C_0 (impossible, it would already be in C0C_0's vertex set on both ends only if it's a C0C_0 edge) or to some component of G′G' — tracing this path shows the path must pass through a vertex lying on both C0C_0 and HjH_j, since all edges of GG lie in C0C_0 or in some HiH_i and a path cannot jump between disjoint vertex sets without an edge connecting them. Hence C0C_0 and HjH_j share a vertex uju_j. Now build the Euler circuit of GG by walking C0C_0 starting at v0v_0, and each time we arrive at a vertex uju_j that lies on some not-yet-inserted circuit CjC_j, we detour: traverse all of CjC_j (starting and ending at uju_j, since CjC_j is a closed trail based there) before continuing along C0C_0. After all detours are spliced in, every edge of C0C_0 and every edge of every CjC_j has been traversed exactly once, the walk starts and ends at v0v_0, and together these account for every edge of E(C0)∪E(H1)∪⋯∪E(Hk)=EE(C_0) \cup E(H_1) \cup \dots \cup E(H_k) = E. This is an Euler circuit of GG, completing the induction.

Part 2, forward direction. Suppose GG has an Euler trail T:v0,e1,…,em,vmT: v_0, e_1, \dots, e_m, v_m with v0≠vmv_0 \ne v_m, using every edge exactly once. For any interior vertex uu (including possibly v0v_0 or vmv_m if they recur mid-trail), each occurrence of uu strictly between the two endpoints pairs up two distinct incident edges exactly as in Part 1. For v0v_0: it contributes one unpaired "departure" edge e1e_1 at the very start, plus one paired in/out edge for each subsequent visit to v0v_0 (if any); hence deg⁡(v0)\deg(v_0) is odd (one unpaired edge, plus an even number from repeat visits). Symmetrically deg⁡(vm)\deg(v_m) is odd. Every other vertex u≠v0,vmu \ne v_0, v_m has all its incident-edge occurrences paired as interior visits, so deg⁡(u)\deg(u) is even. Thus GG has exactly two odd-degree vertices, namely v0v_0 and vmv_m.

Part 2, converse. Suppose GG is connected and has exactly two odd-degree vertices, xx and yy. Form G+=G+xyG^+ = G + xy by adding one new edge between xx and yy (if xy∈Exy \in E already, add a parallel edge; this is permitted since GG may have multiple edges). In G+G^+, the degrees of xx and yy each increase by 11, becoming even, and all other degrees are unchanged, hence even. Also G+G^+ is connected (adding an edge to a connected graph keeps it connected) and has at least one edge. By Part 1 (already proved), G+G^+ has an Euler circuit C+C^+. Since xyxy is one edge of C+C^+, we may write C+C^+ starting immediately after traversing edge xyxy: that is, C+C^+ visits x,yx, y (or y,xy,x) consecutively via edge xyxy at some point; deleting that single edge occurrence from the circular sequence and "cutting" the circuit open there yields a trail from yy to xx (or xx to yy) that uses every edge of G+G^+ except xyxy exactly once — that is, every edge of GG exactly once. This is the desired Euler trail of GG, and it runs between xx and yy. Finally, we already showed (forward direction) that any Euler trail of a graph with exactly two odd vertices must start and end at those two odd vertices, so the endpoints are forced to be {x,y}\{x,y\} in either order. ■\blacksquare

∎
CorollaryDirected version

Let DD be a finite, connected (as an undirected graph, i.e. weakly connected) directed multigraph with at least one arc.

  • DD has a directed Euler circuit iff deg⁡+(v)=deg⁡−(v)\deg^+(v) = \deg^-(v) for every vertex vv.
  • DD has a directed Euler trail (not closed) iff there are vertices x≠yx \ne y with deg⁡+(x)−deg⁡−(x)=1\deg^+(x) - \deg^-(x) = 1, deg⁡−(y)−deg⁡+(y)=1\deg^-(y) - \deg^+(y) = 1, and deg⁡+(v)=deg⁡−(v)\deg^+(v) = \deg^-(v) for every other vertex vv; every such trail runs from xx to yy.

The proof is the directed analogue of the undirected argument above: at each interior visit to a vertex, one in-arc pairs with one out-arc, so a full traversal of all arcs incident to vv requires deg⁡+(v)=deg⁡−(v)\deg^+(v) = \deg^-(v) unless vv is an endpoint of a non-closed trail, contributing the stated imbalance of exactly 11. The sufficiency direction again proceeds by an edge(arc)-deletion induction identical in structure to Part 1's converse, respecting arc orientation throughout.

Worked examples

Example 1 — a graph with parallel edges and a loop. Let GG have vertices {A,B,C,D}\{A, B, C, D\} and edges: two parallel edges between AA and BB (call them e1,e2e_1, e_2), one edge BB–CC (e3e_3), one edge CC–DD (e4e_4), one edge DD–AA (e5e_5), and a loop at CC (e6e_6). Degrees: deg⁡(A)=2(from e1,e2)+1(e5)=3\deg(A) = 2(\text{from } e_1,e_2) + 1(e_5) = 3. Wait — recompute carefully. AA is incident to e1,e2,e5e_1, e_2, e_5, so deg⁡(A)=3\deg(A) = 3. BB is incident to e1,e2,e3e_1, e_2, e_3, so deg⁡(B)=3\deg(B) = 3. CC is incident to e3,e4e_3, e_4, and the loop e6e_6 contributes 22, so deg⁡(C)=1+1+2=4\deg(C) = 1+1+2 = 4. DD is incident to e4,e5e_4, e_5, so deg⁡(D)=2\deg(D) = 2. Check the Handshake Lemma: 3+3+4+2=12=2∣E∣=2(6)3+3+4+2 = 12 = 2|E| = 2(6). ✓. Odd-degree vertices: AA (degree 3) and BB (degree 3) — exactly two. GG is connected (all four vertices reachable from each other via the listed edges). By Part 2 of the theorem, GG has an Euler trail from AA to BB (or BB to AA), and no Euler circuit. Explicit trail: A→e1B→e3C→e6C→e4D→e5A→e2BA \xrightarrow{e_1} B \xrightarrow{e_3} C \xrightarrow{e_6} C \xrightarrow{e_4} D \xrightarrow{e_5} A \xrightarrow{e_2} B. Check: edges used in order e1,e3,e6,e4,e5,e2e_1, e_3, e_6, e_4, e_5, e_2 — all six, each once — and the trail starts at AA, ends at BB, exactly as predicted.

Example 2 — testing and repairing a non-Eulerian graph. Let HH have vertices {1,2,3,4,5}\{1,2,3,4,5\} with edges: 12,13,14,23,24,34,4512, 13, 14, 23, 24, 34, 45. Degrees: deg⁡(1)=∣{12,13,14}∣=3\deg(1) = |\{12,13,14\}| = 3. deg⁡(2)=∣{12,23,24}∣=3\deg(2) = |\{12,23,24\}| = 3. deg⁡(3)=∣{13,23,34}∣=3\deg(3) = |\{13,23,34\}| = 3. deg⁡(4)=∣{14,24,34,45}∣=4\deg(4) = |\{14,24,34,45\}| = 4. deg⁡(5)=∣{45}∣=1\deg(5) = |\{45\}| = 1. Sum of degrees =3+3+3+4+1=14=2×7=2∣E∣= 3+3+3+4+1 = 14 = 2 \times 7 = 2|E|. ✓ (∣E∣=7|E| = 7.) Odd-degree vertices: 1,2,31, 2, 3 (degree 3 each) and 55 (degree 1) — four odd vertices. Since Part 2 requires exactly two, HH has neither an Euler circuit nor an Euler trail. This matches the diagnosis Euler gave Königsberg (four odd-degree landmasses), just on a different graph. To repair HH into an Eulerian graph minimally, we can add edges to pair up odd vertices: adding edge 1515 makes deg⁡(1)=4\deg(1) = 4 and deg⁡(5)=2\deg(5) = 2, leaving only 2,32,3 odd; adding edge 2323-parallel (a second copy of edge 2323) then fixes 2,32,3 to even as well. The resulting multigraph on {1,…,5}\{1,\dots,5\} with 99 edges has all even degrees and, being connected, has an Euler circuit by Part 1. This "minimum edge additions to make Eulerian" idea is exactly the combinatorial core of the Chinese Postman Problem, which asks for the shortest closed walk covering every edge at least once.

Counterexamplewhy connectivity cannot be dropped

The theorem requires GG to be connected. Drop this hypothesis and consider GG consisting of two disjoint triangles, T1T_1 on vertices {a,b,c}\{a,b,c\} and T2T_2 on vertices {d,e,f}\{d,e,f\}, with no edges between them. Every vertex has degree 22, which is even — the degree condition of Part 1 is satisfied perfectly. Yet GG has no Euler circuit: any single closed trail is confined to the connected component in which it starts (a trail cannot jump between components, since there is no edge connecting them), so it can traverse the edges of at most one triangle, never both. Since E(T1)∪E(T2)=E(G)E(T_1) \cup E(T_2) = E(G) has edges in both components, no single trail covers all of EE. This shows the even-degree condition alone is not sufficient; connectivity is doing indispensable work in the theorem, precisely in Step C ("splice") of the proof, where we relied on every component HjH_j of G′G' sharing a vertex with C0C_0 — a fact that used connectivity of the original graph GG essentially.

Scope, edge cases & common traps

SituationEulerian statusWhy
Connected, all degrees evenEuler circuit existsPart 1
Connected, exactly two odd-degree verticesEuler trail (not circuit) exists, between the two odd verticesPart 2
Connected, four or more odd-degree verticesNeither existsHandshake Lemma forces an even number of odd vertices, but more than 22 blocks both
Disconnected, even degrees in each nonempty-edge component but ≥2\ge 2 such componentsNeither a single circuit nor trail existsSee counterexample above
Graph with isolated vertices (degree 0) plus one nontrivial connected pieceStill Eulerian in the sense of the nontrivial component; isolated vertices are usually excluded from the statement or ignoredConvention issue, not a mathematical failure
Directed graph, in-degree ≠\ne out-degree somewhere by more than 11No directed Euler trailCorollary

Note that the number of odd-degree vertices in any graph is always even, by the Handshake Lemma (the sum of degrees is 2∣E∣2|E|, forcing an even number of odd summands). So "exactly one odd vertex," "exactly three odd vertices," etc. can never occur — the only possibilities compatible with connectivity for Eulerian-type traversals are 00 (circuit) or 22 (trail); 4,6,8,…4, 6, 8, \dots odd vertices all yield graphs with neither.

The mathematician behind it

Origins · 1 minLeonhard Euler and how this was discovered
LE
Leonhard Euler
1707–1783 · Basel, St. Petersburg, Berlin

Euler was the most prolific mathematician of the eighteenth century, contributing foundational work across analysis, number theory, mechanics, and what would become graph theory. His 1736 paper on the Königsberg bridges — written for the St. Petersburg Academy — is widely regarded as the founding document of graph theory, though the word "graph" would not be coined for another century. Euler recast a recreational geographic puzzle into a question about parity of degree, a level of abstraction typical of his work: strip a problem to its combinatorial skeleton and answer the skeleton once and for all.

History
- 1736 — Euler presents his solution to the Königsberg bridge problem to the St. Petersburg Academy of Sciences, proving no walk can cross all seven bridges exactly once and return to start.
- 1741 — Euler's paper Solutio problematis ad geometriam situs pertinentis ("The solution of a problem relating to the geometry of position") is published, the first paper explicitly framed in what Leibniz had called geometria situs.
- 1873 — Carl Hierholzer, unaware his result echoed Euler's sketch, publishes (posthumously, arranged by Christian Wiener) the first fully rigorous constructive proof and algorithm for building an Euler circuit, now called Hierholzer's algorithm.
- 1883 — Édouard Lucas popularizes bridge-crossing puzzles and graph traversal problems in his Récréations Mathématiques, cementing Eulerian graphs in the popular mathematical imagination.
- 1960s — The theory is formalized within the broader combinatorial framework used to define the Chinese Postman Problem, connecting Euler's parity condition to modern route-optimization algorithms.
Why does the Handshake Lemma guarantee the number of odd-degree vertices is always even?

The Handshake Lemma states that the sum of all vertex degrees equals 2∣E∣2|E|, an even number. If we split vertices into those of even degree and those of odd degree, the sum over even-degree vertices is automatically even (sum of even numbers). For the total sum to be even, the sum over odd-degree vertices must also be even. But a sum of odd numbers is even only if there is an even count of them (an odd count of odd numbers sums to an odd number). Hence the number of odd-degree vertices is always even — 0,2,4,6,…0, 2, 4, 6, \dots — which is exactly why the Euler trail theorem's "exactly two odd vertices" case is the unique nontrivial possibility beyond the all-even circuit case.

Does Euler's theorem tell us anything about how many distinct Euler circuits a graph has?

No — the theorem is purely an existence statement (via degree parity) and says nothing about counting. Counting Euler circuits is a much harder problem in general. The BEST theorem (named for de Bruijn, van Aardenne-Ehrenfest, Smith, and Tutte) gives a formula for the number of Euler circuits in a connected Eulerian directed graph in terms of the number of arborescences (spanning in-trees) rooted at any fixed vertex, multiplied by a product of factorials of (deg⁡+(v)−1)(\deg^+(v) - 1) over all vertices. No equally clean closed formula is known for general undirected Eulerian graphs; counting them is computationally hard (#P-complete) in that setting.

How is finding an Euler circuit different in difficulty from finding a Hamiltonian cycle?

Enormously different. Euler's theorem gives an instant, linear-time-checkable certificate for existence (just compute degrees) and an efficient constructive algorithm (Hierholzer's, running in O(∣E∣)O(|E|) time). By contrast, deciding whether a graph has a Hamiltonian cycle — a cycle visiting every vertex exactly once — is NP-complete: no efficient general characterization or algorithm is known, and none is expected to exist unless P = NP. The superficial similarity of the two questions (visit every edge vs. every vertex exactly once) masks a total asymmetry in tractability, which is one of the most memorable lessons Eulerian graph theory teaches about computational complexity.

Can a graph with loops or multiple edges still be Eulerian, and does the theorem change?

Yes, and no change is needed. The theorem as stated already allows loops (each loop contributes 22 to the degree of its vertex, by the standard convention used with the Handshake Lemma) and multiple edges (parallel edges between the same pair of vertices, each counted separately in degree and each usable once in a trail). The proof's edge-pairing argument works identically: a loop traversed at vertex vv uses up two of the "slots" at vv (entering and leaving via the same physical edge, conceptually), consistent with its degree-2 contribution. Example 1 above explicitly uses both a loop and a parallel edge pair.

What is Fleury's algorithm, and is it the same as the proof's construction?

Fleury's algorithm is a different (older, less efficient) method for constructing an Euler circuit once existence is known: at each step, traverse an available edge that is not a "bridge" (cut-edge) of the remaining unused-edge subgraph, unless no other choice exists. This greedy bridge-avoidance rule prevents disconnecting the untraversed part of the graph prematurely. It is correct but requires repeatedly testing whether edges are bridges, costing O(∣E∣2)O(|E|^2) time overall in a naive implementation. The proof given here instead uses the "find a closed trail, then splice in circuits from remaining components" idea, which is the basis of Hierholzer's algorithm and runs in linear time O(∣E∣)O(|E|) — asymptotically faster than Fleury's method.

Is there a version of Euler's theorem for graphs where you're allowed to repeat edges?

If repeating edges is allowed, the question changes entirely and becomes the Chinese Postman Problem (also called the Route Inspection Problem): find the shortest closed walk that covers every edge at least once, possibly retracing some edges. Euler's theorem tells you exactly which graphs need no repeats at all (the Eulerian ones); for non-Eulerian connected graphs, the Chinese Postman solution works by finding a minimum-weight way to duplicate edges so as to make all degrees even (pairing up odd-degree vertices via shortest paths, a problem solved using minimum-weight perfect matching), after which Euler's theorem guarantees the augmented multigraph has a circuit covering everything.

Why is connectivity assumed rather than derived from the degree condition?

Because it genuinely cannot be derived: the degree condition (all degrees even, or exactly two odd) is a purely local, vertex-by-vertex property, while connectivity is a global property about reachability between vertices. The counterexample of two disjoint triangles shows a graph satisfying the degree condition perfectly while being disconnected and having no Euler circuit. Connectivity must therefore be checked and assumed separately; it is not implied by degree data alone, and the theorem's proof (specifically the "splice" step) genuinely uses it to guarantee that the deleted-circuit's leftover components can be sewn back into a single traversal.

Before this