A Sunday puzzle
The city of Konigsberg in Prussia (now Kaliningrad) was split by the Pregel river, with two islands in the middle and seven bridges joining the four land areas. For years, residents amused themselves with a challenge: can you walk through the city crossing every bridge exactly once, never retracing a bridge? Nobody could do it - but nobody could prove it could not be done, either.
In 1736 the problem reached Leonhard Euler, one of the greatest mathematicians who ever lived. Euler did something that looks obvious only in hindsight: he threw away the map. The sizes of the islands, the lengths of the bridges, the streets - all irrelevant. He shrank each land area to a dot and drew each bridge as a line joining dots. The walking puzzle had become a puzzle about a diagram - what we now call a graph.
Odd dots decide everything
Here is Euler's insight. On any route that uses every line exactly once, each time you enter a dot by one bridge you must leave by another - so the bridges at a dot pair up, entry with exit, except possibly at the start and finish of the walk. Therefore a one-stroke route can exist only if the diagram has zero dots with an odd number of bridges (start anywhere, end where you began) or exactly two (start at one, end at the other).
Now count Konigsberg. The central island has 5 bridges; each of the other three land areas has 3. All four dots are odd - four more than the rule allows. No route exists, and no amount of cleverness can change that. Euler had not just solved a puzzle; he had invented a new branch of mathematics, graph theory, which today sits underneath road networks, the internet and social media alike.
Try it yourself
Draw the classic house - a square with a triangular roof sharing the top edge - and try to draw it in one stroke without lifting your pen or retracing. Count the odd corners first: exactly two corners have an odd number of lines (the two top corners of the square, where wall, roof and ceiling meet, have 3 each), so Euler promises it can be done - start at one odd corner and finish at the other.
Then draw shapes that defeat you on purpose - a square with both diagonals has four odd corners - and feel the theorem working in reverse. You now own a piece of mathematics that began as a Sunday walk.

