Mathematical Wonders

Seven bridges.
One impossible walk.

Use Euler’s bridge puzzle to learn how graphs describe routes, connections and the trade-offs behind network decisions.

Turn a map into a graph

Can you walk across each of Königsberg’s seven bridges exactly once? Keep only four land areas and the connections between them. Land areas become vertices and bridges become edges, including parallel edges when two bridges join the same areas.

At any vertex where a walk starts neither nor ends, every arrival pairs one bridge with a departure. Its degree, or incident-edge count, must be even. An open walk can have exactly two odd-degree vertices, and a circuit has zero. Conversely, those parity conditions suffice for a connected graph. The original puzzle has four odd degrees: 5, 3, 3 and 3.

Add a bridge

The abstract map keeps the original degree pattern. Add a bridge between B and C and test the new parity conditions.

Degrees A, B, C, D: 5, 3, 3, 3. An edge-once walk is impossible.

Read the sources · Euler Archive · Euler’s original bridge paper

Why parity is enough

When all degrees are even, follow unused edges until you cannot continue. You must finish at the start, since at any other vertex you have used an odd number of incident edges on arrival and there must be an unused edge to leave by. If some edges remain, connectivity gives you a vertex on the tour where you can start another closed tour and splice it in. Continue until all edges are used.

For exactly two odd vertices, add a temporary edge between them. The new graph has an edge-once circuit. Removing the temporary edge opens the circuit into the required walk.

What changes when edges have costs?

If a street sweeper must service every street and can repeat streets, the question is which repetitions add the least cost. That is an instance of the route inspection problem. If a passenger simply wants to get from A to B in the least time, the task is instead a shortest-path problem. Both can start with the same graph and require different objectives.

Real routing also needs constraints such as one-way streets, closures, vehicle capacities or delivery windows. Good models make those conditions explicit. The routes can then be tested against travel times and delays.

Can exactly one vertex have odd degree?

Draw a finite graph with exactly one odd-degree vertex, or explain why you cannot.

Reveal the explanation

Every edge contributes two to the sum of all degrees. The sum is even, so the number of odd terms in the sum is even. This works with parallel edges and with loops counted twice.

Explore the archive

Search page titles and topics. Press / to open. Esc to close.