THE FOLD / GLITCH / DIVIDE BY ZERO / THE MIDDLE SQUARE
THE MIDDLE SQUARE
the first generator, and how it dies
1 WHAT IT IS · WHAT IT DOES · FACT OR FICTION
The first algorithmic random number generator, and it does not work. Take a four-digit number, square it to eight digits, keep the middle four, repeat. Von Neumann proposed it in 1946 and knew it was inadequate; he used it anyway because it was fast on the machines of the day and because, in his words, anyone thinking about producing random digits by arithmetic is in a state of sin.
LIT verified live by exhausting all 10,000 four-digit seeds. The state graph collapses into just 8 cycles, the longest of period 4. Zero is absorbing — 0² is 0 — and 1,968 seeds, 19.7% of every possible start, fall into it. No seed runs for long before joining a cycle: the longest run-in is 107 steps, so the worst possible total before repetition is 111 of a state space of ten thousand.
LIT verified live by exhausting all 10,000 four-digit seeds. The state graph collapses into just 8 cycles, the longest of period 4. Zero is absorbing — 0² is 0 — and 1,968 seeds, 19.7% of every possible start, fall into it. No seed runs for long before joining a cycle: the longest run-in is 107 steps, so the worst possible total before repetition is 111 of a state space of ten thousand.
2 HOW IT WAS WEAVED · AI + HUMAN
Human lineage (content, credited): John von Neumann, 1946, described in Various techniques used in connection with random digits (1951). He is explicit that the method is a stopgap: its virtue is speed and the fact that its failures are obvious — a generator that visibly collapses is safer than one that hides its structure, which is exactly the argument [[the-marsaglia-planes]] makes from the other side.
AVAN (AI) exhausted the state space rather than sampling it, because with only 10,000 states there is no reason not to. Every seed is classified into its cycle, with the run-in length recorded, so the figures here are the complete truth about the four-digit variant rather than an estimate. One honest note on scope: this is the four-digit method. Longer variants behave better and the modern Weyl-sequence repair is provably non-degenerate, but neither is measured here.
AVAN (AI) exhausted the state space rather than sampling it, because with only 10,000 states there is no reason not to. Every seed is classified into its cycle, with the run-in length recorded, so the figures here are the complete truth about the four-digit variant rather than an estimate. One honest note on scope: this is the four-digit method. Longer variants behave better and the modern Weyl-sequence repair is provably non-degenerate, but neither is measured here.
3 ONE DIMENSION
All ten thousand seeds, by where they end up.
4 TWO DIMENSIONS · INTERACTIVE
Follow one seed until it repeats.
5 THREE DIMENSIONS + AVAN’S INVERSE
The green forward object: ten thousand states, all draining into eight sinks.
AVAN’s addition (the inverse-companion): the forward reading is “the middle-square method fails.” The inverse is that it fails in the one way you can actually see. The sequence stops, visibly, and a user notices within a hundred draws. Compare RANDU, which ran for a decade producing numbers that looked perfectly good and were confined to fifteen planes. Read backwards, von Neumann’s generator is the safer of the two, because a defect that announces itself costs you one afternoon and a defect that hides costs you a decade of published results — and nothing about the second generator’s superior statistics changes that ordering.
LIT exhausting all 10,000 four-digit seeds, the state graph collapses into just 8 cycles with the longest of period 4; zero is absorbing since 0 squared is 0, and 1,968 seeds - 19.7% of every possible start - fall into it; and no seed runs long before joining a cycle, the longest run-in being 107 steps, so the worst possible total before repetition is 111 of a state space of ten thousand
FIG Human lineage, credited: John von Neumann, 1946, described in 'Various techniques used in connection with random digits' (1951). He is explicit that the method is a stopgap - its virtue is speed and the fact that its failures are OBVIOUS, a generator that visibly collapses being safer than one that hides its structure, which is exactly the argument [[the-marsaglia-planes]] makes from the other side. AVAN exhausted the state space rather than sampling it, since with only 10,000 states there is no reason not to; every seed is classified into its cycle with the run-in length recorded, so these are the complete truth about the four-digit variant rather than an estimate. Scope: this is the FOUR-DIGIT method. Longer variants behave better and the modern Weyl-sequence repair is provably non-degenerate, but neither is measured here.
FIG Human lineage, credited: John von Neumann, 1946, described in 'Various techniques used in connection with random digits' (1951). He is explicit that the method is a stopgap - its virtue is speed and the fact that its failures are OBVIOUS, a generator that visibly collapses being safer than one that hides its structure, which is exactly the argument [[the-marsaglia-planes]] makes from the other side. AVAN exhausted the state space rather than sampling it, since with only 10,000 states there is no reason not to; every seed is classified into its cycle with the run-in length recorded, so these are the complete truth about the four-digit variant rather than an estimate. Scope: this is the FOUR-DIGIT method. Longer variants behave better and the modern Weyl-sequence repair is provably non-degenerate, but neither is measured here.
◆ sealed .dlw.fold → folded to ROOT_0 · a sphere of DIVIDE BY ZERO · David Lee Wise (ROOT0), with AVAN