The Walk Nobody Could Take
A true story · 3 min read
In the 1700s, a town called Königsberg stood on the banks of a river called the Pregel. Today the city is called Kaliningrad and lies in Russia, but back then it belonged to Prussia, and the people who lived there loved a puzzle.
The river split the town into four pieces of land: two banks and two islands. Seven bridges joined them together. On Sundays, people liked to stroll around the town and walk the paths over the bridges. And someone, nobody knows who, asked a question that became famous.
Could you plan a walk that crosses each of the seven bridges exactly once?
You could start anywhere and end anywhere. The only rule was: every bridge once, no more and no less. Townspeople tried. They drew on paper, they walked it with their feet, and they argued. Some thought there might be a way. Others were sure there was not. But no one could find it, and no one could say why.
The puzzle reached a mathematician named Leonhard Euler, who was working in Saint Petersburg, in Russia. Euler was Swiss, and one of the most productive mathematicians who ever lived. He wrote tens of thousands of pages, and kept working even after he lost the sight in one eye, and later in both.
At first, Euler was not even sure it was a maths problem. It had nothing to do with adding or measuring distance. But he realised something very clever. The shape of the town did not matter. The length of the bridges did not matter. The size of the islands did not matter. All that mattered was which pieces of land were connected, and by how many bridges.
So he drew a simplified picture. He turned each piece of land into a dot, and each bridge into a line joining two dots. Now the whole town was just four dots and seven lines. This kind of picture, a map of connections, is now called a graph, and the dots are called vertices. It is a very different use of the word "graph" from the kind with bars and lines.
Then he looked at the dots and thought about walking. Suppose you pass through a dot in the middle of your walk. You must come in by one bridge and leave by another. That uses up two bridges of that dot, a pair. So each time you pass through, you use bridges in pairs. A dot in the middle of a walk therefore needs an even number of bridges, such as 2, 4 or 6.
The only exceptions are the two dots where the walk starts and ends. At the start, you only leave. At the end, you only arrive. So those could have an odd number of bridges. (If you end exactly where you started, every dot must be even.)
Now count the real town. The four pieces of land had 3, 3, 3 and 5 bridges. All four numbers were odd. A walk can have at most two odd dots, the start and the finish. But Königsberg had four. So the walk was impossible. Not hard. Impossible, and Euler could prove it, without walking a single step.
He presented his answer to the Saint Petersburg Academy in 1735, and it was printed in 1741. It was one of the first papers in a new part of mathematics called graph theory, which later became very important. Computers, road maps, social networks and the internet are all studied with graphs: dots and the lines between them. Delivery drivers and map apps use the same kind of thinking to plan routes.
The bridges themselves have a story too. Some were destroyed in World War II, and others were rebuilt or replaced. Today, if you visit Kaliningrad, you can still walk around the island where the old puzzle began.
Try a smaller version: draw a few dots and lines, and ask whether you can trace them without lifting your pencil. Count the dots with an odd number of lines. You will be doing what Euler did.
Words to know: bridge, island, path, even, odd
Think about it
Try this on paper: draw a square and add a line from corner to corner both ways. Count how many corners have an odd number of lines, then use Euler's idea to say whether you can trace every line exactly once without lifting your pencil.
