Seven Bridges of Königsberg
The city of Königsberg had seven bridges. Residents tried to walk across all seven without repeating one. Euler turned the map into a graph and proved the walk impossible.
An Euler trail requires 0 or 2 odd-degree vertices. This graph has 4, so no route can cross every bridge exactly once.
Click a land mass to cross an unused bridge. Bridge numbers and degrees are shown on the graph. Because four vertices have odd degree, every starting point eventually gets stuck — this is Euler’s proof.
What you are seeing
Represent each land mass as a vertex and each bridge as an edge. Walking across a bridge means moving along an edge.
An Euler trail uses every edge exactly once. It exists only when the number of odd-degree vertices is 0 or 2.
Königsberg’s graph has four odd-degree vertices, so no such walk exists — no matter where you start.
Why it matters
This puzzle is often called the birth of graph theory. The same degree-counting idea powers route planning, network analysis, and Eulerian circuits in modern computer science.
Complexity & details
Building the graph is O(V + E). Checking the odd-degree count is O(V), so the impossibility proof is linear.
Frequently asked questions
Why can’t we just try harder?+
Every attempt eventually gets stuck. The degree argument rules out all possible routes at once, not just the ones already tried.
What is an Euler trail?+
A walk that uses every edge exactly once. If it ends where it started, it is an Euler circuit; otherwise it is an Euler path.