arXiv:2610.33676math.COOct 2026

Manuscript Offprint

arXiv:2610.33676

Extremal diagonal-coherent binary codes: shortened Hamming cores, deep holes, and the 64 I-Ching hexagrams

Jon-Lark Kim

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

Each of the 64 hexagrams of the I-Ching, or Book of Changes, is a stack of six Yin-Yang lines and is therefore a binary vector of length 6; the eight hexagrams formed by repeating a single trigram span a doubled-trigram subspace Δ\Delta. We ask which binary [6, 3, 3] codes are compatible with this trigram structure. We show that a [6, 3, 3] code meets Δ\Delta in at most four codewords, that the four are then forced to be the doubled trigrams Earth, Fire, Wind and Lake, and that exactly two codes attain this bound: the shortened Hamming code CAC_A and its dual. Since CAC_A has covering radius 2, its eight codewords, their radius-one balls, and its eight deep holes together reconstruct all 64 hexagrams. In general, we call a binary code of length 2m2m with d≥3d \geq 3 diagonal-coherent if it contains the half of the diagonal subspace {(u,u)}\{(u, u)\} coming from even-weight vectors uu — the largest part of that subspace a single-error-correcting code can contain — and extremal if its dimension is as large as possible. For m≥2m \geq 2 and r=⌈log⁡2(2m+1)⌉r = \lceil \log_2(2m + 1) \rceil, we determine the number N(m)N(m) of extremal diagonal-coherent codes with parameters [2m,2m−r,≥3][2m, 2m - r, \geq 3], show that diagonal coherence entails no loss of redundancy, and determine their minimum distances. We also put these codes in a normal form, determine their hulls, and show that each has covering radius 2 with exactly 2r−1−2m2^r - 1 - 2m deep-hole cosets. Finally we propose three open problems.

Keywords covering radius, deep hole, diagonal-coherent code, hexagrams, Hamming code, hull, I-Ching, quasi-perfect code

MSC 94B05, 01A25, 94B65, 94B75

1 Introduction

The I-Ching (Yijing, Book of Changes) [14] consists of two historically distinct layers. The older layer, the Zhouyi, is a divination manual comprising, for each of the 64 hexagrams, a short hexagram statement together with six line statements; on linguistic and historical grounds it is generally dated to the Western Zhou, around the ninth century BCE [12, 10]. The younger layer is a set of ten commentaries known as the Ten Wings, among them the influential Xici zhuan (Great Commentary), composed over the Warring States and early Han periods, roughly the fourth to second centuries BCE. It is this second layer that supplies the cosmological vocabulary of Yin and Yang and that turned a manual of divination into a philosophical classic [13].

Each of the 64 hexagrams of the I-Ching is a stack of six Yin-Yang lines. Writing 0 for a broken Yin line and 1 for a solid Yang line identifies the hexagram set with the binary vector space

F26.\mathbb{F}_{2}^{6}.

This identification of hexagrams with binary vectors of length 6 has a documented origin. Leibniz [11] described his binary arithmetic to Joachim Bouvet in a letter of 15 February 1701; Bouvet, then at the Kangxi court in Beijing, recognised the correspondence with the Xiantian diagram and replied on 4 November 1701, enclosing a woodcut of Shao Yong's arrangement [9]. The letter reached Leibniz only on 1 April 1703, and within days he submitted to the Paris Academy his Explication de l'arithmétique binaire, whose title explicitly advertises that binary numeration "gives the sense of the ancient Chinese figures of Fohy(Fuxi)" [6].

Even though such a nice connection was known since Leibniz, there have been only a few papers on mathematical structures of the 64 hexagrams. In 1975, Goldenberg [2] gave an elementary algebraic treatment of the I-Ching for non-mathematicians. Recently, Hu et al. [4] noticed that the system of I-Ching can be represented by the tables with dyadic groups of 4 bigrams, 8 trigrams and 64 hexagrams, which were believed to be fundamental archetypes of the Nature. The ancient Chinese could not have known about the genetic code of protein sequences of amino acids: in particular, the genetic code is constructed on DNA molecules using 4 nitrogenous bases, 16 doublets, and 64 triplets. Hence the authors [4] described the usage of dyadic groups related to the hexagrams as a foundation of the bio-mathematical doctrine of the geno-logic code. Li [7] introduced a novel computational perspective based on two's complement format of a negative integer to reinterpret the mathematical essence of the I Ching hexagrams and the topological mapping between the Fuxi Square and Circular Diagrams.

In this paper we show that coding theory provides an efficient way of understanding the 64 hexagrams. More precisely, we show that at most four of the eight doubled-trigram hexagrams can lie in a binary [6, 3, 3] code, that the four are then forced to be

H=⟨101101,011011⟩F2={000000,011011,101101,110110},\mathcal{H}=\langle101101,011011\rangle_{\mathbb{F}_{2}}=\{000000,011011,101101,110110\},

and that exactly two codes attain this bound: the shortened Hamming [6,3,3][6,3,3] code CAC_A and its dual. For each of these two codes, the eight codewords, the balls of radius one around them, and the eight deep holes together account for all 64 hexagrams.

We then generalize this picture from hexagrams to stacks of 2m lines. We call a binary code of length 2m with d≥3d \geq 3 diagonal-coherent if it contains the half of the diagonal subspace {(u,u)}\{(u, u)\} coming from even-weight vectors uu — the largest part of that subspace a single-error-correcting code can contain — and extremal if its dimension is as large as possible. For m≥2m \geq 2 and r=⌈log⁡2(2m+1)⌉r = \lceil \log_2(2m + 1) \rceil, we determine the number N(m)N(m) of extremal diagonal-coherent binary codes with parameters [2m,2m−r,≥3][2m, 2m - r, \geq 3] which by definition contains ι(Em)\iota(E_m), the image under the doubling map ι(u)=(u,u)\iota(u) = (u, u) of the even-weight code Em≤F2mE_m \leq \mathbb{F}_2^m; Requiring it costs nothing: the dimension 2m−r2m - r is already the largest possible for any binary code of length 2m with minimum distance at least 3.

We also determine the minimum distances of these codes: they are always 3 or 4, and the value 4 occurs precisely when m is a power of 2. Even then it is exceptional — we obtain a closed formula for the number N4(m)N_4(m) of such codes (Proposition 6.14), which gives for instance N4(4)=2N_4(4) = 2 out of N(4)=10N(4) = 10, and N4(8)=480N_4(8) = 480 out of N(8)=205920N(8) = 205920. We give these codes in a normal form, determine their hulls, and show that each has covering radius 2 with exactly 2r−1−2m2^r - 1 - 2m deep-hole cosets.

The paper consists of six sections. In Section 2, we give a structural background of I-Ching. In Section 3, we begin with basic definitions of coding theory. Section 4 constructs the core CA\mathcal{C}_A and proves the uniqueness statement above. In Section 5, we find the eight deep holes so that the 64 hexagrams can be described by CA\mathcal{C}_A and the deep holes. Finally, Section 6 considers the generalization of Section 4 by describing codes coherent with a diagonal subspace, together with three open problems.