Skip to content
OddMaths
Back to Puzzlespuzzles

The Seven Bridges of Königsberg: The Walk That Can't Be Done

Can you take a walk through a city that crosses each of its seven bridges exactly once? In 1736, Leonhard Euler proved it's impossible, using a simple count of dots and lines that started a whole new branch of maths.

People in a city kept trying a walk that can't be done. A mathematician proved why, without leaving his desk.

The Puzzle

In the 1700s, the city of Königsberg (today called Kaliningrad) sat on a river with an island in the middle. Seven bridges linked the land together. The citizens liked to wonder:

Can you plan a walk that crosses every bridge exactly once? (You can start and finish anywhere.)

The river splits the city into four pieces of land. Let's call them:

A: the island in the middle
B: the north bank
C: the south bank
D: the land to the east

And the seven bridges join them like this:

A and B: 2 bridges
A and C: 2 bridges
A and D: 1 bridge
B and D: 1 bridge
C and D: 1 bridge

Try it with paper. Draw four dots, A, B, C and D, and seven lines for the bridges. Now trace over all seven lines with your pencil, without lifting it and without going along any line twice.

Stop and Think

The question: Is there a route? If so, find it. If not, can you explain why not?

Hint 1: Look at one piece of land. Each time you pass through it, you cross one bridge in and another bridge out.
Hint 2: Count how many bridges touch each piece of land.
Hint 3: What happens if a piece of land has an odd number of bridges?

Euler's Big Idea

The great mathematician Leonhard Euler solved this in 1736. His big idea: forget the map. The size of the islands, the shape of the river and the length of the bridges don't matter. All that matters is which lands are joined by bridges. Four dots and seven lines say it all.

Now count the bridges that touch each piece of land:

A: 2 + 2 + 1 = 5
B: 2 + 1 = 3
C: 2 + 1 = 3
D: 1 + 1 + 1 = 3

All four are odd. (Check: 5 + 3 + 3 + 3 = 14, which is 2 × 7, because every bridge touches two pieces of land.)

Why Odd Numbers Ruin Everything

Imagine you walk through a piece of land in the middle of your trip. You come in over one bridge and leave over another. So bridges are used in pairs: an "in" and an "out".

A piece of land in the middle of your walk needs an even number of bridges. If it has 3 bridges, you can use two of them as in and out, but the third is left. You would come in over it and be stuck, or you would have to leave over it and not have come in.

The only exceptions are the places where your walk starts and ends. They can have an odd number of bridges, because you leave without coming in (start) or come in without leaving (end). But a walk has only one start and one end.

So Euler's rule is:

A walk crossing every bridge exactly once is only possible if zero or two pieces of land have an odd number of bridges.

Königsberg has four pieces of land with an odd number. So there is no such walk. (We also asked a computer to try every possible order of the seven bridges: not one worked.)

Can You Fix It?

Here comes the fun part: build one more bridge, and the walk becomes possible!

Add a bridge between B and C. Now:

A: 5 (odd)
B: 4
C: 4
D: 3 (odd)

Exactly two odd places, A and D. So you must start at one and finish at the other. Here is a walk that works (it crosses all 8 bridges once, using both A–B bridges and both A–C bridges):

A → B → A → C → A → D → B → C → D

Or take a bridge away. Without the A–D bridge, only B and C are odd, and a walk exists from B to C (or C to B).

What Happened to the Real Bridges?

Königsberg changed a lot. Two of the seven bridges were destroyed in the bombing during the Second World War, and two more were later demolished and replaced by a highway. Only three remain, so today's city is very different from the one Euler knew.

Try It Yourself

Check a shape. You have a square with both diagonals drawn in. Treat the spot where the diagonals cross as a fifth point (5 points, 8 lines). Can you trace it without lifting your pencil or repeating a line? (Count the lines at each point.)

Add a bridge. If you add one extra bridge between A and D, how many odd places are left, and is a walk possible?

Your house. Draw the plan of your home with rooms as dots and doors as lines. Could you walk through every door exactly once?

Check your answers: in the square with both diagonals, each corner has 3 lines (two sides plus a diagonal) and the centre has 4, so there are four odd corners and it can't be done without lifting your pencil. With a second A–D bridge, A has 6, D has 4, B has 3 and C has 3, so there are two odd places (B and C), and a walk is possible. Your house depends on how many doors each room has. Count them!

The OddMaths Takeaway

Euler didn't try every route. He noticed what really matters: how things are connected. That idea started graph theory, the maths behind maps, networks and the internet.

Sometimes the quickest way to solve a puzzle is to stop looking at the picture and count.

🎯 Test Your Skill

Four questions. No bridges were crossed twice.