For the best experience on desktop, install the Chrome extension to track your reading on news.ycombinator.com
Hacker Newsnew | past | comments | ask | show | jobs | submit | history | gezhengwen's commentsregister

Each hexagram has two positions: one in the binary natural order (0-63), and one in the King Wen sequence. The rule is: a hexagram moves from its natural order position to its King Wen position. For example, Qian is at position 63 in the natural order and position 0 in the King Wen sequence, so σ(63)=0. Then look at position 0 (Kun), which is at position 1 in the King Wen sequence, so σ(0)=1. Follow this chain until you return to the start. There is no formula — σ is defined by the mapping table between the two orderings.


The I Ching has a historical connection to magic squares — the Lo Shu is a 3x3 magic square traditionally linked to the I Ching. But cycle decomposition analyzes the permutation between two orderings, which is a different mathematical structure from the row/column/diagonal sums of magic squares. That said, it is an interesting direction worth exploring.


Yes, it is essentially the same mathematical concept — both are cycle decompositions of permutations. Carmack used a permutation to ensure every pixel is visited exactly once.


You are right, the presentation may be overdone. The result itself is a small mathematical fact. I made the interactive page so people can verify it themselves, not to make it look grand. Thank you for the criticism, I will adjust.


You are right, the expected largest cycle of a random permutation is around 40. 52 is larger but not extreme. I did not claim this result is statistically significant.


You are right, zero fixed points does not mean total structural difference. Your counterexample is good. My wording was wrong, I will fix it. What interests me is not the statistical rarity, but that 81% of elements are in one orbit — this means the reordering is highly coupled, not a bunch of small local swaps.


> What interests me is not the statistical rarity, but that 81% of elements are in one orbit — this means the reordering is highly coupled, not a bunch of small local swaps.

But what is the significance of the reordering being highly coupled?


The observation itself is the value — it tells you the King Wen sequence is not a bunch of small local adjustments, but a holistic rearrangement. But it cannot tell you why King Wen arranged it this way.


You didn't explain or prove there is a reason for it.


I found this by accident while analyzing the I Ching with code. 81% of hexagrams are locked in one chain, none stays in its original position. You can verify it yourself in the browser. Has anyone seen this before?


People have known about this since the Shang dynasty so yes it has been noticed before.

If you find this interesting, I suggest you study group theory - this seems pretty much a direct consequence of the group structure.


I doubt they already had the King Wen order in the Shang dynasty. Manuscripts dated to as late as the Han dynasty have a totally different hexagram order. In any case traditionally the divination book for Shang is considered to be the Guicang, not the I Ching (=Zhouyi = Changes of Zhou), which according to tradition put kun before qian.


The Shang dynasty people knew the pairing structure of hexagrams (inverted/complementary pairs), but cycle decomposition is a modern group theory tool that did not exist until the 19th century. These are two different levels of analysis.


They knew about the cycle. That's why it's called the King Wen sequence right? Not sure what part of this you think people didn't know about so we may be talking at cross purposes.


Fascinating. I've barely any knowledge of I Ching. What motivated you to explore this and I Ching in general?


The I Ching has influenced China for over 3000 years. I believe there must be a reason for that. In China, the I Ching is often treated as mysticism. But I believe in science. The end of mysticism must still be science. So I did a lot of research and found a unique pattern inside. I searched all the literature and found nothing about it. So I shared it here.


The lines of a hexagram map to the edges of a tetrahedron.


I love you. Marry me.


Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search:

HN For You