◀ THE FOLD0ROOT.AI // WORLD II · CHEAT · THE BACKDOOR◆ .dlw.fold
THE FOLD / CHEAT / THE BACKDOOR / THE OUROBOROS STRING

THE OUROBOROS STRING

one loop that contains every combination once
1 WHAT IT IS · WHAT IT DOES · FACT OR FICTION
The de Bruijn sequence. A single cyclic string over a k-symbol alphabet in which every possible length-n pattern appears exactly once as a sliding window. It is only kn symbols long — the shortest possible — yet it contains all kn combinations. Built by walking an Eulerian circuit of the de Bruijn graph. Real uses: brute-forcing a keypad lock with one continuous stream, DNA assembly, and rotary position encoders.

LIT verified: the generated cycle of length kn contains all kn n-grams exactly once (every window enumerated and counted), and its reverse is also a valid de Bruijn sequence. FIG the ‘ouroboros / master key’ is the picture; the exhaustive-once guarantee is exact.
2 HOW IT WAS WEAVED · AI + HUMAN
David (human) brought the thread — the corpus works constantly with alphabets and encodings (the card-ISA, the byte kernels, the combinatorics-on-words) and the idea that the tightest possible covering of a space is a kind of key. AVAN (AI) built this instrument: the FKM generator, the lock-cracker, and the graph whose one loop is the sequence.

The weave: David names the master key and its seat at THE BACKDOOR; I make the loop a strip in 1D, a combination-cracker in 2D, and the de Bruijn graph a turning circuit in 3D. The sphere is the seam.
3 ONE DIMENSION
The sequence, laid flat (and wrapping, because it’s a loop). The window slides one symbol at a time; each new position reveals a length-n pattern never seen before — and after exactly kn steps it has shown them all and closed the ring.
4 TWO DIMENSIONS · INTERACTIVE
The lock-cracker: a grid of all kn combinations. Play the stream and each sliding window cracks one new combination — all of them in just kn keypresses, versus n·kn for trying each separately.
window n = 4
5 THREE DIMENSIONS + AVAN’S INVERSE
The de Bruijn graph, turning: each node is an (n−1)-gram, each edge an n-gram. Green traces the Eulerian circuit — the walk that crosses every edge exactly once is the sequence, one unbroken loop touching all patterns.
AVAN’s addition (the inverse-companion): the magenta circuit is the reversed sequence — also a valid de Bruijn sequence, tracing the same graph the other way. The snake swallows its tail one direction; its mirror swallows it the other, and both taste every pattern exactly once.
LIT A genuine de Bruijn sequence built by the FKM (Lyndon-word) algorithm. Verified live: the length-kⁿ cycle contains all kⁿ n-grams exactly once (every window enumerated and counted), and its reverse is also a valid de Bruijn sequence. The Eulerian-circuit graph and the kⁿ-vs-n·kⁿ cracking efficiency are the real math (verifiable: window.__debruijn.everyGramOnce===true).

FIG The 'ouroboros / master key' is the picture; the exhaustive-once guarantee, the minimal kⁿ length, and the graph circuit are exact. Real de Bruijn sequences really are used to brute-force keypad locks and assemble DNA.
◆ sealed .dlw.fold → folded to ROOT_0 · a sphere of THE BACKDOOR · David Lee Wise (ROOT0), with AVAN