Back to blog
#Bazi #Qimen Dunjia #Information Theory #Mathematical Metaphysics #I Ching Foundations

The Evolution of the Heavenly Stems and Earthly Branches and the Transformation of Dun Jia: A Unified Mathematical Metaphysical Study of the Information Capacity in Bazi and Qimen Dunjia

This paper systematically investigates the information-carrying capacity of Bazi (Eight Characters) and Qimen Dunjia (Mystical Gates) as divination systems, starting from the mathematical structure of Taiji, Liangyi, Sixiang, and Bagua in the *Book of Changes*. By analyzing the classical mathematical foundations such as Yin-Yang, Five Phases, the River Chart, and the Luo Script, it aims to provide a unified perspective for measuring and comparing the information density of these two divination arts.

Tianwen Editorial Team February 7, 2026 85 min read PDF Markdown
The Evolution of the Heavenly Stems and Earthly Branches and the Transformation of Dun Jia: A Unified Mathematical Metaphysical Study of the Information Capacity in Bazi and Qimen Dunjia

Chapter 10: Information Capacity as Seen Through the Methods of the Sages

Section 1: Fuxi Drawing Trigrams—The Original Information Encoding

The Xici Zhuan states:

"In the time when Bao Xi ruled the world, he looked up to observe the images in Heaven, and looked down to observe the laws on Earth. He observed the patterns of birds and beasts and the suitability of the Earth. He took examples from his own person for what was near, and took examples from things far away. From this, he first created the Eight Trigrams, to connect with the spiritual virtue of Heaven and Earth, and to categorize the feelings (qíng) of the myriad things."

Fuxi's method of drawing trigrams—"observing above and below"—was simultaneously collecting information from Heaven (observing above) and Earth (observing below). This method of information collection was inherently "encompassing Heaven and Earth."

Fuxi's encoding result—the Eight Trigrams—is a system of "Images," not purely "Number." This method of "Image" encoding allows a finite set of eight symbols to carry infinite information.

Bazi inherited Fuxi's Stems and Branches system (Stems + Branches), but it mainly utilizes the "Number" aspect (combination, inference).

Qimen Dunjia inherited Fuxi's Eight Trigrams system (Nine Palaces), and fully utilizes its "Image" aspect (the spatial image of each palace, the image of direction, the image of all things).

Therefore, from the perspective of the "quality" of information encoding (richness of symbolic meaning), Qimen Dunjia inherits the original encoding of Fuxi more completely.

Section 2: Wen Wang Developing the Yi—Expansion of Information

It is traditionally believed that when Wen Wang was imprisoned in Youli, he elaborated the Book of Changes, doubling the Eight Trigrams to form the Sixty-Four Hexagrams and attaching line statements and hexagram statements. This was the first major expansion of information.

Wen Wang's contribution was: expanding the original "Eight Images" system of Fuxi into a system of "Sixty-Four Images $\times$ Three Hundred Eighty-Four Lines," increasing the information capacity by about 48 times (on the order of $64/8 \times 384/24$).

Bazi's Four Pillar system can be seen as a "parallel development" of Wen Wang's Sixty-Four Hexagram system—both extracting information from combinations of Stems and Branches, but using different encoding methods (Hexagrams use Yin/Yang line superposition; Bazi uses Stems/Branches combination and sequence).

Qimen Dunjia's multi-layered chart system can also be seen as another "parallel development" of Wen Wang's system—the arrangement of the Nine Palaces is like the ordering of the Sixty-Four Hexagrams, and the multi-layer superposition is like the superposition of the Six Lines.

From the perspective of information expansion, both systems expand upon the original ancient encoding—but in different directions:

  • Bazi's expansion direction: Refinement of the temporal dimension (Four layers: Year $\rightarrow$ Month $\rightarrow$ Day $\rightarrow$ Hour).
  • Qimen Dunjia's expansion direction: Expansion of the spatial dimension (Nine Palaces) $\times$ Superposition of the layer dimension (Four layers: Earth, Heaven, Man, Spirit).

Information generated by "temporal refinement": $\approx 60^4 / \text{Constraints} \approx 518,400$ combinations.

Information generated by "spatial expansion $\times$ layer superposition": $\approx 18 \text{ (Bureau)} \times 12 \text{ (Hour)} \times 81 \text{ (Patterns)} \times 8 \text{ (Gates)} \times 8 \text{ (Spirits)} \approx 1,119,744$ combinations.

From this perspective, the combination space of Qimen Dunjia is about 2.16 times that of Bazi.

Of course, this factor of "nine times" mentioned earlier is only a rough estimate—the actual ratio depends on the correlation between the nine palaces. Since the information in the nine palaces is not completely independent—once the Heaven Plate Qiyi of one palace is determined, the Heaven Plate Qiyi of the other palaces are also determined (due to circular permutation)—the independent information capacity is lower, around 1.5 to 2 times that of Bazi.

This estimation roughly aligns with the results of the numerical analysis in the previous section.

Section 3: Duke Zhou's Establishment of Rites—Standardization of Information

Duke Zhou's establishment of rites and music integrated the principles of the Book of Changes into the social structure, transforming the information of the "Heavenly Way" into the norms of the "Way of Man."

The Zuo Zhuan, Duke Zhao Year 2 records the words of Han Xuanzi:

"Only now do I understand the virtue of Duke Zhou and why Zhou was able to reign."

Duke Zhou's system—rites, music, lineage laws, land division—are all standardized encodings of information. In this process of standardization, some of the original information is solidified (becoming institutions), and some is discarded (not incorporated into the institution).

The development of Bazi is similar—from ancient intuition to the systematization of Stems and Branches in the pre-Qin period, and then to the systemization of Ten Gods and Patterns later on. Each step of standardization makes the expression of information more precise, but it may also lead to the loss of some original information.

The development of Qimen Dunjia is similar—from ancient military intuition to the systematization of the Nine Palaces in the pre-Qin period, and then to the complete systemization of the four plates of Heaven, Earth, Man, and Spirit. Its degree of standardization is higher (more complex structure, clearer rules), so it likely retains more of the original information.

Section 4: Information Capacity in Pre-Qin Divination Cases

Let us compare the information capacity of "Four-Pillar style" inference versus "Multi-layer style" inference through actual pre-Qin divination cases.

Case: The Battle of Han Pass (Zuo Zhuan, Duke Xi Year 32-33)

Background: Before the battle between Qin and Jin at Han Pass, several divinations were performed within the Jin state.

"The tortoise said: 'Inauspicious.' The yarrow said: 'Auspicious.'"

Tortoise divination and yarrow divination gave opposite conclusions—a classic example of different information systems yielding different results.

Information from Tortoise Divination: One sign type (Inauspicious)—low information capacity, only one bit (Auspicious or Inauspicious).

Information from Yarrow Divination: Hexagram image, line text, hexagram change—high information capacity, potentially over ten bits.

Furthermore:

"They divined with yarrow, obtaining Gu (Corruption) transforming into Sui (Following). The diviner said: 'The firmness of Gu is Wind; its regret is Mountain. The year is Autumn, we are stripping its fruit and taking its wood. This is how we overcome. When the fruit is stripped and the wood is lost, what remains for failure$5'"

The interpretation process:

  1. Obtaining Hexagram Gu—Xun (Wind) below, Gen (Mountain) above, Wind over Mountain.
  2. Analyzing the inner trigram (Firmness) as Xun (Wind), the outer trigram (Regret) as Gen (Mountain).
  3. Further symbolic inference based on the season (Autumn).
  4. Symbolic action: Wind blowing down the fruit from the mountain—"stripping the fruit and taking the wood"—the image of overcoming the enemy.
  5. But "fruit stripped and wood lost"—there will be losses after victory.

This process of inference involves multiple information layers:

  • Hexagram Image Layer (Wind, Mountain).
  • Seasonal Layer (Autumn).
  • Material Image Layer (Fruit, Wood).
  • Human Affairs Layer (Overcoming the enemy, suffering losses).

The interaction of these four layers produces a judgment of far richer meaning than the hexagram image itself.

This pattern of inference closely resembles the multi-layer interactive analysis of Qimen Dunjia—rather than the single-line temporal projection of Bazi.

Case: Divination of Nan Kuai before Rebellion (Zuo Zhuan, Duke Zhao Year 12)

"When Nan Kuai was about to rebel, someone in his village knew of it, sighed as he passed by, and said: 'So worried! What will come of it$6' Nan Kuai divined with yarrow repeatedly, obtaining Kun (Yielding) transforming into Bi (Clinging/Alliance). He said: 'Yellow skirt, fundamentally auspicious.' Thinking this meant great luck, he showed it to Zifu Huibo. Huibo said: 'I have studied this. If the matter involves loyalty and trust, it is possible; otherwise, it will surely fail. Yellow means the color of the center. Skirt means the adornment of the lower part. Fundamentally auspicious means the greatest good. If the center is not loyal, one cannot attain the color. If the lower part does not share, one cannot attain the adornment. If the undertaking is not good, it cannot be great. Furthermore, Kun transforming into Bi says, "To remain firm in peace brings auspiciousness," and its changing line says, "Straight, square, and great; without deviating from this, nothing is unfavorable." Thus, those who study this and do not deviate are auspicious. If one proceeds with disloyalty and untrustworthiness into great danger, can one escape$7''

Here, Zifu Huibo's interpretation is brilliant—not only interpreting the literal meaning of the hexagram and line texts but also judging based on moral dimensions like "center," "lower part," and "goodness." The depth of information extraction here is far beyond simple auspicious/inauspicious judgment.

Dimensions of information required for such a deep interpretation:

  1. Hexagram Image Dimension (Kun, Bi).
  2. Line Text Dimension ("Yellow skirt, fundamentally auspicious").
  3. Color Image Dimension (Yellow—color of the center).
  4. Adornment Image Dimension (Skirt—lower adornment).
  5. Moral Dimension (Loyalty and Trust).
  6. Situation Dimension (Rebellion—disloyalty and untrustworthiness).

The judgment based on the interaction of these six dimensions is closer to the multi-dimensional analysis of Qimen Dunjia than the simple analysis of Bazi.

This suggests that multi-dimensional interactive judgment was common practice in pre-Qin divination—not just simple fortune-telling as later simplified. Both Bazi and Qimen Dunjia emerged from this multi-dimensional tradition, but Qimen Dunjia retained this tradition more explicitly through its multi-layered structure.