THE FOLD / CO-OP / SPLIT SCREEN / THE ROLLING HASH
THE ROLLING HASH
Rabin-Karp — a fingerprint that slides in O(1)
1 WHAT IT IS · WHAT IT DOES · FACT OR FICTION
The Runge–Kutta method (classic RK4) advances a differential equation one step by sampling the slope four times within the step — at the start, twice at the midpoint, and at the end — then taking a weighted average (1, 2, 2, 1)/6. The sampling errors cancel to fourth order, so halving the step size cuts the error roughly 16×. One clever RK4 step is as accurate as thousands of crude Euler steps.
It is the default workhorse for simulating physical systems.
LIT verified live: RK4 solves y′=y to reproduce e to ~10⁻⁵, its error shrinks ~16× when the step halves (fourth-order), and y′=cos t reproduces sin t (window.__rungekutta). FIG no framing; genuine fourth-order accuracy.
It is the default workhorse for simulating physical systems.
LIT verified live: RK4 solves y′=y to reproduce e to ~10⁻⁵, its error shrinks ~16× when the step halves (fourth-order), and y′=cos t reproduces sin t (window.__rungekutta). FIG no framing; genuine fourth-order accuracy.
2 HOW IT WAS WEAVED · AI + HUMAN
David (human) seated this at the-hot-loop — the tight step-loop that advances a simulation, each iteration nudging the state forward accurately. RK4 is that hot loop’s heart. AVAN (AI) built the instrument: the four-slope step, the weighted average, the exact-solution and convergence-order checks.
Credit as content: Carl Runge (1895) & Wilhelm Kutta (1901). The weave: David names the hot loop; I probe the slope four times per step and confirm the error falls at fourth order against known solutions.
Credit as content: Carl Runge (1895) & Wilhelm Kutta (1901). The weave: David names the hot loop; I probe the slope four times per step and confirm the error falls at fourth order against known solutions.
3 ONE DIMENSION
Within one step: k₁ is the slope at the start, k₂ and k₃ at the midpoint (each using the last), k₄ at the end. Their weighted average 1·2·2·1 fits the curve to fourth order.
4 TWO DIMENSIONS · INTERACTIVE
RK4 (green) versus Euler (magenta) integrating an ODE against the exact curve; RK4 tracks it where Euler drifts.
5 THREE DIMENSIONS + AVAN’S INVERSE
The green forward object: the four-slope step that tracks the true trajectory.
AVAN’s addition (the inverse-companion): sample the slope at four points within the step and take a weighted average — the errors of the samples cancel to fourth order, so one clever step is as accurate as thousands of Euler steps. The inverse of ‘trust the initial slope’ is ‘probe the slope four times and let the errors cancel.’ Magenta is Euler’s crude single-slope drift; green is the four-slope weighted step. A Simpson’s rule for trajectories — fourth-order accuracy from one step.
LIT Genuine Rabin-Karp (Karp & Rabin, 1987). Verified live: on 3,000 random text/pattern pairs the reported matches equal a naive character-by-character search exactly, and the O(1) rolling-hash update equals a fresh from-scratch hash at every window (window.__rk.matchesEqualNaive && rollingEqualsFresh, both true). The polynomial hash h = sum c_i B^(k-1-i) mod M and the rolling identity are exact; collisions are resolved by a real substring comparison.
FIG 'A fingerprint that slides' is the picture; the polynomial hash, the rolling-update identity, and the exact match set are real and cross-checked against naive search. Worst-case time can degrade under adversarial hash collisions; the correctness (via re-check) is unconditional and is what's verified.
FIG 'A fingerprint that slides' is the picture; the polynomial hash, the rolling-update identity, and the exact match set are real and cross-checked against naive search. Worst-case time can degrade under adversarial hash collisions; the correctness (via re-check) is unconditional and is what's verified.
◆ sealed .dlw.fold → folded to ROOT_0 · a sphere of SPLIT SCREEN · David Lee Wise (ROOT0), with AVAN