Edge support of a graph 2026-10-14
For a finite undirected multigraph , its edge support of a graph is the subgraph with . It removes exactly the isolated vertices, retaining every edge, including self-loops and parallel edges. When , connectivity of this subgraph is the relevant condition for an Eulerian trail or Euler circuit.
Euler circuit Created 2026-10-07 Updated 2026-10-14
An Euler circuit, also called an Euler tour, is an Eulerian trail whose final vertex equals its initial vertex. Its length is . It can revisit other vertices, unlike a Hamiltonian cycle, which visits each vertex once before returning to the start. For a finite undirected multigraph with at least one edge, an Euler circuit exists exactly when the edge support of a graph is a connected graph and every vertex degree is even.
For example, let be distinct parallel edges joining , let be a self-loop at , and add an isolated vertex . Then , and is an Euler tour. The self-loop supplies one traversal and two incidences; need not be visited. Replacing by a single edge changes both vertex degrees to odd numbers and removes the possibility of an Euler circuit. Thus collapsing parallel edges can change the answer.
Two triangles in a graph sharing one vertex give another instructive Euler circuit: . The shared vertex has vertex degree four, the others have vertex degree two, and is revisited between the two closed trails. This is precisely the splice used by Hierholzer's algorithm.
Euler circuit criterion Created 2026-09-24 Updated 2026-10-14
Let be a finite undirected multigraph, allowing self-loops and distinct parallel edges, with . Thenwhere is the edge support of a graph, and vertex degrees count each self-loop twice. There is no lower bound of three on the number of vertices. If , the zero-length convention gives an Euler circuit exactly when .[ref]
The two requirements are independent: two separate vertices, each carrying a self-loop, have even vertex degrees but disconnected edge support of a graph, so no Euler circuit can cover both edges.
Necessity follows because a single trail cannot cover edges in different connected components of a graph, while a closed trail pairs all arriving and departing incidences, including those at its starting vertex. For sufficiency, extend a trail using unused edges until no extension is possible. Even vertex degree parity prevents it from stopping anywhere except its starting vertex: a different stopping vertex would have an odd number of used incidences and hence at least one unused incidence. The result is a closed trail.
If unused edges remain, connectivity of the edge support of a graph supplies a vertex on the current closed trail with an unused incident edge. Removing a closed trail leaves even unused vertex degrees, so the same argument constructs another closed trail from that vertex. Splice it into the existing record. The two trails use disjoint edge identities, so the splice repeats no edge. Each splice uses more edges; finiteness ensures termination with an Euler circuit. This is the constructive idea of Hierholzer's algorithm.
Hierholzer's algorithm inserts one closed trail into another at their shared vertex, using each of six edges exactly once
. Details. In the drawing, arrows indicate the chosen traversal direction along undirected edges. The first closed trail uses and the second uses . Insert the second at the final occurrence of in , giving . A reader can check consecutive endpoints, closure, and the six distinct edges directly. With multigraphs, perform the same check on edge identities, since endpoint pairs alone cannot distinguish parallel edges.
Eulerian graph Created 2026-09-24 Updated 2026-10-14
An Eulerian graph has an Euler circuit: a closed trail traversing every edge exactly once. Here the graph is a finite undirected graph, possibly a multigraph with self-loops. Parallel edges retain distinct identities, and each self-loop contributes two to its vertex degree. Repeated vertices are allowed. This models inspecting every road segment once, even when a junction must be revisited.
For a nonempty set of edges, the Euler circuit criterion requires a connected graph only on the edge support of a graph: isolated vertices impose no travel requirement. A single vertex with a self-loop and two vertices joined by two parallel edges are both Eulerian graphs. Neither requires three vertices. With no edges and at least one vertex, we allow the zero-length trail at that vertex as an Euler circuit; the graph with no vertices has no such walk.
The motivating Seven Bridges of Königsberg problem asks for an Eulerian trail, which need not return to its starting vertex. In Leonhard Euler's Solutio problematis ad geometriam situs pertinentis by Leonhard Euler, §2 poses the bridge-crossing question and §§4–6 encode land regions by letters. The river's shape drops out: only the connections matter. The paper was written in 1735 and published in 1741, according to the Euler Archive; the journal volume carries the nominal year 1736.[ref]
Eulerian trail 2026-10-14
An Eulerian trail, also called an Eulerian path, is a trail in a graph traversing every edge exactly once. The name Eulerian path does not require a graph path: vertices may repeat. A Hamiltonian path instead visits every vertex exactly once, and may omit edges. An Eulerian trail may omit isolated vertices, so these are different coverage requirements.
For a finite undirected multigraph with at least one edge, allowing self-loops, an Eulerian trail exists exactly when the edge support of a graph is a connected graph and there are zero or two vertices of odd vertex degree. In the two-odd-vertex case they must be the two distinct endpoints; in the zero-odd-vertex case every Eulerian trail is an Euler circuit. Count a self-loop twice in the vertex degree but once in the trail, and count each parallel edge separately.[ref]
Math 530 Spring 2023, Lecture 6: Multigraphs and digraphs. pp. 1–3, Theorem 1.1.2 and the note about isolated vertices
The parity obstruction is local: each intermediate visit pairs an arriving edge with a departing edge. Only the distinct endpoints can have an unpaired incidence. The handshaking lemma, , also shows that the number of vertices with odd vertex degree is even. Sufficiency in the two-endpoint case reduces to the Euler circuit criterion: add one extra edge between the odd vertices, construct an Euler circuit, rotate its record to start with the extra edge, then delete that edge. The remaining trail has the required endpoints.
For the Seven Bridges of Königsberg multigraph, the vertex degrees at are , so no Eulerian trail exists. Remove the unique edge : the vertex degrees become , and a six-edge Eulerian trail runs from to . Label the parallel edges between and between ; label by and by . A complete record is . It revisits while using every remaining edge once.
Four odd vertex degrees forbid an Eulerian trail; two allow distinct endpoints; zero allow an Euler circuit
. Details. 
