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.

Chapter 6: Detailed Examination of the Mathematical Structure of Qimen Dunjia
Section 1: Enumeration of Basic Elements in Qimen Dunjia
A single chart in Qimen Dunjia contains the following basic elements:
1. Nine Palaces (Fixed Framework) 9 positions; information capacity $\log_2(9) \approx 3.17$ bits (used for location).
2. Earth Plate Curiosities/Instruments (Dìpán Qíyí) The nine symbols (Yi, Bing, Ding, Wu, Ji, Geng, Xin, Ren, Gui) distributed across 9 palaces, one per palace. This is a permutation of 9 symbols, but the arrangement is constrained by the "Bureau Number"—different Bureaus correspond to different Earth Plate arrangements, following specific rules (starting with Wu, arranged sequentially or reverse).
Yang Bureaus Nine + Yin Bureaus Nine = 18 Earth Plate arrangements. Earth Plate information capacity: $\log_2(18) \approx 4.17$ bits.
If we ignore this constraint, the theoretical number of arrangements of 9 distinct symbols across 9 palaces is $9! = 362,880$—an information capacity of $\log_2(362,880) \approx 18.47$ bits. The actual constraints compress this to $4.17$ bits.
3. Heaven Plate Curiosities/Instruments (Tiānpán Qíyí) Also the nine symbols, which rotate to different palaces following the rotation of the Value Symbol (Zhífú). Their arrangement is also a permutation of 9 symbols, constrained by the position of the Value Symbol.
For a given Bureau, the arrangement of the Heaven Plate is determined by the palace where the Value Symbol resides—the Star corresponding to that palace flies to the palace occupied by the Hour Stem, and the other Stars follow in sequence.
Each shí chén, the Value Symbol can reside in any of the 9 palaces (though the Central Palace may sometimes be treated specially or寄/temporarily assigned), resulting in about 8-9 basic rotational positions.
Heaven Plate independent information capacity: $\log_2(9) \approx 3.17$ bits (determined by the palace the Value Symbol enters).
However, when the Heaven Plate and Earth Plate are superimposed, the combination of Heaven Plate and Earth Plate Curiosities/Instruments in each of the 9 palaces is $9 \times 9 = 81$ possibilities—but due to permutation constraints, not all 81 combinations occur for every palace in every Bureau.
4. Nine Stars (Jiǔ Xīng) The 9 Stars each occupy a palace (original position) and redistribute across the 9 palaces after rotation. The arrangement of the Nine Stars is constrained by the position of the Star carried by the Value Symbol; it is a cyclic arrangement. Nine Stars independent information capacity: about $\log_2(9) \approx 3.17$ bits (determined by the palace the Value Symbol Star enters).
5. Eight Gates (Bā Mén) The 8 Gates are distributed in 8 palaces (no Gate in the center), redistributing after rotation. The arrangement of the Eight Gates is constrained by the position of the Value Embodiment (Zhíshǐ). Eight Gates independent information capacity: about $\log_2(8) = 3$ bits.
6. Eight Spirits (Bā Shén) The 8 Spirits are distributed in 8 palaces (no Spirit in the center or temporarily assigned), redistributing after rotation. The arrangement of the Eight Spirits is constrained by the position of the Value Symbol Spirit. Eight Spirits independent information capacity: about $\log_2(8) = 3$ bits.
7. Value Symbol and Value Embodiment:
The Value Symbol is the Star in command; the Value Embodiment is the Gate in command. Both are determined by the leader of the旬 (Ten-Day Period) corresponding to the Hour Stem. Value Symbol/Value Embodiment information capacity: about $\log_2(6) \approx 2.58$ bits (one of the Six Jia).
Section 2: Total Static Information Capacity of One Qimen Dunjia Chart
Summarizing the independent information elements, the independent information capacity of one Qimen Dunjia chart is:
| Element | Independent Information Capacity (bits) |
|---|---|
| Bureau Number (Yang/Yin $\times$ Nine) | $\log_2(18) \approx 4.17$ |
| Hour (Shí Chén) (Determines Heaven Plate rotation) | $\log_2(12) \approx 3.58$ (12 shí chén per day) |
| Value Symbol/Embodiment | $\log_2(6) \approx 2.58$ |
| Heaven Plate Position | $\approx 3.17$ (determined by shí chén) |
| Eight Gates Position | $\approx 3$ (determined by Value Embodiment) |
| Eight Spirits Position | $\approx 3$ (determined by Value Symbol) |
However, there is a large amount of mutual constraint among the above elements—the Bureau Number determines the Earth Plate; the Shí Chén determines the Heaven Plate and the Value Symbol/Embodiment; the Value Symbol determines the position of the Nine Stars and Eight Spirits; the Value Embodiment determines the position of the Eight Gates. Thus, much of this information capacity is "redundant" (already determined by other elements).
Strictly speaking, the independent input information for one Qimen Dunjia chart is:
Bureau Number (18 types) $\times$ Shí Chén (12 types)
But we must also include the date information (which determines the Six Jia leader for the Value Symbol/Embodiment):
Day Stem/Branch (60 types)
Thus, the independent input information capacity is: $\log_2(18 \times 12 \times 60) = \log_2(12,960) \approx 13.66$ bits.
Wait—there is an error here. In reality, given a specific Year, Month, Day, and Hour, the Qimen chart initiation is completely deterministic. Thus, its independent input information is equivalent to a complete point in time.
However, Qimen Dunjia initiation does not use the Year information (only Solar Terms + Day Stem/Branch + Shí Chén), so its input information capacity is:
Solar Terms (24 types) $\times$ Upper/Middle/Lower Yuan (3 types) $\times$ Day Stem/Branch (60 types)
$= \log_2(24 \times 3 \times 60) = \log_2(4,320) \approx 11.98$ bits.
This input information capacity is about 12 bits—significantly less than Bazi's roughly 19 bits.
This means what$14 From the perspective of pure "input information," the information capacity of Qimen Dunjia appears smaller than that of Bazi. But the key to the problem lies here: Qimen Dunjia's mechanism for information amplification is far stronger than Bazi's.
Section 3: Information Amplification—The Core Advantage of Qimen Dunjia
What is "information amplification"$15 It means using a relatively small amount of input information, through the internal structure of the system, to generate an output information volume far greater than the input.
The mechanism of information amplification in Qimen Dunjia is manifested in:
1. Multi-Layer Plate Superposition
Given a point in time (about 12 bits of input), the Qimen system automatically generates a complete chart containing four layers of information:
- Earth Plate 9 Palaces $\times$ Curiosities/Instruments (9 symbols)
- Heaven Plate 9 Palaces $\times$ Stars + Curiosities/Instruments (9 + 9 = 18 symbols)
- Man Plate 8 Palaces $\times$ Gates (8 symbols)
- Spirit Plate 8 Palaces $\times$ Spirits (8 symbols)
Total: Earth Plate 9 + Heaven Plate 18 + Man Plate 8 + Spirit Plate 8 = 43 symbols simultaneously distributed across 9 palaces.
The arrangement state of these 43 symbols constitutes the "output information" of one chart. If constraints are ignored, the theoretical number of arrangements is immense.
2. Inter-Layer Interaction
The core judgment basis in Qimen Dunjia lies not in single-layer information but in inter-layer interactions—the combination of Heaven Plate Curiosities/Instruments and Earth Plate Curiosities/Instruments in the same palace (called "Qiyi Pattern" - Qíyí Géjú), which carries specific auspicious or inauspicious meanings.
For example:
- Heaven Plate Yi + Earth Plate Bing = "Qiyi Smooth Succession"
- Heaven Plate Geng + Earth Plate Yi = "Tai Bai Entering the Screen" (Tai Bai is Geng Metal)
- Heaven Plate Bing + Earth Plate Geng = "Screen Entering Tai Bai"
- Heaven Plate Geng + Earth Plate Geng = "Tai Bai Same Position" (Clash Pattern)
There are $9 \times 9 = 81$ possible combinations of the nine Heaven Plate Curiosities/Instruments and the nine Earth Plate Curiosities/Instruments—this constitutes the "Eighty-One Qimen Patterns." However, due to permutation constraints between the Heaven and Earth Plates, not all 81 patterns appear in every chart.
The actual number of Pattern combinations under constraint: Since the Heaven Plate and Earth Plate are each permutations of 9 different symbols, and the Heaven Plate arrangement is some rotation (or translation) of the Earth Plate arrangement, the total number of Heaven/Earth Plate combinations equals the number of Earth Plate arrangements $\times$ the number of Heaven Plate displacements = $18 \times 9 = 162$ (though this calculation is a simplification). More precisely, given an Earth Plate arrangement (18 types) and a Heaven Plate displacement (8-9 effective displacements), the total number of patterns is about $18 \times 9 = 162$ states.
Pattern information capacity $\approx \log_2(162) \approx 7.34$ bits (for 9 palaces).
3. Multi-Dimensional Cross-Judgment
For a specific palace, the interpreter must synthesize:
- The Heaven Plate Curiosities/Instruments of this palace (9 types).
- The Earth Plate Curiosities/Instruments of this palace (9 types).
- The Nine Stars of this palace (9 types).
- The Eight Gates of this palace (8 + 1 types, including the center having no gate).
- The Eight Spirits of this palace (8 + 1 types).
- The Trigram attribute of this palace (8 types, fixed).
- The Five Phase attribute of this palace (5 types, fixed).
If we treat each layer as an independent dimension (though they are not entirely independent), the information in one palace is:
$\log_2(9 \times 9 \times 9 \times 9 \times 9 \times 8 \times 5) \approx \log_2(2,624,400) \approx 21.32$ bits.
Total for 9 palaces $\approx 21.32 \times 9 \approx 191.9$ bits—but this is an overestimation because the distribution of symbols across palaces is strongly constrained.
A more reasonable estimation: Considering permutation constraints, the total independent arrangement information across the 9 palaces is about the sum of the arrangement information of each layer:
- Earth Plate Curiosities/Instruments Permutation: $\log_2(18) \approx 4.17$ (18 types corresponding to 18 Bureaus).
- Heaven Plate Curiosities/Instruments Displacement: $\log_2(9) \approx 3.17$ (Value Symbol can enter 9 palaces).
- Nine Stars Position: Follows the Heaven Plate, adds no independent information.
- Eight Gates Displacement: $\approx \log_2(8) = 3$.
- Eight Spirits Displacement: $\approx \log_2(8) = 3$.
Total independent permutation information $\approx 4.17 + 3.17 + 3 + 3 = 13.34$ bits.
But—this only covers "positional" information. More critical is the information derived from the interactions among layers.
Section 4: Information from Interactive Relationships
The primary basis for judgment in Qimen Dunjia relies on the following interactions:
1. Heaven-Earth Qiyi Patterns (81 Patterns)
Each palace has one Heaven/Earth Plate Qiyi pattern. The 9 palaces simultaneously present 9 patterns. The auspicious/inauspicious meanings of these patterns vary, and the patterns influence each other—e.g., one palace having an auspicious pattern, an adjacent palace having an inauspicious one, leads to mixed results.
The combination space of 9 Palace Patterns (theoretically): $81^9 \approx 1.5 \times 10^{17}$, information capacity about $\log_2(1.5 \times 10^{17}) \approx 57$ bits. But constrained by arrangement, the actual number of pattern combinations is far less.
The actual number of pattern states, given the constraints: The Heaven Plate arrangement is a rotation/translation of the Earth Plate arrangement, so the total number of Heaven/Earth combinations is constrained by the number of Earth Plate arrangements $\times$ number of Heaven Plate displacements $\approx 18 \times 9 = 162$ states (again, a simplification). More accurately, the total number of patterns is determined by the interaction of the two sets of permutations.
Pattern information capacity $\approx \log_2(162) \approx 7.34$ bits.
2. Gate and Star Combinations
Combination of Eight Gates and Nine Stars—which Gate falls into which Star's palace—has specific meaning. For instance, "Open Gate landing on Tianxin Star" differs greatly in meaning from "Open Gate landing on Tianpeng Star."
3. Gate and Qiyi Combinations
Similarly, the combination of the Eight Gates and the Heaven Plate Qiyi they fall upon—e.g., "Open Gate obtaining Yi Qi" (Auspicious), "Open Gate obtaining Geng" (Inauspicious)—this combination judgment is critical.
4. Star and Qiyi Combinations
Likewise, the combination of Nine Stars and Heaven Plate Qiyi has specific meanings.
5. Combinations with Spirits
The combination of the Eight Spirits with Gates, Stars, and Qiyi further enriches the information layers.
6. Five Phase Relationships Across Layers
The generation/overcoming between the Five Phases of the Heaven Plate and the Five Phases of the Earth Plate (the "Downward Adherence" relationship), the generation/overcoming between the Gate's Phase and the Palace's Phase, and the generation/overcoming between the Star's Phase and the Gate's Phase—this multi-layered network of Five Phase interactions is extremely complex.
Synthesizing the interactive relationship information from the above layers, the total relational information capacity of one Qimen Dunjia chart can be roughly estimated as follows:
| Interaction Layer | Estimated Information Capacity (bits) |
|---|---|
| Heaven/Earth Plate Patterns (9 Palaces) | $\approx 7-10$ |
| Gate/Star Combinations (8 groups) | $\approx 10-15$ |
| Gate and Qiyi Combinations (8 groups) | $\approx 10-15$ |
| Star and Qiyi Combinations (9 groups) | $\approx 10-15$ |
| Spirit Combinations (8 groups) | $\approx 10-15$ |
| Multi-layer Five Phase Network | $\approx 20-30$ |
| Utility/Focus Star Analysis | $\approx 10-20$ |
| Total Relational Info | $\approx 77-120$ |
Adding the positional information ($\approx 13$ bits), the total static information capacity of one Qimen Dunjia chart is about 90-133 bits.
Section 5: Dynamic Information of Qimen Dunjia
The dynamic information in Qimen Dunjia arises from:
1. Time Changes (Shí Chén)
A new chart is generated every two hours. 12 shí chén per day produce 12 different charts, each containing about 90-133 bits of information.
However, the charts in adjacent shí chén usually differ only slightly (only the Value Symbol moves one palace), so the independent information gained per change is small—about 10-20 bits.
Daily dynamic information increment: about $12 \times 15 = 180$ bits.
2. Date Changes
The Value Symbol and Value Embodiment change daily (depending on the sixty-year cycle's Ten-Day Period), meaning the basic chart for each day also changes.
3. Solar Term Changes
A new Yuan (5-day period) changes every 15 days, potentially causing a Bureau change (a shift in the underlying structure). This change is significant, adding tens of bits of independent information.
4. Annual Changes
Annual wandering stars (Zǐbái) and other factors also change annually.
Total dynamic information over a year: approximately $365 \times 12 \times 15 \approx 65,700$ bits (rough estimate, containing much redundancy). After deducting redundancy, the independent annual dynamic information might be several thousand bits.
Section 6: Estimation of Total Qimen Dunjia Information Capacity
| Information Layer | Estimated Information Capacity (bits) |
|---|---|
| Static Arrangement Info | $\approx 13$ |
| Heaven/Earth Pattern Relations | $\approx 7-10$ |
| Gate/Star/Spirit/Qiyi Interactions | $\approx 40-60$ |
| Multi-layer Five Phase Network | $\approx 20-30$ |
| Utility/Focus Star Analysis | $\approx 10-20$ |
| Dynamic Information (including chart changes) | $\approx 100-300$ |
| Total | $\approx 190-433$ |
Taking the median value, the total information capacity of Qimen Dunjia is about 250-400 bits.
Section 7: Preliminary Mathematical Comparison
| Bazi | Qimen Dunjia | |
|---|---|---|
| Input Information Capacity | $\approx 19$ bits | $\approx 12$ bits |
| Static Combination Information | $\approx 19$ bits | $\approx 13$ bits |
| Relational Information | $\approx 80-120$ bits | $\approx 77-120$ bits |
| Ten Gods/Pattern System | $\approx 20-25$ bits | $\approx 40-60$ bits (Multi-layer Patterns) |
| Dynamic Information | $\approx 100-200$ bits | $\approx 100-300$ bits |
| Total | $\approx 250-300$ bits | $\approx 250-400$ bits |
From this preliminary comparison, we can see:
- Input Information Capacity: Bazi is slightly greater than Qimen Dunjia.
- Static Combination Information: Bazi is slightly greater than Qimen Dunjia.
- Relational Information: The two are roughly equal.
- Intrinsic System Information (Ten Gods vs. Multi-layer Patterns): Qimen Dunjia is significantly greater than Bazi.
- Dynamic Information: Qimen Dunjia is slightly greater than Bazi (due to more frequent chart changes).
- Total Information Capacity: The upper limit of Qimen Dunjia is clearly higher than that of Bazi.
This preliminary conclusion suggests: Mathematically, the information capacity of Qimen Dunjia is greater than or equal to that of Bazi.
However, this conclusion needs further verification from a metaphysical perspective.