Seven Bridges of Königsberg: No Walk Crosses Each Once
Explorable Illusions · Published
No walk over these seven bridges crosses each one exactly once. The bridges are the ones drawn in Fig. 1 of the mathematician Leonhard Euler's paper on the Königsberg bridges, usually dated 1736. Each of the four separate pieces of land touches an odd number of bridges (5, 3, 3 and 3). A walk that crosses every bridge exactly once can have at most two such lands: the one where it starts and the one where it finishes.
Protocol · 4 parts
At a glance
- Name
- Seven Bridges of Königsberg
- Also called
- Königsberg bridge problem
- First recorded
- Euler's paper in volume 8 of the St Petersburg Academy's Commentarii, usually dated 1736; the plate with Fig. 1 is marked for page 128. This page did not search for earlier records of the puzzle
- Type
- route puzzle on a network (an Euler path question)
- Main explanations
- Proof by counting bridge ends: on a walk that crosses every bridge exactly once, a land touched by an odd number of bridges must be where the walk starts or ends; Königsberg has four such lands (5, 3, 3, 3), and a walk has only two ends
- On this page
- static figures and recomputable data: every route that never repeats a bridge, for the seven bridges and for 14 changed layouts
seven-bridges-of-konigsberg-glance.csv (CSV) · what the file holds and its license
Before you read on, try it. Put a finger on any land, cross bridges one at a time, and see whether you can use all seven without crossing any of them twice. You may finish anywhere you like. If you get stuck after six, note which bridge is left over and which land you are standing on.
What were the seven bridges?
Königsberg was a city on the river Pregel in Prussia. The same place is now Kaliningrad in Russia. In Euler's figure the river divides around an island, and two more branches, drawn on the right, meet at the island's right-hand end. The cartographer Fryderyk Getkant drew the city by hand between 1634 and 1639, about a century before Euler's paper.

"Topographia Practica – 3. Regiomontum (Königsberg)" by Fryderyk Getkant — Public domain (US: hand-drawn map made 1634–39 by an author who died in 1666, public domain whether counted as published (before 1931) or unpublished (life plus 70 years); EU: author d. 1666, more than 70 years ago) Full credit
"Topographia Practica – 3. Regiomontum (Königsberg)" by Fryderyk Getkant — https://commons.wikimedia.org/wiki/File:Topographia_Practica_-_3._Regiomontum.jpg — Public domain (US: hand-drawn map made 1634–39 by an author who died in 1666, public domain whether counted as published (before 1931) or unpublished (life plus 70 years); EU: author d. 1666, more than 70 years ago); modified: scaled from 7,544 to 1,600 px wide; no crop, no colour changeEuler's Fig. 1 keeps only the information the puzzle needs. Land A is the island, B is the bank below it, C is the bank above it, and D is the land on the right between the two branches. The figure marks no compass direction, so this page calls the lands by Euler's letters. Bridges a and b connect A to B, c and d connect A to C, e connects A to D, f connects B to D, and g connects C to D.
Fig. 1 is a map of rivers and bridges, not a diagram of dots joined by lines. The dots-and-lines version further down is this page's own redrawing. This page did not read Euler's Latin text, so the argument below is checked by a computer program instead of being taken from the original.
Why does no walk exist?
Count the bridges that touch each land. The island has five of them (a, b, c, d and e), bank B has three (a, b, f), bank C has three (c, d, g), and land D has three (e, f, g). Every bridge has two ends, so the four counts add up to 14, exactly twice the number of bridges.
Guess first, then open the answer: The counting argument
The counting argument
Think about a land where the walk neither starts nor finishes. Every time the walk arrives there by one bridge, it must leave again by a different bridge, so the bridges of that land get used up in pairs, and the land needs an even number of them. A land with an odd count can therefore only work as the starting point or the finishing point of the walk.
A walk has one start and one finish, so at most two lands can have odd counts. Königsberg has four. That rules out every possible walk without trying a single one.
How many routes did the program try?
Proofs can hide mistakes, so this page also tried every possible route. The program started on each of the four lands and followed every order of bridges that never repeats one, counting a route walked in the opposite direction as a separate route.
The program found 820 routes in all. The longest use six bridges, and 256 routes get that far. None of them uses all seven. On this page, the gasp point is that empty last bar: 256 routes come within one bridge, and every one of them ends on a land that the last bridge does not touch.
The search is small enough to be complete. It takes the program well under a second. The 15 puzzle has far more positions than this, and there a similar counting argument identifies the positions that can never be reached.
When is a walk possible?
Now turn the argument around. In a layout where every piece of land is connected by bridges, a walk that crosses every bridge once exists when exactly zero or two lands have odd counts. With two, the walk must start on one of them and finish on the other; with zero, it can start anywhere and returns to where it began. A walk of this kind is called an Euler path, after Euler.
The first half of that rule is the counting argument above. The second half, that two odd lands are always enough when everything is connected, takes a longer proof, and this page checks it only on the 15 layouts in the table below, where it holds every time. Lengths and angles never enter the argument; the only information that matters is which land each bridge touches. The same habit of ignoring distance settles questions about the Möbius strip, a paper band with a single edge.
Counting arrangements instead of hunting for one also cracks the magic square, where a program can list every four-by-four square. Road networks raise a different kind of route question: in Braess's paradox, adding a road makes every driver's trip slower in Braess's own example.
Check it yourself
Each row is one layout of bridges. The program listed every route that never repeats a bridge, then counted those that use all of them. A walk is counted once for each start and direction.
| Layout | Bridge counts (A, B, C, D) | Odd lands | Walks over every bridge | Of those, back at the start |
|---|---|---|---|---|
| All seven bridges | 5, 3, 3, 3 | 4 | 0 | 0 |
| Remove a | 4, 2, 3, 3 | 2 | 32 | 0 |
| Remove b | 4, 2, 3, 3 | 2 | 32 | 0 |
| Remove c | 4, 3, 2, 3 | 2 | 32 | 0 |
| Remove d | 4, 3, 2, 3 | 2 | 32 | 0 |
| Remove e | 4, 3, 3, 2 | 2 | 32 | 0 |
| Remove f | 5, 2, 3, 2 | 2 | 48 | 0 |
| Remove g | 5, 3, 2, 2 | 2 | 48 | 0 |
| Add a bridge A–B | 6, 4, 3, 3 | 2 | 384 | 0 |
| Add a bridge A–C | 6, 3, 4, 3 | 2 | 384 | 0 |
| Add a bridge A–D | 6, 3, 3, 4 | 2 | 416 | 0 |
| Add a bridge B–C | 5, 4, 4, 3 | 2 | 416 | 0 |
| Add a bridge B–D | 5, 4, 3, 4 | 2 | 384 | 0 |
| Add a bridge C–D | 5, 3, 4, 4 | 2 | 384 | 0 |
| Add bridges B–C and A–D | 6, 4, 4, 4 | 0 | 3,744 | 3,744 |
Download the route counts for all 15 layouts (CSV) · what the file holds and its license
Now break it
Take away one bridge and the impossibility disappears. Remove bridge e, the one between the island and land D.
Now the island has four bridges and land D has two, so only banks B and C are odd. A walk must run from one bank to the other. The program found 32 such walks. One of them starts on bank B and crosses a, b, f, g, c and d, finishing on bank C.
Removing any one of the seven works the same way, since every bridge touches two odd lands. Adding a bridge between two lands also leaves just two odd lands, and adding two bridges, B–C and A–D, makes every count even, so the walk can finish where it started.
Try this next: 15 puzzle — another puzzle where a count shows that a goal can never be reached.
Sources
- Leonhard Euler, “Solutio problematis ad geometriam situs pertinentis,” Commentarii academiae scientiarum imperialis Petropolitanae 8 (1736): 128–140. https://commons.wikimedia.org/wiki/File:Solutio_problematis_ad_geometriam_situs_pertinentis,_Fig._1.pngRead: bibliography only for the Latin text; Fig. 1 (plate VIII, marked for page 128) viewed in full
Cite this page
Explorable Illusions. (2026). Seven Bridges of Königsberg: No Walk Crosses Each Once. Explorable Illusions. Published 2026-11-13. https://explorableillusions.com/math-toys/seven-bridges-of-konigsberg/
Add the date you read it. Figures and CSV files on this page are CC BY 4.0 unless their credit line says otherwise.
How pages here are checked Corrections log Report an error: contact@explorableillusions.com
More in Puzzles, Fractals & Math Toys
Puzzles, Fractals & Math ToysMandelbrot Set: Exact Area Still Unknown as of 2026
Square, add c, repeat: the Mandelbrot set is every point that never escapes. As of 2026 its exact area is unknown; grid counts put it near 1.51.
Picture credit
"The Mandelbrot set, full view" by Explorable Illusions — https://explorableillusions.com/math-toys/mandelbrot-set/ — CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/)
Puzzles, Fractals & Math ToysMagic Square: 1514 Sits in Dürer’s Bottom Row
Every row, column and diagonal of Dürer's 1514 magic square adds to 34, and its bottom row has 15 14 in the middle. See the 86 sets of four and the 880 count.
Picture credit
"Melencolia I (detail: the magic square)" by Albrecht Dürer — https://commons.wikimedia.org/wiki/File:Albrecht_D%C3%BCrer,_Melencolia_I,_1514,_NGA_6640.jpg — CC0 1.0 (https://creativecommons.org/publicdomain/zero/1.0/); modified: cropped to a 4:3 frame around the whole magic square with a strip of the wall, the foot of the bell, part of the rope and the edge of the hourglass frame; scaled to 1,200 x 900 px
Puzzles, Fractals & Math Toys15 Puzzle: With 14 and 15 Swapped, No Solution Exists
Swap tiles 14 and 15 in a 15 puzzle and no series of slides can fix it. Count the pairs out of order to see why, as Johnson and Story proved in 1879.
Picture credit
"15-14-13. The great presidential puzzle (Puck, 1880)" by James Albert Wales — https://commons.wikimedia.org/wiki/File:15-14-13._The_great_presidential_puzzle_-_J.A._Wales._LCCN2007684705.jpg — Public domain (US: published 1880 in Puck; EU: artist James Albert Wales d. 1886, per the Library of Congress catalog); modified: cropped to the printed picture, removing the album page and the printed title, publisher and lithographer lines below it; scaled to 1600 px wide