History of Math

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.

6 minLevel 2/3The interactive stage stays ad-free.
Bridges used0 / 7StartAOdd-degree vertices4TrailA
1234567Adeg 3Bdeg 3Cdeg 5Ddeg 3
unused bridge crossed current land mass

Click another land mass to cross an unused bridge.

Euler’s degree testA: 3 · B: 3 · C: 5 · D: 3

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

1

Represent each land mass as a vertex and each bridge as an edge. Walking across a bridge means moving along an edge.

2

An Euler trail uses every edge exactly once. It exists only when the number of odd-degree vertices is 0 or 2.

3

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.