Introduction
The Königsberg bridges puzzle asks whether a walk can cross each of seven bridges exactly once. Trying routes never settles it. Counting does.
This worked example solves the puzzle with Euler's reasoning, in the later language of graphs, then asks what change would make the walk possible. Citations to Euler's paper use the paragraph numbers (§) he gave it.
The Problem
In the 18th century, Königsberg had four areas of land separated by a river: an island in the middle, a north bank, a south bank, and a piece of land to the east between two branches of the river. Seven bridges joined them:
| Bridges | Between |
|---|
| 2 | The island and the north bank |
| 2 | The island and the south bank |
| 1 | The island and the eastern land |
| 1 | The north bank and the eastern land |
| 1 | The south bank and the eastern land |
The question is whether a walk can cross every bridge exactly once. The walk may start and end anywhere, and it may cross land freely. Two things are asked: a yes-or-no answer with a reason that covers every possible route, and, if the answer is no, the smallest change to the bridges that would make such a walk possible.
Figure: A sketch of 18th-century Königsberg showing the river, the island, the north and south banks, the eastern land, and the seven bridges, placed beside its graph: four dots labeled A (island), B (north bank), C (south bank), and D (eastern land), joined by seven lines, with each dot's degree written next to it (A: 5, B: 3, C: 3, D: 3). Alt text: A river map with an island and seven bridges beside a diagram of four labeled dots joined by seven lines, showing that the map reduces to the diagram.
Working It Through
Step 1: Replace each land area with a vertex and each bridge with an edge
A graph is a collection of points, called vertices, joined by lines, called edges. Make one vertex for each land area: A for the island, B for the north bank, C for the south bank, and D for the eastern land. Then draw one edge for each bridge, joining the two areas it connects. A and B get two edges, as do A and C. A and D get one edge, as do B and D, and C and D.
This step throws away the width of the river, the length of each bridge, and the shape of the banks. What's left is which land areas each bridge connects. Euler made the same move by recording a walk as a sequence of land-area letters, ignoring everything else (Euler 1741, §§4–7).
Step 2: Count the edges at each vertex
The degree of a vertex is the number of edges that meet there. Count them from the table:
- A, the island: 2 + 2 + 1 = 5
- B, the north bank: 2 (to A) + 1 (to D) = 3
- C, the south bank: 2 (to A) + 1 (to D) = 3
- D, the eastern land: 1 (to A) + 1 (to B) + 1 (to C) = 3
As a check, add the degrees: 5 + 3 + 3 + 3 = 14. Each edge has two ends and adds 1 to the degree of each, so the degrees should add up to twice the number of edges. Twice 7 is 14, so the count is consistent. Euler tabulated the same numbers: 5 for the island and 3 for each of the other areas (Euler 1741, §14).
Step 3: Note the odd vertices
A vertex with an odd degree is an odd vertex. Here every vertex is odd: 5, 3, 3, and 3. That makes four odd vertices.
Odd vertices matter because every time a walk passes through a land area, without starting or ending there, it arrives by one bridge and leaves by another. Each pass uses two bridges, so an area that's only passed through needs an even number of them.
Step 4: Apply Euler's rule
Euler's rule says that a connected graph, one in which every vertex can be reached from every other, can have every edge traced exactly once only if it has zero or two odd vertices. With two, the route must start at one odd vertex and end at the other. With more than two, no such route exists (Euler 1741, §20).
The reason for "more than two" follows from Step 3. Only the start and the finish of a walk can have an odd number of bridges. Every other area must be even. Königsberg has four odd areas, but a walk has only two ends. At least two odd areas would have to be passed through without being an end, and that's impossible.
Euler also gave a second check, by counting appearances. A walk across all 7 bridges, written as a sequence of land areas, has 8 entries: the starting area and then one area after each crossing. An area touching 5 bridges must appear 3 times in the sequence, and an area touching 3 bridges must appear 2 times. That requires 3 + 2 + 2 + 2 = 9 entries, but the walk has only 8 (Euler 1741). The two methods agree.
Step 5: Ask what change would make a walk possible
A walk becomes possible when the number of odd vertices drops to two. Adding or removing one bridge changes the degree of two vertices by 1 each. If both of those vertices are odd, both become even, and the four odd vertices become two.
Add an eighth bridge between the north bank (B) and the south bank (C). Now the degrees are A: 5, B: 4, C: 4, D: 3. Only A and D are odd. Euler's rule says a walk exists, starting at one of them and ending at the other.
One such walk, written as a sequence of land areas, is A, B, A, C, A, D, B, C, D. It makes eight crossings and uses each bridge once, including the new one.
Removing a bridge works too. Without the bridge between the island and the eastern land, the degrees are A: 4, B: 3, C: 3, D: 2, and a walk from the north bank to the south bank crosses the remaining six bridges once each: B, A, B, D, C, A, C.
Key Considerations
Distances, the shape of the river, and the positions of the bridges are irrelevant; only which areas each bridge connects matters. Two layouts that look nothing alike have the same answer if they have the same graph.
The common mistake is concluding from failed attempts that no route exists. A thousand failed routes prove nothing about the routes not yet tried. Euler's argument shows that every route must fail, for a reason that doesn't depend on which route you pick.
Step 4 uses the half of Euler's rule that Euler proved: more than two odd vertices rule out a route. The other half, that zero or two odd vertices guarantee a route, he stated but didn't prove; the first full proof is credited to Carl Hierholzer and was published in 1873 (Grötschel and Yuan 2012). Step 5 doesn't depend on that proof, because it exhibits a route directly. Euler wrote of land areas and bridges; "vertex," "edge," and "degree" are later vocabulary.
Summary
Counting bridges at each land area settles the Königsberg puzzle for every possible route, and shows which single change would make a walk possible.
Degrees: island (A) 5, north bank (B) 3, south bank (C) 3, eastern land (D) 3. All four vertices are odd, and the degrees add to 14, twice the 7 bridges.
Verdict: more than two odd vertices, so no walk crosses each bridge exactly once.
One-bridge change: add a bridge between the north and south banks. The degrees become 5, 4, 4, 3, leaving two odd vertices (A and D). A walk then exists from the island to the eastern land: A, B, A, C, A, D, B, C, D.
- The degree sum checks Step 2: it must equal twice the number of edges.
- The verdict rests on the half of Euler's rule that Euler proved.
- The written-out walk checks the one-bridge change.
References
- Euler, Leonhard. 1741. "Solutio problematis ad geometriam situs pertinentis." Commentarii Academiae Scientiarum Imperialis Petropolitanae 8 (dated 1736). Eneström E53.
- Grötschel, Martin, and Ya-xiang Yuan. 2012. "Euler, Mei-Ko Kwan, Königsberg, and a Chinese Postman." In Optimization Stories, Documenta Mathematica Extra Volume ISMP, 43–50. doi:10.4171/DMS/6/10.