The Reel Narratives

The Reel Narratives

Stay curious.

← Feed
Graph Theory

A Walking Puzzle About Seven Bridges Created an Entire Branch of Mathematics

In the 1700s, the residents of the Prussian city of Königsberg debated a puzzle. Their city sat on two riverbanks and two islands, connected by seven bridges. Could you walk through the city in such a way that you crossed every bridge exactly once? In 1736, Leonhard Euler proved the answer was no, and in doing so accidentally founded two entire branches of mathematics.

89 min read295 words
mathematicsgraph-theorytopologyhistory-of-math

In the early 1700s, the citizens of the Prussian city of Königsberg — modern Kaliningrad — debated a puzzle about their city's geography. Königsberg straddled the Pregel river, with two riverbanks and two islands connected by seven bridges. Was it possible to walk through the city in such a way that you crossed every bridge exactly once and returned to your starting point?

For decades, no one could find such a route. No one could prove that none existed.

In 1736, the Swiss mathematician Leonhard Euler — then living in Saint Petersburg — took up the question. His approach broke from anything that had come before. He did not try to enumerate possible walks. Instead, he stripped the city down to its abstract essentials. The four landmasses became points. The seven bridges became lines connecting those points. The shapes, distances, and orientations of the bridges did not matter. Only the connections did.

Then Euler counted how many bridges met at each landmass. He proved a general rule: a walk crossing every bridge exactly once is possible only if either every landmass has an even number of bridges, or exactly two of them have an odd number. In Königsberg, all four landmasses had odd numbers. The walk was impossible.

Euler's proof, only a few pages long, is now considered the founding paper of graph theory and one of the founding documents of topology — the branch of mathematics concerned with shape and connection rather than measurement. He had reduced a physical problem to an abstract structure of points and lines, what we now call a graph.

Roughly three centuries later, those same diagrams underlie the routing of internet packets, the design of subway systems, the analysis of social networks, and the study of how proteins fold inside living cells.