Skip to main content
Mind School·Game·Honor-system

Jiulianhuan (Nine Linked Rings)

A 500-year-old Chinese puzzle that contains the kernel of modern digital electronics.

Play It

Characterization

Jiulianhuan — the Nine Linked Rings — is a Chinese mechanical disentanglement puzzle in which nine interlocking rings must be removed from a looped bar by a recursive sequence of moves. The puzzle is attested no later than the early sixteenth century in Yang Shen's Sheng'an ji; legend attributes its invention to the second-century general Zhuge Liang, who is said to have devised it as a gift for his wife during a military campaign. It appears in Cao Xueqin's Dream of the Red Chamber, where Lin Daiyu and Jia Baoyu play with it, and was presented as a treasured gift to the Kangxi Emperor on his sixtieth birthday. The nineteenth-century French mathematician Édouard Lucas — inventor of the Tower of Hanoi — found that the solution follows an elegant recursive structure isomorphic to a Gray code: the binary numbering system in which adjacent integers differ by only one bit. This isomorphism makes the Nine Linked Rings an artefact in which a Ming-era toy contains the algorithmic kernel of twentieth-century digital electronics, since Gray codes are foundational to error-correction, rotary encoders, and signal processing. The Academy hosts Jiulianhuan in the Mind School because it is the discipline of one-bit-at-a-time patience: the puzzle teaches, in the hands, what recursion teaches in the mind — that the path to the solution passes through every intermediate state, and that no step can be skipped.

Lineage

Earliest textual attestation in Yang Shen, Sheng'an ji (early 16th c.). Legendary attribution to Zhuge Liang (2nd–3rd c. CE) recorded by Stewart Culin in Games of the Orient (1895). Appears in Cao Xueqin's Dream of the Red Chamber (c. 1760). The recursive mathematical solution discovered by Édouard Lucas, Récréations Mathématiques, vol. 1 (1882), who also named the related Baguenaudier. The Gray code isomorphism explicated in Martin Gardner, Mathematical Puzzles and Diversions (1959), and in Andreas Hinz, Sandi Klavžar, and Ciril Petr, The Tower of Hanoi — Myths and Maths (2nd ed., Birkhäuser, 2018).

From the Library

All Library entries for Jiulianhuan (Nine Linked Rings)

Quests

Three quests — one for each archetype. Choose the one that fits your way of taking up the discipline.

  • Design a variant of the Nine Linked Rings — by adding rings, by modifying the interlock pattern, or by mapping the puzzle onto a different binary or Gray-code structure. Analyse the variant's solution length and compare it to the classical 341-move solution for nine rings.

    No attestations yetOpen →
  • The Adventurer

    Nine Rings Freed

    Solve a physical or simulated Jiulianhuan (Nine Linked Rings) puzzle from its initial locked state to full release. Time yourself and note the recursive rhythm of the solution — the way the last ring must wait while all others are reset.

    No attestations yetOpen →
  • Trace the lineage of the Nine Linked Rings from its Chinese literary and legendary origins (Yang Shen, Zhuge Liang, Dream of the Red Chamber) through Édouard Lucas's mathematical analysis to the modern understanding of its isomorphism with Gray codes. Cite at least three sources spanning the cultural and mathematical history.

    No attestations yetOpen →