On this page
The city of Königsberg in Prussia (now Kaliningrad, Russia) was built on the River Pregel. The river divided the city into four distinct landmasses: two large islands and two mainland banks. Connecting these landmasses were seven bridges. In the 18th century, the townspeople entertained themselves with a popular puzzle: could a person plan a walk through the city that crossed every single bridge exactly once?
The Swiss mathematician Leonhard Euler heard about the puzzle. While he initially thought it had little to do with mathematics, his analysis in 1736 became one of the most famous proofs in history. By solving a local walking puzzle, Euler accidentally invented an entirely new branch of mathematics.
What is the Euler Seven Bridges of Königsberg problem?
The problem asks for an unbroken path across a very specific physical layout. The central island, Kneiphof, had five bridges connecting it to the other landmasses. The other island and the two mainland banks had three bridges each.
To solve the puzzle by trial and error, a person would have to map out endless routes, turning left instead of right, tracking back over different bridges, and eventually finding that every route seemed to leave one bridge uncrossed or forced a double-crossing. This brute-force method was tedious and prone to mistakes.
Euler realised that the physical map—the distances between the bridges, the size of the islands, and the exact shape of the river—did not matter at all. The only thing that mattered was how the landmasses were connected to one another. This leap of abstraction was his greatest insight.
How did Euler solve the bridge problem?
Euler stripped the city map down to an abstract framework. He represented each of the four landmasses as a single point, which we now call a node or a vertex. He then represented each of the seven bridges as a line connecting these points, which we now call an edge.
Once he had this simplified picture, Euler looked at the fundamental rules of walking. Every time you walk onto a landmass via one bridge, you must walk off it via another bridge, unless you are starting or ending your journey on that specific landmass. Therefore, bridges must come in pairs for any landmass in the middle of the route.
This means that for a continuous path to exist—now known as an Eulerian trail—every node must have an even number of edges attached to it, except for the start and end nodes. A solvable graph can have at most two nodes with an odd number of edges (an "odd degree"). If you want to start and finish in the same place, a true Eulerian circuit, every single node must be even.
In Königsberg, the four nodes had exactly 3, 3, 3 and 5 edges. Because all four nodes had an odd degree, Euler proved that the walk was mathematically impossible.
Why did this start graph theory?
Euler's paper, published a few years later, is widely considered the first theorem in graph theory. Before this, geometry dealt strictly with precise measurements such as angles, lengths and areas. Euler's solution ignored measurement entirely. It focused only on position and connectivity, laying the groundwork for a new field called topology.
The abstraction of physical things into nodes and edges is now a cornerstone of mathematics. It appears in the discrete mathematics of John Conway and the Game of Life on a grid, and in the collaborative network analysis pioneered by Paul Erdős and the problems that linked mathematicians. Today, graph theory is not just for puzzles; it runs the algorithms that route internet traffic, model social networks, and optimise delivery schedules for global shipping companies.
How does network logic apply to modern problems?
When you learn graph theory, you move from tracing lines on a map to proving universal rules. It is a profound shift from calculation to pure logic. Once you understand why a graph with four odd nodes cannot be traversed, you can instantly evaluate an enormous network without tracing a single path.
If you are stuck on a graph theory homework question, the Fermi Problem Library has worked problems with a step-by-step solver that explains the reasoning rather than printing an answer. This approach helps you see the underlying structure of the problem, just as Euler did.
If you want to study the deeper principles of discrete mathematics, Fermi's AI tutor can work out what you already know and build a plan for the session. By guiding you through the same leaps of abstraction that Euler made in 1736, it helps you master the logic behind the formulas.



