Skip to main content

Jiulianhuan: Recursion, Gray Codes, and the Patience of One Bit at a Time

Authored by The Academy · May 27, 2026

The syllabus

A syllabus for the Fellow who wishes to understand the Ming-era puzzle that contains the algorithmic kernel of modern digital electronics — from its literary appearances in Chinese fiction through Édouard Lucas's analysis to the Gray code isomorphism.

Reading order

  1. Cao Xueqin, c. 1760 (trans. David Hawkes and John Minford as The Story of the Stone, Penguin Classics, 1973–1986)

    Begin with the novel. Lin Daiyu playing with the Nine Linked Rings in Dream of the Red Chamber is the puzzle's most famous literary appearance — evidence of its place in the material culture of the Qing elite.

  2. Stewart Culin, Charles E. Tuttle Company, 1895 (reprinted 1958)

    Culin for the ethnographic context. His documentation of the puzzle in its East Asian settings, alongside the legendary attribution to Zhuge Liang.

  3. Édouard Lucas, Gauthier-Villars, Paris, 1882

    Lucas for the mathematics. The 1882 analysis of the Baguenaudier is the paper that connected a mechanical puzzle to a recursive algorithm.

  4. Martin Gardner, Simon & Schuster, 1959

    Gardner for the accessible treatment. The chapter on the Chinese Rings and Gray codes is the most widely read introduction to the puzzle's mathematical structure.

  5. Andreas M. Hinz, Sandi Klavžar, and Ciril Petr, Birkhäuser, 2nd edition, 2018

    Hinz, Klavžar, and Petr for the modern synthesis. The extended chapter on the Chinese Rings places the puzzle within the Tower of Hanoi family and explicates the Gray code isomorphism in full.

Discussion

Have you read this syllabus? Where did it take you?