22 October, 2012

Bagua is a Group, Most Likely Z8

Binary Interpretation

The Bagua consists of eight trigrams mapping one-one to the eight integers between 0 and 7 representable with three binary bits

Bagua trigrams are also commonly manipulated -- meaning that they can morph from one trigram into other trigrams based on specific rules.  These manipulations, however, do not appear to be numeric in nature -- in other words, the manipulations of trigrams (with operations like flipping a bit -- turning a broken line into a solid line and vice versa) do not map closely to integer arithmethic.

Group Theoretical Interpretation

If one treats the bagua trigrams as a group, however, the manipulations appear to make more sense.  All the requirements of groups appear to match well with the characteristics of the bagua:
  • The eight trigrams are mutually exclusive
  • The eight trigrams are collectively exhaustive and closed (i.e. there is no possible trigram outside the eight)
  • Manipulations of trigrams yield other trigrams
  • There is a trigram mapping to identity (most possibly 乾 ☰ or 坤 ☷)
  • There is an inverse to each trigram (negative image, flipped, etc.)
  • There is an ordering of the 64 hexgrams into an 8x8 matrix (分宮卦序) used in the Four Pillars system, with columns matching the bagua trigrams (shown below) and rows definitely not matching, which almost begs to suggest that the 64 hexgrams is the product of two non-identical groups of order 8 (although it can obviously be also made out of the Cartesian product of two identical groups)

Possible Groups With Order Eight

There are only five groups with order eight up to isomorphism:
  • Z8 -- cyclical group
  • Z2 x Z4 -- cyclical version of dihedral group
  • E8 or Z2 x Z2 x Z2 -- elementary abelian group
  • D8 -- dihedral group of eight
  • Q8 -- quaternion group
Let us look at all five possibilities in turn.

Trigram Inverses

Classical literature often refer to the inverse of a bagua trigram, almost as if the bagua is a group.  There are two primary systems to describe the negative or inverse of a trigram:
  • Flipping all the lines
  • Flipping the trigram upside-down (i.e. the first line becomes the last and vice versa, with the middle line staying put)
Flipping all the lines is an obvious way of matching a trigram with an inverse.  Under such a system, each of the three lines in a trigram can be interpreted as independent of each other, like three orthogonal axes (with the eight bagua trigrams on the eight corners of a cube).

Turning the trigram upside-down to find its inverse is also an extremely interesting idea, not merely due to the fact that it is outlined in I-Ching's 雜卦傳 (the one document primarily concerned with inverses), which pairs up the 64 hexgrams as inverse pairs, and most of them are upside-down versions (e.g. 比 and 師, 損 and 益, 震 and 艮).

The "upside-down" concept of finding inverse is also apparent if one treats the three lines in a trigram as three operations to be performed one after another, and if the operation of each line is its own inverse -- which means that the inverse of the combination operation resulting from the three trigram lines is merely the three same operations applied in reverse (and thus flipping the trigram upside-down).

These two possible manners of finding an inverse of a trigram may shed light towards the group structure of the Bagua.

Z8

The simple cyclical group of order eight has one element (say `a`) that generates the entire group:

`a`, `a^2`, `a^3`, `a^4`, `a^5`, `a^6`, `a^7`, `a^8 = e`

It immediately suggests the Binary Order, with 1 being the generator and group product being addition modulo 8 and the identity element being 0:

☰ = `e` (0)
☱ = `a` (1), inverse = ☷ (`a^7` or 7)
☲ = `a^2` (2), inverse = ☶ (`a^6` or 6)
☳ = `a^3` (3), inverse = ☵ (`a^5` or 5)
☴ = `a^4` (4), self-inverse
☵ = `a^5` (5), inverse = ☳ (`a^3` or 3)
☶ = `a^6` (6), inverse = ☲ (`a^2` or 2)
☷ = `a^7` (7), inverse = ☱ (`a` or 1)

It is obvious that this mapping of trigrams to group elements is not attractive, as there is no apparent relation between pair trigrams (e.g. ☰ and ☷, ☲ and ☵ etc.). It is probably because of this that the Binary Order of trigrams was not invented until much later in A.D.

Another mapping of Z8 to trigrams, however, suggests itself, based on the Sibling Order. Notice that `a^4` is its own inverse, and if we map 坤 ☷ to `a^4` we get the following:

☰ = `e` (Father)
☶ = `a` (Youngest son), inverse = ☴ (`a^7`)
☵ = `a^2` (Middle son), inverse = ☲ (`a^6`)
☳ = `a^3` (Eldest son), inverse = ☱ (`a^5`)

☷ = `a^4` (Mother) = -1, self-inverse
☱ = `a^5` (Youngest daughter), inverse = ☳ (`a^3`)
☲ = `a^6` (Middle daughter), inverse = ☵ (`a^2`)
☴ = `a^7` (Eldest daughter), inverse = ☶ (`a`)

Some attractive features of this mapping:
  • There are clear choices for the father and mother trigrams (which map to the two most important pure trigrams among the eight)
  • The inverse of each trigram is the negative image (i.e. flipping each line) of itself flipped upside-down
  • Each trigram is related to one other trigram which has all the lines flipped by the factor -1 -- i.e., any trigram multiplied by ☷ yields its negative image

Z2 x Z2 x Z2 or E8

The elementary abelian group of order eight is one that maps straight to the trigram representation, with each line mapping to one Z2 subgroup.  However, the interactions form an exclusive-or system, since a broken line may map to `a` and a solid line to `a^2`, with `a^2 = e`.  The broken line is thus a generator, meaning one broken line applied against another broken line yields a solid line, with the following multiplication table:

broken x broken --> solid
broken x solid --> broken
solid x broken --> broken
solid x solid --> solid

In other words, all trigrams are self-inverses, and that applying one trigram to another merely flips all the lines in the first trigram where the second trigram has broken lines, and 乾 ☰ is e (i.e. 1,1,1) and 坤 ☷ is (-1,-1,-1).

Z2 x Z4

On the surface, the group Z2 x Z4 looks unlikely to be a strong candidate -- it is abelian and cyclical, thus limiting the possibility of complex interactions.

However, this group is almost a one-to-one map against the strange (but ancient) Sibling Order, as shown below:

☰ = `(e, e)` (Father) = `e`
☶ = `(e, a)` (Youngest son), inverse = ☳
☵ = `(e, a^2)` (Middle son), self-inverse
☳ = `(e, a^3)` (Eldest son), inverse = ☶

☷ = `(-1, e)` (Mother) = -1
☱ = `(-1, a)` (Youngest daughter), inverse = ☴
☲ = `(-1, a^2)` (Middle daughter), self-inverse
☴ = `(-1, a^3)` (Eldest daughter), inverse = ☱


Notice the unexpected features of this mapping:
  • There are clear choices for the father and mother trigrams (which map to the two most important pure trigrams among the eight)
  • The inverse of each trigram is the trigram flipped upside-down (no other group mapping can boast this feature), a concept outlined in I-Ching's 雜卦傳 (another ancient text)
  • There are two special trigrams which look the same when flipped upside-down (i.e. fire ☲ and water ☵) -- they are self-inverses, but also mirror each other by a factor of -1
  • Each trigram is related to one other trigram which has all the lines flipped (another common inverse algorithm) by the factor -1

Dihedral Group of Eight (D8)

The dihedral group models 90° planar rotations and planar reflections -- usually denoted by `a` and `r` respectively.  A common representation is:

`e`, `a`, `a^2`, `a^3`, `r`, `ar`, `a^2r`, `a^3r`

where `e` = identity, `a` = rotation by 90° and `r` = reflection.

Only two elements are inverses of each other: `a` and `a^3`.  All other elements are self-inverses.
This makes D8 a less attractive candidate group for the bagua trigrams because:
  • so many elements are self-inverses
  • it is not apparent to suggest which element should be 坤 ☷ if 乾 ☰ is taken as `e` and vice versa
  • it is not apparent how to map each of the three lines in a trigram
One possible mapping of the trigrams is:

☰ = `e`
☱ = `r`, self-inverse
☲ = `a`, inverse = ☵
☳ = `a^2r`, self-inverse
☴ = `ar`, self-inverse
☵ = `a^3`, inverse = ☲
☶ = `a^3r`, self-inverse
☷ = `a2`, self-inverse

Under this mapping, fire 火 ☲ and water 水 ☵ are inverses of each other, representing rotations of +90° and -90°.

Multiplication rules based on manipulating solid and broken lines, however, are difficult to come up with.

Quaternion Group (Q8)

The quaternion group is promising. Not only is it non-abelian, it is anti-commutative and thus opens up much flexibility in terms of manipulation.

One possible mapping of the quaternion group is:

☰ = e
☴ = i
☲ = j
☱ = k
☳ = -i
☵ = -j
☶ = -k
☷ = -1

Notice that this mapping has much going for it:
  • There are only two elements which are self-inverses, namely 乾 ☰ and 坤 ☷, incidentally the "father" and "mother" trigrams.
  • Each quaternion axis is represented by one line -- three of them (i, j, k), three lines for each trigram.
  • The inverse of each quaternion axis is simply the trigram with all lines flipped.
  • Since the three quaternion axes are related by anti-commutative rules (e.g. ij = k and ij = -ji), the inverse of each trigram makes some sense (i.e. the inverse of each axis is a combination of the other two axes, or e.g. -i = kj, -j = ik, -k = ji)
Multiplication rules based on manipulating solid and broken lines, however, are difficult to come up with.

Groups Mapping Summary

In order to decide which of the five different groupings map to the eight Bagua trigrams (or the 64 hexgrams), it is useful to identify, for each group, how many elements are self-inverses and how many elements are inverse pairs:

GroupSelf-InversesInverse PairsAbelian?Anti-Commutative
E8 (Z2 x Z2 x Z2)80YN
Z2 x Z442 x 2YN
Z823 x 2YN
D862NN
Q23 x 2NY

Bagua Ordering and The Five Elements

The I-Ching outlines a fortune-telling system based on 64 hexgrams (or 64-gua).  Each individual hexgram is named individually in the I-Ching, but the particular hexgram is also referred to by the two trigrams forming the first three and last three lines of the hexgram respectively.

For example, the hexgram 益 is made up of the trigram of wind 風 (☴) and thunder 雷 (☳), representing the first three and last three lines of the hexgram for 益 respectively.

The I-Ching itself, strangely, avoids referring to trigrams, but only to hexgrams.  This is strange as future scholars all put heavy emphasis on the trigrams as the first level of categorization, almost as if the 64 hexgrams are mere extensions of the 8 trigrams -- a Cartesian product of the trigrams onto itself.  On the contrary, the I-Ching specifically avoids formally connecting the hexgrams with trigrams in this manner, and only seems to use trigrams as a convenient notation to refer to hexgrams.

In a future post, this issue will be investigated further with the concept that the Bagua trigrams form a group, and the 64 hexgrams also forming a group.

The I-Ching also does not specify a particular ordering or sequencing of the trigrams or hexgrams, and subsequently several popular orders have occurred -- simply because they must be ordered somehow to put into writing.

The Binary Order

One particular popular ordering of Bagua trigrams is the binary order, seemingly dated to the Suing (宋) dynasty close to 1000AD.  The ordering starts with the trigram of 乾 with all solid lines and essentially treat each broken line as a 1, and each solid line as a 0, starting with the top line as the least significant bit:

  乾 ☰, 兌 ☱, 離 ☲, 震 ☳, 巽 ☴, 坎 ☵, 艮 ☶, 坤 ☷

The Binary Order With The Five Elements

The Binary Order is interesting since it coincides with the Five Elements quite nicely:


 Notice that the I-Ching itself does not refer to the Five Elements, which is an independent development parallel to the I-Ching.  The Binary Order and the connection of the Bagua with the Five Elements appear to be the result of subsequent scholastic developments.

The Ordering of the Five Elements When Matched with the Bagua

Also notice that the ordering of the Five Elements is different from typical orders.  In typical Five Elements lists, an order following the "beget/benefit" (生) cycle or the "harm" (剋) cycle is used.  The matching of the Bagua Binary Order with the Five Elements yields a third ordering that is neither of those.

However, if one inspects this order closely, one can find that it matches other fortune-telling disciplines closely, namely the 12-Zhi (12 地支) categories in the Four Pillars system and the Nine-Squares Matrix (九宮) in fengshui.  Both of these will be discussed fully in future entries.

Similarities With 12-Zhi

The 12-Zhi categories can be modeled as in the following diagram:

Basically, the Five Elements are distributed in three axes, with metal (金) and wood/wind/air (木) forming one axis and opposing each other, fire (火) and water (水) forming another axis and opposing each other, and earth (土) being its own axis -- divided into wet earth (濕土) and dry earth (燥土), most likely the two poles of that axis.

Rotating anti-clockwise from metal and arriving at the earth axis last yields this particular ordering.

Similarities With Nine-Squares Matrix

The Nine-Squares Matrix used in fengshui has the following matching between the Bagua trigrams and the nine squares:

As can be seen, again going anti-clockwise from metal "sort of" yields this particular ordering of the Five Elements, with the exception that earth is squeezed in between metal and first, as well as between wood and water.

The difference treatments of earth in the Nine Squares Matrix and the 12-Zhi suggest that the Nine Squares Matrix may be a flat projection of a three-dimensional model (i.e. similar to 12-Zhi) with three axes.  This coincides with the fact that, historically, Chinese fengshui was preoccupied with two dimensions -- there being no high-rises in ancient China.

This almost indicates that the Nine Squares Matrix fengshui system of fortune-telling is a two-dimensional approximation of a three-dimensional model.

The Siblings Order

There is yet another popular ordering of Bagua trigrams -- the so-called Siblings Order.  This order is much more historical, dating almost back to the origins of the I-Ching itself:

Parent: 乾 ☰ (father) -- Yang
- Children: 艮 ☶ (youngest son), 坎 ☵ (middle son), 震 ☳ (eldest son)

Parent: 坤 ☷ (mother) -- Yin
- Children: 兌 ☱ (youngest daughter), 離 ☲ (middle daughter), 巽 ☴ (eldest daughter)

Definitions of the siblings are Siblings Order given in 說卦傳 (Documentaries on Trigrams):

乾,天也,故稱乎父;坤,地也,故稱乎母;震一索而得男,故謂之長男;巽一索而得女,故謂之長女;坎再索而得男,故謂之中男;離再索而得女,故謂之中女;艮三索而得男,故謂之少男;兌三索而得女,故謂之少女。
The 乾 trigram signifies the heavens and is thus the father. 坤 signifies the earth and is thus the mother. 震 contains the first solid line, making it the eldest son; 巽 contains the first broken line, making it the eldest daughter. 坎 contains the second solid line, making it the middle son. 離 contains the second solid line, making it the middle daughter. 艮 contains the third solid line, making it the youngest son. 兌 contains the third broken line, making it the youngest daughter.

Incidentally, according to unearthed ancient documents (帛書周易) written on cloth dating back to the Han Dynasty around 200BC, the order of the eight trigrams are also given as the Sibling Order instead of other more modern orders that put 乾 ☰ and 坤 ☷ at opposite ends.

Notice also that, in the Siblings Order, there are more broken lines in trigrams categorized as male (except for the father itself, which has no broken line), and more solid lines in trigrams categorized as female (except for the mother itself, which has no solid lines).  A popular explanation:

陽一君而二民,君子之道也;陰二君而一民,小人之道也。
Yang trigrams have one head and two subordinates  -- which is the way of the good.
Yin trigrams have two heads and one subordinate -- which is the way of the evil.

Another popular explanation, which actually seems to make more sense:

陽卦多陰,陰卦多陽,其故何也?
Yang trigrams have more yin lines, and yin trigrams have more yang lines.  Why?
陽卦奇, 陰卦偶。
Yang trigrams have odd numbers of yang lines.
Yin trigrams have even numbers of yang lines.

This explanation actually coincides with the Bagua Procedure outlined in a previous entry, when odd multiples of 4 yield a solid (or yang) line, and even multiples of 4 yield a broken (or yin) line.

The Siblings Order and Group Theory

The Siblings Order is apparently the oldest, most ancient, and most authoritative ordering, but one that makes very little practical sense. Unless one actually looks at the eight Bagua trigrams (and the 64 hexgrams) forming a group, which is the topic of the next entry.

The group structure of the trigrams/hexgrams also explains why ancient people should invent such a strange ordering, apparently without any practical reason, before inventing other more rational types of ordering. The Siblings Order arises naturally in certain groups of order eight.

08 October, 2012

On The I-Ching and The Bagua Procedure

The I-Ching


The I-Ching, or the Book of Changes, is one of China's oldest and most ancient surviving texts.  That this text was used for fortune telling is easy to tell from its title -- the study of events in motion or under change. In modern scientific language, it is thus a calculus on dynamic systems, reducing the science of fortune telling to that of predicting how events will change based on certain laws.
In a commentary of the I-Ching named the 說卦傳 (Descriptions of Hexgrams), there is this famous line:
數往者順,知來者逆,是故易逆數也。
The past is positive, the future is negative. Thus, the I-Ching is concerned with negative numbers/calculations.

It is thus clearly stated that the I-Ching is used for making "negative" calculations, or to predict the future. The most authoritative commentary of the I-Ching, the 繫辭 (Bundled Commentaries), has this to claim:
參伍以變,錯綜其數,通其變,遂成天地之文。極其數,遂定天下之象。
Numbers evolve/change and mix with/criss-cross each other (perhaps referring to a procedure or a mathematical formula).
If all such changes are understood (e.g. formulated as differential equations), one can "write the book" on (what will happen in) the heavens and the earth.
As the numbers (formulas) are evaluated/iterated to their end (e.g. fully integrated), all statuses in the world are determined.
生生之謂易... 極數知來之謂占,通變之謂事,陰陽不測之謂神。
The I-Ching is progressive evolution/iteration/change. Fortune-telling is taking numbers (or formulas) and evaluating/iterating them to their ends (e.g. fully integrated) in order to know the future. Events mean understanding all possible changes. That which cannot be predicted by these methods (yin/yang) is God.
This is by far the clearest implication of fortune-telling as a scientific discipline, in a text that appeared perhaps before 1,000BC!  An even more amazing fact is the commentaries' repeated references to the word 數 (numbers, formulas, or referring to mathematics).  The I-Ching itself has no reference to mathematics or numbers in an arithmetical sense; trigrams and hexgrams do not have numbers in them (although one might argue that their formation involves numbers, as described below).

Why, then, should all commentaries attach numbers (or perhaps mathematics) to the I-Ching without any apparent reason at all?  This can only come from the fact that these authors knew the I-Ching to be a mathematical text on the scientific discipline of fortune-telling, and that it outlines a calculus and treats fortune-telling as solving dynamic systems.

The next series of entries will look at the Bagua system of fortune telling outlined in the I-Ching.

The Bagua Procedure

The following procedure is used to form one single gua (or trigram):
  1. Start with 50 sticks of yallow grass (大衍之數五十)
  2. Throw one away leaving 49 (其用四十有九)
  3. The first cycle:
  4. Take one stick, and divide the remaining 48 sticks randomly into two piles (分而為二以象兩, 掛一以象三) -- a, b where a+b=48.
  5. Take the remainder of each pile divided by 4 (or 4 if zero).  As 48 is divisible by 4, a and b must either both be divisible by 4 or both non-divisible by 4.  Therefore, the two only possible remainders are 4 (both non-divisible) and 8 (both divisible).  (揲之以四以象四時, 歸奇於扐以象閏)
  6. The piles that are left, after deducting the remainder, must either total 44 (=48-4) or 40 (=48-8).
  7. The second cycle:
  8. Repeat steps #4 to #6: divide the remaining 44 or 40 sticks randomly into two piles and take the remainder of each pile divided by 4 (or 4 if zero).  As 44 and 40 are both divisible by 4, the only possible remainders are 4 and 8.  Thus the piles are left must total one of three only possibilities: 32 (=40-8), 36 (=40-4 or 44-8), 40 (=44-4).
  9. The third cycle:
  10. Repeat steps #4 to #6: divide the remaining 32, 36 or 40 sticks randomly into two piles and take the remainder of each pile divided by 4 (or 4 if zero).  As 32, 36 and 40 are all divisible by 4, the only possible remainders are 4 and 8.  Thus the piles are left must total one of four only possibilities: 24 (=32-8), 28 (=32-4 or 36-8), 32 (=36-4 or 40-8), 36 (=40-4).
  11. Divide the resulting pile by 4, yield one of four only possibilities: 6,7,8,9.
  12. The even numbers are yin, with 6 being special and marked with an X.
  13. The odd numbers are yang, with 9 being special and marked with an O.
  14. This concludes the divination of one line out of three that makes up the trigram.  Repeat for two more times to complete the remaining two lines of the trigram.
Diagrammatically, the procedure can be shown as a decision tree:

The Coins Substitute Method

A simpler method was devised subsequently to use three coins instead.  Essentially, each coin of a toss corresponds to each of the three stages in the procedure. A head = -4, tail = -8.  Follow the corresponding branch of the decision tree to reach the ultimate leaf.

Notice that the order of applying the branches (i.e. coin toss results) does not matter -- the same leaf node is reached.  That is because there is only one value that corresponds to any particular combination of -4 and -8.

There are only four possible outcomes of a coin toss regarding three coins:

  • Three heads => -4 x 3 = 48 - 12 = 36
  • Two heads, one tail => -4 x 2 -8 = 48 - 16 = 32
  • One head, two tails => -4 - 8 x 2 = 48 - 20 = 28
  • Three tails => -8 x 3 = 48 - 24 = 24
Thus, the coins substitute method is essentially an exact simulation of the trigram-forming procedure.

O and X Lines

In the I-Ching, all divination's are tied specifically to lines marked by O and X (i.e. 36 and 24, or 9 and 6 in terms of multiples of 4).  For example, a hexgram with the fifth line marked by O is named (九五) while that with the fifth line marked by X is named (六五).

Thus, it is seen that only lines that reach 24 or 36 have significance in interpreting a hexgram.

For each line, the probability of reaching 24 is 0.125 (i.e. 1/8), while that of reaching 36 is also 0.125.  Thus, there is a probability of 0.29 to have only one X or only one O in a trigram, or 0.38 to have only one X or only one O in a hexgram.

The probability of having no X (or no O) in a trigram is 0.67, while having no X (or no O) in a hexgram is 0.45.

The probability of having no X and no O in a trigram is 0.42.  The probability of having no X and no O in a hexgram is 0.18.

The probability of having only one X or O in a trigram is 0.42.  The probability of having only one X or O in a hexgram is 0.36.

Thus, the chances of having only one X or O in a hextram is roughly one-third, in addition to 18% chance of having none.  Essentially, the I-Ching deals with this one-third of possibilities.  The fact that the I-Ching does not deal with situations where there are more than one line marked with X or O strongly suggests that there is a method to reduce the n>1 cases to a combination of n=1 cases (where n = number of lines marked with X or O).

Fortune Telling Is Categorization

For many fortune telling systems (especially the ones under consideration by the author), the entire act of telling one's fortune resides in finding which particular category (out of a number of mutually-exclusive, collectively-exhaustive choices) a person's future trajectory is most probably going to lie.

Exampe: I-Ching Bagua

The I-Ching categorizes future trajectories (essentially a person's fortune, which really is nothing but his/her future) into eight possibilities -- the Bagua system of trigrams.

The I-Ching further expands this categorization by doubling up the Bagua trigrams into duplets called the 64 Gua's of hexgrams.

Example: Sun Signs

Western astrology associates a person's inherent personality with his/her sun sign, which is further categorized into 12 possibilities according to the zodiac of the sun's position.

It can be seen in a future blog entry that the 12 sun signs are further decomposed into three orthogonal axes -- energy (i.e. extrovert vs introvert), logic vs intuition, outwards vs inwards (self-centered or public-centered).

Example: The Five Elements

In Chinese fortune telling, the Five Elements are used extensively as a categorization of future trajectories (i.e. Fire, Water, Wind/Wood/Air, Metal, Earth).

Example: Ziwei Numbers

In the system of Ziwei Numbers, fortune is categorized into 14 stars, which, as will be seen in a future blog entry, can be further decomposed into three othogonal axes -- energy (i.e. extrovert vs introvert), logic vs intuition, outwards vs inwards (self-centered or public-centered).

Notice the uncanny similarities between the categorization of personality in the Ziwei Numbers with the corresponding categorization of personality in western astrology.

Purposes of Categorization

One can guess the reasons for such categorizations -- to aid in calculation, especially in an age without calculating instruments (or even writing instruments) and sound knowledge of mathematics.

Another rationale beyond categorizations is to simply interpretation.  Life is complex, and realities are complex.  Any predictive system, to be useful, must use categorizations to aid in forming opinions on possible future outcomes.  Think, for instance, the Myers-Briggs Type Indicator.

Conjecture: Fortune Categorization and the Chinese Remainder Theorem

Notice an interesting phenomenon -- Chinese culture appears to favor prime numbers, or sets of prime numbers that are co-prime with each other.  For instance, 2 (yin/yang 陰陽), 3 (heaven/earth/man 天地人), 5 (five elements 五行), 7 (seven stars 七星), 8 (bagua 八卦), 9 (nine-squares 九宮).

Some Chinese fortune telling systems use several categorizations simultaneously, and in the vast majority of those cases (if not all), the categorizations used are co-prime with each other.

For instance, the Bagua is essentially a categorization based on 2.  Feng Sui is based on the Nine Squares matrix.  The Four Pillars system uses the Five Elements (5) with two further axes of 10 (天干) and 12 (地支), with 10 being 2x5 and 12 being 2x2x3 -- thus the Four Pillars uses categorizations of 2, 3, and 5 respectively.

This brings one to the mystery of the Chinese Remainder Theorem -- a general result about congruences in number theory and especially to the moduli of pairwise co-primes, laid out in a 1247 book by Qin Jiushao (秦九韶), the Shushu Jiuzhang (數書九章, or Mathematical Treatise in Nine Sections).  An earlier form of the theorem was outlined in the third-century book The Mathematical Classic of Sun Tsu (孫子算經).

This theorem, when first revealed, shocked the western mathematics world, as it would take western mathematics centuries later to come up with similar results.  There is also no particular reason why such a theorem is practically needed, since the rest of the materials in both publications cited above deal with arithmetic techniques in practical everyday usage.  Some have conjectured that the theorem was used in fixing calendars -- but there are holes in this argument: firstly, Chinese calendars have never been extremely accurate, and secondly, western civilizations did not need this theorem to formulate their accurate calendars.

The theorem, however, is essential if one is to formulate and use a mathematical model to calculate fortune and future trajectories.  As most fortune telling systems use categorization to indicate results, and if the results from two or more categorizations are available, the theorem is needed to find out the exact value of the result from two or more categories.  Since fortune telling has been an important activity throughout ancient Chinese society, the practicality of this theorem can be well explained if put in such context.