Königsberg at 1652, with the river Pregel and its islands. You can count the bridges.
Königsberg at 1652, with the river Pregel and its islands. You can count the bridges.Merian-Erben · public domain

The city of Königsberg (today Kaliningrad, Russia) was crossed by the Pregel River, which formed two islands. Seven bridges connected the four regions of the city. Residents wondered if it was possible take a walk across each bridge exactly once.

Before reading the answer, try it yourself:

Choose where to start and click on the bridges to cross them. Can you get past 7?

Euler realized that the shape of the streets, the size of the islands and the length of the bridges did not matter. It only mattered which regions are linked to which. He replaced the map with a drawing with dots (the regions) and lines (the bridges). Today this is called graph:

The original figure from Euler's paper (1736): the regions are A, B, C, and D, and the bridges are a, b, c, d, e, f, and g.
The original figure from Euler’s paper (1736): the regions are A, B, C, and D, and the bridges are a, b, c, d, e, f, and g.Leonhard Euler · public domain

Today we draw the same problem like this:

The Königsberg graph. The red numbers show how many bridges reach each region.

Now the deduction. On a tour, every time you pass through a region (without starting or ending it), uses a bridge to enter and another to exit. Then bridges from an intermediate region come always in pairs: the number of bridges arriving at it must be even. Only the starting region and The arrival stage may have an odd number of bridges.

Conclusion: the tour is only possible if at most two regions have an odd number of bridges.

Counting in Königsberg:

Region Bridges Even or odd?
Kneiphof Island 5 (a, b, c, d, e) odd
North bank 3 (a, b, f) odd
South bank 3 (c, d, g) odd
Lomse Island 3 (e, f, g) odd

There are four odd regions, so the tour is impossible. Euler presented the argument in 1735, and it is considered the first result of graph theory, an area that today is behind GPS, social networks and delivery routes.


All topics by Leonhard Euler · ← The spring and differential equations · $V - A + F = 2$ and the soccer ball →

Credits and sources of images.