Generator

derange

A generator in the probability library, called 6 times across 1 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.

derange 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

All 24 arrangements of 4 objects, and the 9 that move every oneEvery permutation of 4 objects drawn as a grid of cells, with the diagonal — where an object stays where it began — shaded, and the arrangements that avoid it entirely marked.9 of the 24 arrangements put nothing back where it startedthe shaded diagonal is where an object stays put; a marked grid is one with no mark on it

show: "grid"

All 24 arrangements of 4 objects, and the 9 that move every oneEvery permutation of 4 objects drawn as a grid of cells, with the diagonal — where an object stays where it began — shaded, and the arrangements that avoid it entirely marked.9 of the 24 arrangements put nothing back where it startedthe shaded diagonal is where an object stays put; a marked grid is one with no mark on it

show: "one"

An arrangement that moves everythingObjects in a row and the places they are sent to, with an arrow from each object to its destination; no arrow is vertical.AobjectAplaceBobjectBplaceCobjectCplaceDobjectDplaceevery object has moved, so this is one of the 9 arrangements the search keeps

show: "sieve"

The alternating sum for 4 objectsOne bar per term: all 24 arrangements, less those fixing one object, plus those fixing two, and so on down to 9.all 24+24 running total 244 × 6−24 running total 06 × 2+12 running total 124 × 1−4 running total 81 × 1+1 running total 9and the answer is 924 − 24 + 12 − 4 + 1 = 9the kth term counts the arrangements that fix a chosen k of the 4, and it is added or subtracted according to whether k is evenor odd

show: "ratio"

The share of arrangements that fix nothing, up to 8 objectsA bar per number of objects, giving the proportion of its arrangements that leave nothing in place, against the horizontal line at 1/e.1234567800.10.20.30.40.50.6objectsshare fixing nothing00/10.51/20.33332/60.3759/240.366744/1200.3681265/7200.36791854/50400.367914833/403201/e = 0.3679the proportion alternates above and below 1/e = 0.3679 and is within a thousandth by seven objects

What it checks while it draws

Collected by running the family and recording what it asserted, not written here. The count is how many separate times the claim was put to the test while these drawings were made.

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