Gradient

Courses

∇\nabla∇The maths behind AI0/72
π\piπMaths0/84
⋆\star⋆AI for everyone0/10
Γ\GammaΓGame theory0/49
py\texttt{py}pyPython for AI0/15
y^\hat{y}y^​Build your own AI0/15
All courses

Tuition

My tuitionOlympiad trackCompetitions

Practice

ProjectsAsk a questionTrain on a GPUExplorationsMaths StoriesUnsolved problemsPlaygroundScience labsMock testsOlympiad

Reference

GlossaryBlogDiscoveries
Maths Stories › The seven bridges

The seven bridges of Königsberg and the birth of graph theory

Can you walk round a town crossing every bridge exactly once? Euler proved you cannot, and invented a new kind of maths.

  • Leonhard Euler
  • 1736
  • Königsberg, Prussia (now Kaliningrad, Russia)

The story

The town of Königsberg was built where a river splits round an island. Seven bridges joined the four pieces of land. On Sunday walks, people tried to cross every bridge once, and only once. Nobody ever managed it, and nobody could say why.

Leonhard Euler, a Swiss mathematician, solved it in 1736 by throwing away almost everything. The shape of the land and the length of the bridges did not matter. Only one thing did: which pieces of land are joined, and by how many bridges.

He turned each piece of land into a dot and each bridge into a line. Then he noticed: every time you walk through a place, you use one bridge in and one bridge out. So every place in the middle of your walk needs an even number of bridges. Only the start and the end can be odd. Königsberg had four places with an odd number of bridges, so the walk was impossible. Dots and lines like these, now called graphs, run today’s maps, networks and the internet.

Play with it

How it works, step by step

  1. 1

    Turn each piece of land into a dot and each bridge into a line.

  2. 2

    Count the lines at each dot: this is its degree.

  3. 3

    Passing through a dot uses two lines, so middle stops need an even degree.

  4. 4

    A walk using every line once works only if 0 or 2 dots have an odd degree.

  5. 5

    Königsberg had 4 odd dots, so no such walk exists.

A path that uses every line once exists only if 0 or 2 points have an odd number of lines.

Try it yourself

  1. 1A shape has 6 corners where an odd number of lines meet. Can you draw it without lifting your pen or retracing a line?

  2. 2In Königsberg, how many of the four pieces of land had an odd number of bridges?

  3. 3If exactly 2 places have an odd number of bridges, where must the walk start?

Did you know?

  • Such a walk is called an Euler path, and a round trip is an Euler circuit.
  • The same rule tells you whether you can draw a shape without lifting your pen or going over a line twice.
  • Two of the seven bridges were destroyed in 1944 during the Second World War.
PreviousMeasuring the EarthNextAchilles and the tortoise