In the 1730s, Leonhard Euler lived in the Prussian city of Königsberg. The Pregel River runs around the center of the city (Kneiphof) and then splits into two parts. The city was then quite prosperous and the volume of commerce justified connections between the separated land masses by seven bridges. A popular problem of the day was to find a continuous path which would cross all seven bridges once and only once.

You can try to solve this problem by first dragging the locator to some starting point, then clicking at points that define a path. Points can then be moved, or removed (Alt-click).

We apologize for your futile efforts in trying to solve the problem. In fact, Euler proved that no solution exists. It is easy to see why. The four land masses are the north and south shores and the two islands. Any path must arrive at and depart from a land mass via two different bridges (lest one bridge be used twice), so for any legal path to exist, each land mass must be approachable by an even number of bridges.

Euler's more sophisticated treatment can be considered as the beginning of what is now graph theory and, more generally, the entire field of topology.

Snapshot 1: an illegal solution since one bridge is crossed twice

Snapshot 2: adding an eighth bridge can make the problem solvable

Snapshot 3: with two of the bridges destroyed by bombing in World War II, another solution is possible