Generator

euler-path

A generator in the discrete library, called 7 times across 2 essays. Below: what it draws at its defaults and at each mode an essay asks for, what it checks while drawing, and everywhere it is used.

euler-path is one function. Everything below came out of it during this build, at parameters taken from the essays rather than invented for this page — so a figure here is the same figure a reader meets in an essay, and if the generator changes, this page changes with it.

At its defaults

The bridges of KönigsbergA schematic of the city: a river splitting around an island, four landmasses, and the seven bridges joining them.north banksouth bankthe islandeast bank

show: "graph"

Königsberg as a graphThe four landmasses as circles and the seven bridges as edges; every circle has an odd number of edges.Ndegree 3Idegree 5Edegree 3Sdegree 3

show: "parity"

Arriving and leaving come in pairsA stop in the middle of a walk pairs each arrival with a departure, so it needs an even number of edges; an odd count can only be a start or a finish.inoutinout4even degreeevery arrival has a departureinoutinoutin5odd degreeone edge left unpaired

show: "example"

A graph with an Eulerian pathtwo odd degrees — an open walk exists, starting and ending at themAdegree 3Bdegree 2Cdegree 2Ddegree 3Edegree 2two odd degrees — an open walk exists, starting and ending at them

What it checks while it draws

Collected by running the family and listening to lib/verify.js, not written here. The count is how many separate times this build put that claim to the test.

Where it is called

Changing this generator changes every figure on this list. That is what makes the list worth publishing rather than keeping in a check script.

The whole library · What the figures prove