How many nodes reach each level, n = 20,000, p = 0.5
How many nodes reach each level, n = 20,000, p = 0.5
The bars are the measured share of nodes whose height is exactly that level; the open markers are p^(l−1)(1−p), the share the geometric promotion rule predicts. The worst departure across the 8 levels drawn is 0.32 percentage points. The tallest node in this build reached level 20, which is above the axis: the distribution has a tail, and the height of a skip list is a random variable rather than a bound.
Drawn at 690 × 352, wide on the page.
Everything above is what level-distribution returns with no arguments; the caption is the
generator's own, computed from the numbers in the drawing rather than written beside it.
2 essays call
level-distribution. The drawing above is what it returns with no arguments at all; every
call below passes it something, because a placement that passes nothing draws whichever
member of the family the generator happens to default to rather than the one its essay
argues about — which is what optcheck and figfill exist to catch.
Where it is called
Changing this generator changes every one of these figures.