MathematicsDiscrete MathematicsMedium

Euler Path

Also known as:Eulerian PathEulerian Trail

An Euler path (or Eulerian path) is a trail in a graph that visits every edge exactly once, without necessarily returning to the starting vertex. An Euler circuit (or Eulerian circuit) is an Euler path that begins and ends at the same vertex. A connected graph has an Euler path if and only if it has exactly zero or two vertices of odd degree; if two odd-degree vertices exist, the path must start and end at those vertices.

Worked Example

Problem

The Königsberg bridge problem: a city has 4 landmasses (A, B, C, D) connected by 7 bridges. A–B: 2 bridges, A–C: 2 bridges, A–D: 1 bridge, B–D: 1 bridge, C–D: 1 bridge. Does an Euler path exist?

Solution

Step 1: Model as a multigraph: vertices = {A, B, C, D}, edges = the 7 bridges. Step 2: Calculate degrees: deg(A) = 2 + 2 + 1 = 5 (odd) deg(B) = 2 + 1 = 3 (odd) deg(C) = 2 + 1 = 3 (odd) deg(D) = 1 + 1 + 1 = 3 (odd) Step 3: Count odd-degree vertices = 4. Step 4: Euler path condition: exactly 0 or 2 vertices with odd degree. Step 5: 4 odd-degree vertices → condition fails.

Answer

No Euler path exists. All 4 vertices have odd degree; an Euler path requires exactly 0 or 2 odd-degree vertices.

Conditions for Euler Paths and Circuits

Graph TypeOdd-Degree VerticesEuler Path?Euler Circuit?Start/End
Undirected connected0 odd-degree verticesYesYesAny vertex
Undirected connected2 odd-degree verticesYesNoMust start/end at odd-degree vertices
Undirected connected4+ odd-degree verticesNoNoNot possible
Directed connectedAll in-deg = out-degYes (circuit)YesAny vertex
Directed connectedOne vertex out − in = 1, one in − out = 1Yes (path)NoOut-excess to in-excess

Interactive Tools

Wolfram Alpha — Graph Analysis

Open Tool

Brilliant — Eulerian Paths

Open Tool

GeoGebra — Euler Path Applet

Open Tool
Map of the seven bridges of Königsberg, the original problem that inspired Euler path theory

Wikimedia Commons, CC BY-SA

Related Terms

The Euler path is named after Swiss mathematician Leonhard Euler (1707–1783), who published the solution to the Königsberg bridge problem in 1736 — the paper considered the birth of graph theory. "Euler" is pronounced "OY-ler." The problem asked whether one could walk through the city crossing each bridge exactly once.

graph-theoryeulerbridgestraversaldiscrete-mathkönigsberg