In 1736, the city of Königsberg had seven bridges, and its citizens amused themselves with a question: could you take a walk that crosses every bridge exactly once? Leonhard Euler proved you couldn't — and in doing so invented graph theory. His rule is almost insultingly simple, and we still use it today.
Now change one word. Instead of "cross every bridge once," ask: can you take a tour that visits every city exactly once? This is the Hamiltonian question, named for the mathematician William Rowan Hamilton.
The two puzzles look like twins. Both live on the same dots-and-lines diagram — a graph. Both ask for a single unbroken path. Yet one is among the easiest problems in computer science and the other is among the hardest. That gap is not an accident of phrasing. It is one of the cleanest windows we have into what makes a problem hard.
Comments
Loading comments...