[HN Gopher] Show HN: The King Wen Permutation: [52, 10, 2]
___________________________________________________________________
Show HN: The King Wen Permutation: [52, 10, 2]
I analyzed two orderings of the 64 I Ching hexagrams and found the
permutation cycle decomposition between them is [52, 10, 2] with
zero fixed points. Nobody has done this kind of analysis before and
this cycle type has not been reported in the literature. You can
verify it yourself.
Author : gezhengwen
Score : 54 points
Date : 2026-03-23 08:21 UTC (14 hours ago)
(HTM) web link (gzw1987-bit.github.io)
(TXT) w3m dump (gzw1987-bit.github.io)
| gezhengwen wrote:
| 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?
| dmos62 wrote:
| Fascinating. I've barely any knowledge of I Ching. What
| motivated you to explore this and I Ching in general?
| gezhengwen wrote:
| 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.
| IAmBroom wrote:
| I love you. Marry me.
| __patchbit__ wrote:
| The lines of a hexagram map to the edges of a tetrahedron.
| seanhunter wrote:
| 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.
| gezhengwen wrote:
| 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.
| seanhunter wrote:
| 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.
| canjobear wrote:
| 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.
| chordbug wrote:
| We truly live in an age where facts that are worth "maybe one
| sentence of space on Wikipedia" can be expanded into full-blown
| AI-coded interactive websites. I'm not sure how to feel about
| this. I think in this case it ascribes an inappropriate sense of
| grandeur: making a mathematical curiosity (and is the result even
| that surprising?) seem like some deep truth has been unveiled, or
| we finally found God's Number.
| thaumasiotes wrote:
| > and is the result even that surprising?
|
| No.
|
| The exposition has its problems too. Consider:
|
| >> Zero fixed points -- not a single hexagram occupies the same
| position in both orderings. The structural difference is total.
|
| As a mathematical matter, the expected number of fixed points
| for any permutation is 1. Some have more. For some to have
| more, others must have less, and all of those will have 0.
|
| But as a logical matter, "the structural difference is total"
| is pure gibberish. Consider these two permutations on 5
| elements: 1. [2, 3, 4, 5, 1] 2. [5,
| 1, 2, 3, 4]
|
| "Not a single element occupies the same position in both
| orderings."
|
| But of course these two permutations have a nearly identical
| structure (they are rotations in opposite directions, and are
| each other's inverses); they are far more closely related to
| each other than either is to 3. [4, 3, 2, 1,
| 5]
|
| even though permutation 3 shares the assigned position of "3"
| with permutation 1, and the assigned position of "2" with
| permutation 2.
|
| Then:
|
| >> We reframe the question:
|
| >> Transform the question "what is the structural distance
| between two orderings"
|
| >> into the mathematical problem "what is the cycle structure
| of a specific permutation in S64?"
|
| This is nonsense. The 'question' cannot be transformed into the
| 'problem', because they are completely unrelated ideas. It's
| like transforming the question 'what is the Levenshtein
| distance between two strings?' into the problem 'if a specific
| string were in alphabetical order, how would it be
| pronounced?'.
| gezhengwen wrote:
| 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.
| mcphage wrote:
| > 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?
| gezhengwen wrote:
| 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.
| Someone wrote:
| > and is the result even that surprising?
|
| Not as far as I can tell from skimming
| https://en.wikipedia.org/wiki/Random_permutation_statistics.
| gezhengwen wrote:
| 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.
| casey2 wrote:
| Random shuffles usually have a big loop
| gezhengwen wrote:
| 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.
| busfahrer wrote:
| Does cycle here mean the same thing as what Carmack used in
| Wolf3D to randomly fill the screen with red pixels without any of
| them repeating?
| gezhengwen wrote:
| 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.
| thaumasiotes wrote:
| Well... you could describe it that way, if you wanted to.
|
| The Wolfenstein 3D code implements a function from a coordinate
| pair (x1, y1) to a new coordinate pair (x2, y2) which has the
| property that, if you start with the pair (0, 1), repeatedly
| applying the function will take you through every coordinate
| pair that represents a valid pixel on screen and then return to
| (0, 1).
|
| "Cycle" in the context of permutations still refers to the
| process of applying a function repeatedly and ultimately
| returning to the original value you started with, but there is
| no concept of "visiting every valid value in between".
|
| (And this is not a necessary part of the phenomenon in
| Wolfenstein, either; it _could_ , theoretically, have used a
| function that painted three different points red and never
| visited the rest of the screen. "Cycle" directly refers to the
| fact that repeated application of the function will eventually
| produce a result that has been seen before, which Wolfenstein
| uses as the condition to break out of a while loop. The fact
| that every pixel on screen has been visited at that point is a
| fact about the "cycle length".)
|
| I wrote up something of a description of permutation cycles
| before looking up the Wolfenstein thing, so here it is:
|
| ---
|
| Permutations are usually considered in terms of the "cycles"
| that make them up.
|
| Intuitively, you can describe a permutation by explicitly
| listing the position to which it assigns everything. In this
| method, [1, 4, 2, 5, 3]
|
| is a permutation of 5 objects which places the first object
| first, the second object third, the third object fifth, the
| fourth object second, and the fifth object fourth.
|
| This is cumbersome, and it obscures the internal structure of
| the permutation. It is more conventional to describe a
| permutation as a collection of cycles; our example permutation
| would be given as (1)(2 4 5 3)
|
| This tells us that the first element is in a 1-length cycle
| with itself, and the other four elements share a 4-length
| cycle. Specifically, after one application of the permutation,
| element 4 will conceptually metamorphose into element 5 (which
| follows "4" in the cycle), element 2 will become element 4,
| element 3 will become element 2, element 1 will stay right
| where it is, and so forth.
|
| This representation, among other virtues, makes it pretty easy
| to compute the order of the elements after one, or more,
| applications: (0) [1, 2, 3, 4, 5]
| (1) [1, 4, 2, 5, 3] (2) [1, 5, 4, 3, 2] (3)
| [1, 3, 5, 2, 4] (4) [1, 2, 3, 4, 5]
|
| After four applications, we've come back to the original order
| of the elements. This is because our permutation contains a
| 1-cycle and a 4-cycle, and the least common multiple of 1 and 4
| (the cycle lengths) is 4 (the number of applications required
| to return to the original order). You can see the 1-cycle
| running down the column at position 1, and you can see the
| 4-cycle running down the columns at positions 2, 4, 5, and 3,
| which are the elements contained in that cycle.
|
| Armed with this, we can go a little further: after 75
| applications, 1 will advance through its cycle 75 times
| (remaining "1"), and each other position will advance through
| its cycle 75 times. Since that cycle is 4 elements long, this
| is the same as advancing 75 mod 4 (= 3) times, giving us
| (75) [1, 3, 5, 2, 4]
|
| It turns out that every permutation arranges elements into
| cycles like this. We could consider a permutation on two
| objects: (1 2)
|
| which swaps the objects. We can consider what is essentially
| the same permutation on 200 objects: (1 2)
|
| which swaps the first two objects while leaving the other 198
| objects in place. (Formally, those objects are all in 1-cycles,
| and we just don't bother writing them all down.) With a
| slightly more complex permutation on 200 objects:
| (3 70 54 159)
|
| we will see 196 objects stay in place while the objects in
| positions 3, 70, 54, and 159 rotate through those four
| positions. If we considered a different permutation on 200
| objects for which (3 70 54 159) was one of the cycles it
| contained, the behavior at those four positions would remain
| the same as in this example, but the other 196 objects would
| behave differently. Every four applications, the object which
| started at position 3 will return to position 3, but the
| overall permutation might contain cycles of other lengths, so
| the period of the overall permutation will probably not be
| four.
|
| You can think of a permutation as a collection of wheels of
| different circumferences, with each application rotating every
| wheel through a constant-across-the-wheels arclength. We call
| those wheels 'cycles'.
| kazishariar wrote:
| How/Can you compare this to Magic Squares?
| gezhengwen wrote:
| 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.
| tinix wrote:
| http://www.levity.com/eschaton/waveexplain.html
|
| McKenna got deep into this...
|
| https://www.fractal-timewave.com/articles/math_twz_10.htm
| variaga wrote:
| I read the page and went through the "verify the cycles for
| yourself" sequence and I still have no earthly idea when defining
| the cycles, what is the rule that says "if you're currently on
| hexagram X, you can calculate the next hexagram Y by doing..."
___________________________________________________________________
(page generated 2026-03-23 23:01 UTC)