Probability Galton Board
Galton Board — Binomial Distribution & CLT
Drop balls through n rows of pegs (p per deflection) and watch B(n,p) converge to the normal curve. Live PMF and σ tracking.
Why the bell curve emerges
Every ball's journey through the Galton board is a sequence of n independent Bernoulli trials. The bin it lands in equals the number of rightward deflections k, which follows the binomial distribution:
The Central Limit Theorem states that for large n, a sum of independent identically distributed random variables approaches a normal distribution, regardless of the shape of the individual variable's distribution. For the Galton board:
With n = 4 the histogram looks discrete and rough. At n = 12 the outline already traces the familiar bell curve remarkably well. The simulation shows both the exact binomial PMF (dashed orange) and the smooth normal approximation (teal), letting you watch the convergence happen as you drag the slider.
Galton originally used this to argue that hereditary traits regress to the population mean (hence "regression to the mean"), but the mathematical structure underpins statistics, finance, signal processing, and quantum mechanics.
Try the Galton Board →Chemistry Belousov-Zhabotinsky Reaction
Belousov-Zhabotinsky Reaction — Chemical Spiral Waves
3-state excitable-medium CA: resting→excited→refractory→resting, producing self-organized spiral waves. Click to plant sparks.
Chemistry that thinks for itself
When Boris Belousov mixed malonic acid, bromate and a cerium catalyst in 1951, he expected an equilibrium endpoint. Instead, the mixture oscillated: colour oscillating between yellow and colourless, repeating for minutes. His result was initially rejected as impossible — thermodynamics seemed to forbid sustained oscillations. Zhabotinsky later showed in 1961 that not only could the reaction oscillate in a stirred flask, but in a thin unstirred layer it spontaneously formed concentric rings and spiral waves.
The excitable-medium mechanism
Far from equilibrium, certain reaction-diffusion systems behave as excitable media: a small perturbation can propagate as a self-sustaining wave. The key ingredients are:
- Excitation — a resting region is ignited by sufficient excited neighbours
- Propagation — the excited state spreads outward
- Refractoriness — a trailing refractory region prevents backward propagation, forcing waves to travel in one direction
- Recovery — after the refractory period, cells can be re-excited
The Greenberg-Hastings model captures this behaviour with three states and simple counting rules. An asymmetric initial seed breaks the rotational symmetry and creates spiral pairs. The spirals rotate with a period determined by the refractory time and excitation threshold.
The same mechanism — excitable medium, refractory tail, spiral re-entry — underlies cardiac arrhythmias, forest fire fronts, and cortical spreading depression in the brain.
Try the BZ Reaction →Algorithms Turing Machine
Turing Machine — Step-by-Step Tape Simulator
Animated tape, highlighted transition table, five built-in programs: binary ++, unary add, palindrome, copy, busy beaver.
The simplest possible universal computer
Alan Turing's 1936 machine consists of just four things: an infinite tape of symbols, a read/write head, a finite set of states, and a transition function. Yet this minimal model is computationally equivalent to every modern computer ever built — the Church-Turing thesis states that any effectively computable function can be computed on such a machine.
Why the halting problem matters
Turing proved a profound negative result: there is no algorithm that can determine, for an arbitrary Turing machine and input, whether the machine will eventually halt or run forever. This halting problem is undecidable — not just hard, but provably impossible. The proof uses a diagonalisation argument: assume a decider H(M, w) exists; construct a machine D that runs H on itself and does the opposite. D leads to a contradiction.
This result cascades into real-world software: it is impossible, in general, to prove that a program is free of infinite loops, that it will never crash, or that two programs compute the same function. This is why formal program verification remains a research frontier.
The busy beaver problem
How many 1s can an n-state Turing machine write on a blank tape before halting? The busy beaver function Σ(n) grows faster than any computable function — it is non-computable. The 3-state champion writes 6 ones in 14 steps. Σ(5) = 4098 (proved 2024), Σ(6) is unknown. Try the 3-state busy beaver in the simulator; watch it write in seemingly random directions before halting with a tightly packed block of ones.
Try the Turing Machine →Three Disciplines, One Theme: Emergent Complexity
All three simulations in Wave 58 share a common thread: simple local rules produce complex global behaviour.
- The Galton board: each peg interaction is a single coin flip; the aggregate bins produce an unexpected smooth curve — the normal distribution.
- The BZ reaction: each cell checks eight neighbours against a threshold; the aggregate behaviour is global rotating spirals that can persist for thousands of generations.
- The Turing machine: each step reads one symbol and applies one rule; the aggregate computation can evaluate any mathematical function.
This connection — local rules, global emergence — is at the heart of complexity science and appears throughout the mysimulator.uk library, from cellular automata and neural networks to flock dynamics and market simulations.