Information Theory &
the King Wen Sequence
Analyzing the mathematical properties of the ancient ordering through the lens of Shannon entropy and Hamming distance.
Key Metrics
Shannon Entropy
6.0bits
Maximum for 64 patterns
Mean Hamming Distance
3.35
vs 3.0 random expectation
Unique Patterns
64/64
Complete coverage of 6-bit space
Interpretation
What This Means
The 64 hexagrams of the I Ching represent all possible 6-bit binary patterns (26 = 64). Each hexagram is a unique combination of six lines, either solid (yang, 1) or broken (yin, 0). Together they exhaust the combinatorial space completely.
The King Wen sequence achieves maximum Shannon entropy — it uses every pattern exactly once, meaning no information is wasted through repetition. In information-theoretic terms, each position in the sequence carries the full log2(64) = 6.0 bits of information.
Perhaps more revealing: the mean Hamming distance between consecutive hexagrams is 3.35, which exceeds the random expectation of 3.0. This suggests the ancient sequence favors larger transitions between consecutive entries — maximizing “information surprise” at each step. Each new hexagram tends to differ from its predecessor in more bit positions than random chance would predict.
Transition Analysis
Consecutive Distance Profile
Hamming distance between each consecutive pair in the King Wen sequence. 63 transitions, colored from jade (low distance) to vermillion (high distance).
Maximum Distance (6)
#1→#2, #11→#12, #17→#18, #27→#28, #29→#30, #38→#39, #53→#54, #61→#62, #63→#64 — complete bit inversion between consecutive hexagrams (9 occurrences)
Minimum Distance (1)
#52→#53, #60→#61 — only a single bit changes (2 occurrences)
Distribution
Distance Distribution
How many of the 63 consecutive transitions have each Hamming distance value. Note the absence of distance 5 and the strong preference for distances 2 and 4.
Mean
3.35
Median
3
Std Dev
1.38
Range
1–6
Research Connection
From Theory to Experiment
Our research tests whether these information-theoretic properties — maximum pattern diversity and above-random transition distances — translate into superior learning optimization when applied to multi-agent strategy. If the King Wen sequence's bias toward high-information transitions creates better exploration of the strategy space, it could outperform standard optimization approaches.
Sources & Further Reading
- Shannon, Claude E. “A Mathematical Theory of Communication.” Bell System Technical Journal, vol. 27, no. 3, 1948, pp. 379–423. The foundational paper defining information entropy, applied here to analyze the King Wen sequence's pattern diversity.
- Hamming, Richard W. “Error Detecting and Error Correcting Codes.” Bell System Technical Journal, vol. 29, no. 2, 1950, pp. 147–160. Original definition of Hamming distance — the metric used here for measuring transition magnitude between consecutive hexagrams.
- Wilhelm, Richard, trans. The I Ching, or Book of Changes. Rendered into English by Cary F. Baynes. 3rd ed., Princeton University Press, 1967. The standard scholarly translation establishing the 64 hexagrams as a complete binary system.
- Shaughnessy, Edward L. Unearthing the Changes: Recently Discovered Manuscripts of the Yi Jing. Columbia University Press, 2014. Archaeological evidence from Mawangdui for an alternative hexagram ordering, providing a comparative baseline for analyzing the King Wen sequence's structural properties.
- Ryan, James A. “Leibniz' Binary System and Shao Yong's Yijing.” Philosophy East and West, vol. 46, no. 1, 1996, pp. 59–90. On the relationship between the I Ching's binary representations and Leibniz's independent discovery of binary arithmetic.
- 焦贛 (Jiao Gan, fl. 1st century BC). 焦氏易林 (Jiaoshi Yilin). The 4,096 hexagram-to-hexagram transformation verses — a complete mapping of all possible state transitions in the hexagram system. 四庫全書 (Siku Quanshu) edition.
- Chan, Augustin. King Wen Sequence as Learning Optimization: Testing Ancient Algorithms Against Modern ML. Zenodo, 2025. [PDF] The research paper testing whether the sequence's information-theoretic properties translate into superior learning optimization.