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.

Part One: Tracing the Origins
Chapter 1: The Initial Judgment of Heaven and Earth and the Beginning of Mathematical Principles—The Creation of Images and Numbers by the Ancient Sage-Kings
Section 1: Taiji Gives Birth to the Two Modes: Yin and Yang as the Origin of Information
The foundation of all arts of calculation lies in Yin and Yang.
The Book of Changes, Great Treatise (Part I) states:
"The Yi has the Supreme Ultimate (Taiji); this gives birth to the Two Modes (Liangyi); the Two Modes give birth to the Four Images (Sixiang); the Four Images give birth to the Eight Trigrams (Bagua)." (Yì yǒu tàijí, shì shēng liǎngyí, liǎngyí shēng sìxiàng, sìxiàng shēng bāguà.)
These few sentences are the grand outline of Chinese mathematical thinking. Taiji is the undifferentiated "One" of chaos; the Liangyi are the "Two" resulting from the differentiation of Yin and Yang. From "One" to "Two" is the beginning of information. Why is this so$7 Taiji is chaos, undifferentiable, thus there is no information to speak of. When Yin and Yang are distinguished, there is light and dark, hard and soft, movement and stillness; only then can things be "distinguished"—and "distinction" is the essence of information.
Chapter 42 of the Laozi states:
"The Dao produces One; One produces Two; Two produces Three; Three produces all things. The myriad things carry Yin on their back and embrace Yang in their arms; harmony is achieved through the blending of vital energy (chong qì)." (Dào shēng yī, yī shēng èr, èr shēng sān, sān shēng wànwù. Wànwù fù yīn ér bào yáng, chōng qì yǐ wéi hé.)
Laozi's "One produces Two" corresponds to the Xici Zhuan's "Taiji gives birth to the Two Modes." Once Yin and Yang are differentiated, the myriad things can be categorized, named, and inferred—this is the prerequisite for the emergence of information.
Consider deeply: Why can the "Two Modes" give birth to information$8 For Yin and Yang do not merely refer to light/dark or cold/heat; they are the general terms for all complementary opposites. With this opposition comes relationship; with relationship comes distinction; with distinction comes recognition; with recognition comes judgment—the flow of information begins here.
The Guanzi, Inner Cultivation Chapter (Neiye) states:
"The essence (jīng) of all things, this becomes life. Below it gives birth to the five grains; above it becomes the array of stars. Flowing between Heaven and Earth, it is called Ghost and Spirit (guǐshén); hidden within the chest, it is called the Sage." (Fán wù zhī jīng, cǐ zé wéi shēng. Xià shēng wǔ gǔ, shàng wéi liè xīng. Liú yú tiāndì zhī jiāijiān, wèi zhī guǐshén; cáng yú xiōngzhōng, wèi zhī shèngrén.)
This "essence" (jīng) is the subtle matter (jīngwēi) transformed by the interaction of Yin and Yang. Within this subtlety is contained the information of all things under Heaven, thus it can "below give birth to the five grains, above become the array of stars." Without the content of this information, how could the five grains differ$9 How could the stars be distinct$10
When we discuss the information capacity of Bazi and Qimen Dunjia, we must first realize: both take Yin and Yang as their fundamental informational units. The "position" (wèi) of one Yin and one Yang constitutes the smallest unit of information—like the modern "bit" (bǐtè)—a single position can carry two values: Yin or Yang. The complexity of all arcane arts arises from the superposition, combination, and transformation of these Yin and Yang units.
Section 2: The Two Modes Give Birth to the Four Images: The First Expansion of Information
The superposition of the Two Modes gives birth to the Four Images (Sixiang).
The original meaning of "Four Images" in the Xici Zhuan refers to Greater Yang, Lesser Yin, Lesser Yang, and Greater Yin—the dual-position combinations of Yin and Yang. If we denote Yang as "—" and Yin as "--", then:
- Greater Yang: Yang above, Yang below (— —)
- Lesser Yin: Yin above, Yang below (-- —)
- Lesser Yang: Yang above, Yin below (— --)
- Greater Yin: Yin above, Yin below (-- --)
The Four Images represent all possible arrangements of two Yin/Yang positions. Mathematically, $2^2 = 4$, which is the mathematical basis of the Four Images.
Why are the Four Images important$11 Because the Four Images correspond to the Four Seasons—Spring, Summer, Autumn, Winter—which is the fundamental framework for the operation of the Heavenly Way. The Book of Documents, Canon of Yao (Shangshu: Yao Dian) records:
"He then commanded Xi and He, to respectfully follow the vast Heaven, calculate the ephemerides of the sun, moon, and stars, and diligently present the proper times to the people. Xi Zhong was separately commanded to reside in Yí (Eastern lands), called the Valley of Yang. At sunrise in the Yin position, they regulated the work in the East. At midday, the star Niao (Heart), marking the middle of Spring... Xi Shu was separately commanded to reside in the Southern Border. They regulated the flourishing in the South, showing reverence. When the sun is at its zenith, the star Huǒ (Sharp), marking the middle of Summer... He Zhong was separately commanded to reside in the West, called the Valley of Darkness. At sunset in the Yin position, they regulated the harvest in the West. When the night is at its midpoint, the star Mǎo (Pleiades), marking the middle of Autumn... He Shu was separately commanded to reside in the Northern Quarter, called Yōu Dū. They regulated the transition in the North. When the day is short, the star Mǎo (Pleiades), marking the middle of Winter..."
This records Emperor Yao commanding the four sons of Xi and He to be in charge of the Four Seasons. The Four Seasons constitute the first layer of the framework for the information of the Heavenly Way. The four pillars (Year, Month, Day, Hour) of Bazi are based on the succession of the Four Seasons; the layout of Qimen Dunjia also takes the Four Seasons as the basis for initiating the chart. Thus, the principle of the Four Images is the common mathematical foundation for both arts.
Section 3: The Four Images Give Birth to the Eight Trigrams: The Second Expansion of Information
The superposition of the Four Images, by adding one more line, gives birth to the Eight Trigrams (Bāguà).
The Xici Zhuan states: "The Four Images give birth to the Eight Trigrams." The Eight Trigrams represent all possible arrangements of three Yin/Yang lines. $2^3 = 8$, which is the mathematical basis of the Eight Trigrams.
The names and images of the Eight Trigrams:
Qian is three connected lines (☰), Kun is six broken lines (☷), Zhen is an upturned bowl (☳), Gen is an inverted bowl (☶), Li is hollow in the center (☲), Kan is full in the center (☵), Dui has a gap on top (☱), Xun has a break below (☴).
The Shuogua Zhuan details the images of the Eight Trigrams:
"Qian is Heaven, Kun is Earth, Zhen is Thunder, Xun is Wind, Kan is Water, Li is Fire, Gen is Mountain, Dui is Lake."
"Qian, vigorous. Kun, yielding. Zhen, moving. Xun, entering. Kan, sinking. Li, adhering. Gen, stopping. Dui, pleasing."
"Qian is the horse, Kun is the ox, Zhen is the dragon, Xun is the cock, Kan is the swine, Li is the pheasant, Gen is the dog, Dui is the sheep."
"Qian is the head, Kun is the abdomen, Zhen is the foot, Xun is the thigh, Kan is the ear, Li is the eye, Gen is the hand, Dui is the mouth."
The information capacity of the Eight Trigrams lies not only in their number (eight symbols) but also in their "Images" (Xiàng). Each trigram can be associated with infinite images—this is the core feature of symbolic information encoding in arcane arts: to bear infinite symbolic meaning through a finite set of symbols.
Here we must ask a critical question:
Why is the information capacity of the Eight Trigrams far greater than their mathematical combination number (eight)$12
The answer is: because the Eight Trigrams are not merely numerical symbols but symbols of "Images." An "Image" (Xiàng) is a category (lèi). The Xici Zhuan states: "The Sage perceived the intricacy (zé) of the world below, and modeled it on its forms, symbolizing its suitability for things; therefore, it is called Image." To "model it on its forms, symbolizing its suitability for things" means using the trigram images to "simulate" the forms and laws of all things in Heaven and Earth. The image of one trigram can encompass a category of things—and the capacity of a "category" is far greater than that of an "individual." Therefore, the information capacity of the Eight Trigrams cannot be simply counted as "8," but should be counted as "8 × N," where N is the number of image categories encompassed by each trigram, theoretically tending toward infinity.
This principle is crucial for comparing the information capacities of Bazi and Qimen Dunjia—one must not only count the number of mathematical combinations but also measure the breadth of the symbolic semantic space mapped by each combination.
Section 4: The Eight Trigrams Doubled to Form Sixty-Four Hexagrams: The Third Expansion of Information
The doubling of the Eight Trigrams results in the Sixty-Four Hexagrams (Liùshísì Guà).
The Xici Zhuan states:
"The Eight Trigrams, when made small, are extended and stretched, categorized and enlarged; the matters of the world below are thereby completed." (Bāguà ér xiǎo chéng, yǐn ér shēn zhī, chùlèi ér zhǎng zhī, tiānxià zhī néngshì bìyǐ.)
"And then doubled, the lines (yáo) are contained within. Hardness and softness push and change each other, transformation is contained within. Statements are attached to name them, movement is contained within." (Yīn'ér chóng zhī, yáozài qízhōng yǐ. Gāngróu xiāngtuī, biànzài qízhōng yǐ. Xì cí yān ér mìng zhī, dòngzài qízhōng yǐ.)
The doubling of the Eight Trigrams is the superimposition of the upper and lower primary trigrams. $8 \times 8 = 64$, which is the mathematical basis for the Sixty-Four Hexagrams. And each hexagram has six lines, each line having two values (Yin or Yang), meaning the total number of information positions in the Sixty-Four Hexagrams is $64 \times 6 = 384$ lines.
The Xici Zhuan also states:
"The divination sticks for Qian number two hundred and sixteen, and for Kun one hundred and forty-four; in total three hundred and sixty, corresponding to the days of the year. The sticks of the two sections total eleven thousand five hundred and twenty, corresponding to the number of the myriad things." (Qián zhī cè èrbǎi yīshíyù, kūn zhī cè yīshíwùyù, fán sānbǎi yǒu liùshí, dāng qī zhī rì. Èr piān zhī cè wàn yī qiān wǔbǎi èrshí, dāng wànwù zhī shù yě.)
This refers to the number of sticks used in the divination process. The Qian hexagram has six lines, each line assigned thirty-six sticks, so $6 \times 36 = 216$. The Kun hexagram has six lines, each assigned twenty-four sticks, so $6 \times 24 = 144$. $216 + 144 = 360$, corresponding to the days of the year. This is the unification of mathematical principles and the Heavenly Way. And "the sticks of the two sections total eleven thousand five hundred and twenty," meaning the total information capacity expressed mathematically for the sixty-four hexagrams is 11,520—this "corresponds to the number of the myriad things."
Why does 11,520 "correspond to the number of the myriad things"$13 This requires deep reflection. The 360 days of the year are the cycle of the Heavenly Way; the 11,520 sticks are the mathematical expression of the total information capacity of the sixty-four hexagrams. Looking at $11,520 / 360 = 32$, this happens to be half of the sixty-four hexagrams—which implicitly agrees with the principle that Yin and Yang are balanced. Such a mathematical structure is not accidental; it was established by the Sages after deeply discerning the mathematical laws of the Heavenly Way.
The significance of the Sixty-Four Hexagrams lies in this: they constitute a complete "Cosmic Information Encoding System." What the Xici Zhuan refers to as "vast and fully equipped" (guǎngdà xī bèi) means precisely this. All things under Heaven can be encoded, categorized, and inferred using the framework of the Sixty-Four Hexagrams.
Both Bazi and Qimen Dunjia can be seen as "adaptations" (huàcái) of the Sixty-Four Hexagram System—transforming the cosmic information carried by the sixty-four hexagrams into operational arcane forms through different methods.
Section 5: The Five Numbers of Heaven and Five Numbers of Earth: The Mathematical Foundation of the River Chart and Luo Writing
The Xici Zhuan states:
"Heaven is One, Earth is Two; Heaven is Three, Earth is Four; Heaven is Five, Earth is Six; Heaven is Seven, Earth is Eight; Heaven is Nine, Earth is Ten. The numbers of Heaven are five, the numbers of Earth are five; the five combine in pairs, each having a total. The sum of the numbers of Heaven is twenty-five, the sum of the numbers of Earth is thirty; in total, Heaven and Earth together number fifty-five. This is how change is accomplished and spirits and ghosts are moved." (Tiān yī dì èr, tiān sān dì sì, tiān wǔ dì liù, tiān qī dì bā, tiān jiǔ dì shí. Tiān shù wǔ, dì shù wǔ, wǔ xiāng dé ér gè yǒu hé. Tiān shù èrshíyǒu wǔ, dì shù sānshí, fán tiāndì zhī shù wǔshíyǒu wǔ. Cǐ shì yǐ chéng biànhuà ér xíng guǐshén yě.)
This is the "Numbers of Heaven and Earth." The Heavenly Numbers (odd): 1, 3, 5, 7, 9, summing to 25; the Earthly Numbers (even): 2, 4, 6, 8, 10, summing to 30. The total sum of Heaven and Earth numbers is 55.
These 55 numbers are closely related to the River Chart (Hétú) and Luo Writing (Luòshū).
The numbers of the River Chart:
Heaven generates Water by One, Earth completes it by Six (North). Earth generates Fire by Two, Heaven completes it by Seven (South). Heaven generates Wood by Three, Earth completes it by Eight (East). Earth generates Metal by Four, Heaven completes it by Nine (West). Heaven generates Earth by Five, Earth completes it by Ten (Center).
The Generating Numbers (1, 2, 3, 4, 5) sum to 15; the Completing Numbers (6, 7, 8, 9, 10) sum to 40; the total sum is 55—which is the sum of the Heavenly and Earthly Numbers.
The numbers of the Luo Writing:
Nine on top, One below; Three on the left, Seven on the right; Two and Four form the shoulders, Six and Eight form the feet; Five resides in the center.
The numbers in the Luo Writing sum to fifteen in all rows, columns, and diagonals—this is the mathematical structure of a third-order magic square.
The distinction between the River Chart and Luo Writing corresponds precisely to different facets of the mathematical foundations of Bazi and Qimen Dunjia.
The River Chart governs "Generation" (Shēngchéng)—Heaven One generates Water, Earth Two generates Fire, etc. This represents the sequential generation and completion of the Five Phases in the time series, matching the characteristic of Bazi, which takes the flow of time (Year, Month, Day, Hour) as its main axis. The essence of Bazi is to grasp the pattern of "generation" (shēngchéng) of Yin/Yang and Five Phases at the moment of a person's birth—thus its mathematical foundation leans toward the River Chart.
The Luo Writing governs "Arrangement" (Bùliè)—the fixed positions of the Nine Palaces, with their intersecting numerical relationships expressed spatially—matching the characteristic of Qimen Dunjia, which uses the Nine Palaces as a board and arranges various symbols in spatial orientations. The essence of Qimen Dunjia is to grasp the "arrangement" (bùliè) pattern of the Heaven, Man, and Earth plates in a specific time-space—thus its mathematical foundation leans toward the Luo Writing.
However, the River Chart and Luo Writing are not entirely separate entities. The Xici Zhuan states:
"The River produced a chart, Luo produced writing; the Sages took them as models." (Hé chū tú, Luò chū shū, shèngrén zé zhī.)
The Sages "took them as models," meaning they established arcane arts based on the River Chart and Luo Writing. The numbers of the River Chart and the numbers of the Luo Writing correspond, transform, and interweave. Although Bazi leans toward time (River Chart), it also contains spatial information; although Qimen Dunjia leans toward space (Luo Writing), it also uses time to initiate the chart. The comparison of their information capacities first manifests as a comparison of the mathematical capacities of the River Chart system versus the Luo Writing system.
Let us ask: Is the mathematical capacity of the River Chart greater, or is the capacity of the Luo Writing greater$14
Core data of the River Chart: 5 pairs of generating numbers, totaling 10 numbers, summing to 55. Core data of the Luo Writing: 9 palace positions, summing to 45, with only 1 arrangement structure for the third-order magic square (8 including rotations and reflections).
From a purely combinatorial mathematics perspective, the "generative relationship" of the River Chart contains the mutual generation and overcoming relationships of the Five Phases; its information capacity lies in "relationship" rather than "arrangement." The "nine-palace arrangement" of the Luo Writing contains the intersecting relationships of spatial directions; its information capacity lies in "structure" rather than "generation."
Here we see a deeper pattern: A temporal information system (e.g., River Chart $\rightarrow$ Bazi) determines its information capacity mainly by "sequential relationships"; a spatial information system (e.g., Luo Writing $\rightarrow$ Qimen) determines its information capacity mainly by "structural relationships." Sequential relationships are one-dimensional, while structural relationships are multi-dimensional—this might suggest that the information capacity of Qimen Dunjia could, in some respects, be greater than that of Bazi.
However, this inference requires more detailed argumentation, which will be unfolded in the subsequent sections.
Section 6: The Great Extrapolation Number and the Information Theory of Divination
The Xici Zhuan further states:
"The Great Extrapolation Number is Fifty, and forty-nine are used. Divide them into two to symbolize the Two Modes; suspend one to symbolize Three; strip them four by four to symbolize the Four Seasons; return the remainder to the pile to symbolize the intercalary month. After five years, there are two intercalary months, so after two remainders are returned, one is suspended." (Dàyǎn zhī shù wǔshí, qí yòng sìshíyǒu jiǔ. Fēn ér wéi èr yǐ xiàng liǎng, guà yī yǐ xiàng sān, shiè zhī yǐ sì yǐ xiàng sìshí, guī qí yú lèi yǐ xiàng rùn. Wǔ nián zài rùn, gù zài lèi ér hòu guà.)
This describes the method of divination using yarrow stalks (shéshī). The Great Extrapolation Number is Fifty, but Forty-nine are used. This process of dividing, suspending, stripping, and returning the 49 stalks ultimately yields four results for a single line: Elder Yang, Lesser Yin, Lesser Yang, Elder Yin.
Why is the Great Extrapolation Number Fifty$15 The Xici Zhuan does not explain, and there are many debates. From a mathematical perspective: $55$ (Heaven and Earth Numbers) $- 5$ (Heaven's Five) $= 50$. Heaven's Five resides in the center and is unused, taking the remaining 50, and then discarding one unused stalk (49). The meaning of this "omission of One" is profound—Laozi says "Dao produces One"; this "One" is the number of Taiji, omitted because it is untouchable. Thus, the usable number is 49.
$49 = 7 \times 7 = 7^2$. Seven is the number of Lesser Yang (Heaven Seven). Multiplying the number of Lesser Yang by itself yields the base number for divination, implying the meaning that Lesser Yang governs generation and activity.
In each round of divination (three changes), the 49 stalks are distributed according to specific numerical values, and the resulting probability distribution is:
- Elder Yang (Value 36): Probability 3/16
- Lesser Yin (Value 32): Probability 5/16
- Lesser Yang (Value 28): Probability 7/16
- Elder Yin (Value 24): Probability 1/16
This probability distribution is not uniform—Lesser Yang (7/16) is most frequent, Elder Yin (1/16) is least frequent, implicitly agreeing with the principle that "Yang governs emergence, Yin governs concealment."
From an information theory perspective, a non-uniform distribution has lower information entropy than a uniform distribution. If all four outcomes were equally probable, the entropy per line would be $\log_2(4) = 2$ bits. Under the non-uniform probabilities of yarrow divination, the entropy ($H$) is:
$H = - (3/16 \cdot \log_2(3/16) + 5/16 \cdot \log_2(5/16) + 7/16 \cdot \log_2(7/16) + 1/16 \cdot \log_2(1/16))$
This value is approximately $1.749$ bits, which is less than 2 bits.
The total information entropy for a complete hexagram (six lines) is approximately $6 \times 1.749 \approx 10.49$ bits.
This is the amount of information obtained from one complete divination—about $10.5$ bits.
Using this as a reference, we can similarly calculate the information capacities of Bazi and Qimen Dunjia.
We must ask: Why did the Sages establish such a non-uniform probability distribution$16 Wouldn't a uniform distribution be more "fair"$17
The answer is: The Heavenly Way is inherently not "uniform." The lengths of Spring, Summer, Autumn, and Winter are different; the waxing and waning of day and night are unequal; the rise and fall of the Five Phases change constantly—this is the actual state of the "non-uniformity" of the Heavenly Way. The Sages' divination method simulates precisely this "non-uniformity" of the Heavenly Way. The information encoding of arcane arts does not seek "uniformity" but rather "conformity to the Dao" (hézō*). This differs from the pursuits of pure mathematics later on. The information structures of Bazi and Qimen Dunjia also possess their own forms of "non-uniformity"; this "non-uniformity" is precisely the characteristic of their respective information.
Chapter 2: The Origin of the Stems and Branches: An Encoding System for the Circulation of Heaven's Way
Section 1: The Origin and Meaning of the Ten Heavenly Stems
The Ten Heavenly Stems (Tiāngān) are: Jia (甲), Yi (乙), Bing (丙), Ding (丁), Wu (戊), Ji (己), Geng (庚), Xin (辛), Ren (壬), Gui (癸).
The names of the Stems already existed in antiquity. The Book of Documents, Oath of Gan (Shangshu: Gan Shi) records the words of Xia Qi:
"The great battle at Gan, then summoned the Six Ministers. The King said: 'Alas! Men of the Six Offices, I now declare to you...'"
Although the Stems are not explicitly mentioned here, in the oracle bone inscriptions of the Shang Dynasty, the Stems were already widely used for dating days and for ancestral temple names, such as "Da Jia," "Pan Geng," "Wu Ding," etc., all using Heavenly Stems as names. The fact that the Yin people named their ancestral kings using Stems shows the sacred status of the Stems in the Shang period.
The meaning of the Stems, explained in the Erya, Distinctions of Heaven (Shi Tian):
"Jia, the beginning of the year. Yi, rubbing/grinding (yǎ). Bing, bright. Ding, mature/reaching. Wu, flourishing (mào). Ji, regulating (jì). Geng, changing (gēng). Xin, new (xīn). Ren, responsible/bearing (rèn). Gui, measuring (kuí)."
Although this method of naming may have been established by Han Confucian scholars, the meanings revealed can be traced back earlier. The sequence of the Ten Stems actually reflects a complete cycle of growth and storage:
- Jia (Beginning to grow) $\rightarrow$ Yi (Emerging crookedly) $\rightarrow$ Bing (Clearly visible) $\rightarrow$ Ding (Flourishing) $\rightarrow$ Wu (Peak flourishing) $\rightarrow$ Ji (Regulating and concluding) $\rightarrow$ Geng (Changing and becoming austere) $\rightarrow$ Xin (Hardship and decline) $\rightarrow$ Ren (Concealing and nurturing) $\rightarrow$ Gui (Measuring for the next generation).
These ten phases reflect the entire process of growth and storage of all things throughout the year.
From a mathematical perspective, the Ten Stems constitute a "decimal cycle." Why is Ten the number$18
The Guanzi, Five Phases Chapter states:
"Heaven takes time (shí) as its standard; Earth takes material (cái) as its standard. When the material standard and the time standard align, life occurs; if they do not align, life does not occur." (Tiān yǐ shí wéi zhèng, dì yǐ cái wéi zhèng. Cái shí shùn, zé shēng; bù shùn, zé bù shēng.)
Heaven's "Time" is based on the Five Phases, and each Phase is divided into Yin and Yang, thus $5 \times 2 = 10$, which is the mathematical basis for the Heavenly Stems.
Five Phases: Wood, Fire, Earth, Metal, Water. Yin/Yang: Yang Stems, Yin Stems.
Correspondence:
- Jia (Yang Wood), Yi (Yin Wood)
- Bing (Yang Fire), Ding (Yin Fire)
- Wu (Yang Earth), Ji (Yin Earth)
- Geng (Yang Metal), Xin (Yin Metal)
- Ren (Yang Water), Gui (Yin Water)
Information encoding dimensions of the Ten Heavenly Stems:
- Five Phase attributes (5 types)
- Yin/Yang attributes (2 types)
- Sequential position (10 places)
- Directional correspondence (East, South, Center, West, North—5 directions)
- Seasonal correspondence (Spring, Summer, Autumn, Winter, including Long Summer)
- Five Tones correspondence (Jue, Zhi, Gong, Shang, Yu)
- Five Colors correspondence (Blue-green, Red, Yellow, White, Black)
Each Heavenly Stem simultaneously carries multiple pieces of information—this is the core feature of the mapping of "Images" (Xiàng): multi-dimensional mapping.
Section 2: The Twelve Earthly Branches: Origin and Meaning
The Twelve Earthly Branches (Dìzhī) are: Zi (子), Chou (丑), Yin (寅), Mao (卯), Chen (辰), Si (巳), Wu (午), Wei (未), Shen (申), You (酉), Xu (戌), Hai (亥).
The use of the Branches is also evident in Shang oracle bones, used for the earthly branch component of dating days, and for dating months.
The number Twelve originates from observations of the Heavenly Way. The Zuo Zhuan, Duke Zhao Year 7 quotes an ancient saying:
"Heaven has ten Suns; Man has ten ranks." (Tiān yǒu shí rì, rén yǒu shí děng.)
These "Ten Suns" refer to the Ten Heavenly Stems. The "Twelve" of the Earthly Branches originates from observations of Jupiter (the Wood Star) taking about twelve years for one revolution, as well as the division of the year into twelve months and the day into twelve shí chén (double-hours).
The Erya, Distinctions of Heaven explains the names of the Earthly Branches:
"When the Great Year (Tàisuì) is in Yin, it is called Shè tí gé; in Mao, Dān é; in Chen, Zhí xú; in Si, Dà huāng luò; in Wu, Dūn zāng; in Wei, Xié xiá; in Shen, Tún tān; in You, Zuò è; in Xu, Yān mào; in Hai, Dà yuān xiàn; in Zi, Kùn dūn; in Chou, Chì fèn ruò."
These are the twelve names for dating the year by Jupiter, corresponding one-to-one with the Twelve Earthly Branches. The method of dating by Jupiter existed in antiquity and was mature by the Spring and Autumn period and the Warring States period.
Information encoding dimensions of the Twelve Earthly Branches:
- Five Phase attributes: Yin, Mao (Wood); Si, Wu (Fire); Chen, Xu, Chou, Wei (Earth); Shen, You (Metal); Hai, Zi (Water).
- Yin/Yang attributes: Zi, Yin, Chen, Wu, Shen, Xu (Yang); Chou, Mao, Si, Wei, You, Hai (Yin).
- Directional correspondence: Twelve directions (30° per direction).
- Monthly Correspondence: The first month is Yin, the second Mao... the twelfth Chou.
- Time Correspondence: Zi hour (11 PM – 1 AM) ... Hai hour (9 PM – 11 PM).
- Zodiac correspondence: Zi Rat, Chou Ox... Hai Pig (this system is also ancient).
- Hidden Stems (Zàng Gān) correspondence: Each Earthly Branch "hides" one to three Heavenly Stems within it.
The concept of "Hidden Stems" is very important here. Take Zi, for example: it hides Gui Water. Take Chou: it hides Ji Earth, Xin Metal, and Gui Water. The Heavenly Stems are concealed within the Earthly Branches—this signifies "Heaven hidden within Earth," meaning the information capacity of the Earthly Branches is greatly increased, far exceeding their superficial twelve symbols.
Section 3: The Sixty Jiazi: The Great Cycle of Stems and Branches
By pairing the Ten Heavenly Stems with the Twelve Earthly Branches, pairing Stems and Branches of the same Yin/Yang quality, we obtain sixty combinations of Stems and Branches, called the "Sixty Jiazi" or "Sixty Hua Jia."
Jia Zi, Yi Chou, Bing Yin, Ding Mao, Wu Chen, Ji Si, Geng Wu, Xin Wei, Ren Shen, Gui You, Jia Xu, Yi Hai... cycling until Gui Hai, totaling sixty.
Why sixty$19
Mathematically, the Least Common Multiple of 10 and 12 is 60. Thus, only after the Heavenly Stems cycle 6 times and the Earthly Branches cycle 5 times does it return to the starting Jia Zi—this is the mathematical necessity of the Sixty Jiazi.
In terms of the Heavenly Way, sixty years constitute one "Great Cycle." The Zuo Zhuan, Duke Xiang Year 9 records:
"The eleventh month, Jia Zi. The Odes say: 'The foundation was martial like those of Zhou; in every generation there were wise kings.' Jia Zi is the Great Number of Heaven." (Jiǎzǐ, tiān zhī dà shù yě.)
Although this does not directly mention the Sixty Jiazi cycle, the status of "Jia Zi" as the "Great Number of Heaven" shows its importance in the minds of pre-Qin people.
Information structure analysis of the Sixty Jiazi:
Sixty combinations of Stems and Branches, each combination carrying the following layers of information:
- Heavenly Stem Information: Five Phases, Yin/Yang, Ten Gods relationship (relative to a reference Stem).
- Earthly Branch Information: Five Phases, Yin/Yang, Direction, Monthly Command, Time, Hidden Stems.
- Stem-Branch Relationship: The Heavenly Stem sits upon the Earthly Branch, and the two have a "generation-overcoming" relationship—Stem generates Branch, Stem overcomes Branch, Branch generates Stem, Branch overcomes Stem, Stem and Branch share the same Qi.
- Nayin Five Phases: Each pair of Stems and Branches has a unique Nayin (Sound-Intonation)—Jia Zi and Yi Chou are "Metal in the Sea," Bing Yin and Ding Mao are "Fire in the Furnace," etc. This Nayin system adds another dimension of information to the Sixty Jiazi system.
Information capacity calculation of the Sixty Jiazi (preliminary):
If we only count the number of combinations, the information capacity of 60 symbols is $\log_2(60) \approx 5.91$ bits.
However, the Sixty Jiazi are not isolated symbols—they have sequential relationships (Yi Chou must follow Jia Zi), hierarchical relationships (Stem, Branch, Hidden Stems, Nayin), and relationship dynamics among them (Harmonies, Clashes, Overcomings, Harmonies, Destructions). Therefore, their actual information capacity far exceeds $5.91$ bits.
Here, a key point is raised: The calculation of information capacity in arcane arts cannot rely solely on simple combinatorial logarithms; it must also consider the information embedded in the network of relationships among the symbols.
Section 4: The Secret of Nayin: A Deeper Information Dimension of the Sixty Jiazi
The Nayin Five Phases are the deep information encoding of the Sixty Jiazi. Every two adjacent Stems and Branches share one Nayin, so the Sixty Jiazi have thirty Nayin, divided into six subcategories for each of the Five Phases:
- Metal: Metal in the Sea, Metal of Sword Edge, Metal of White Wax, Metal in Sand, Metal Foil, Metal Hairpin.
- Wood: Wood of the Great Forest, Wood of Willow, Wood of Pine and Cypress, Wood on Flat Ground, Wood of Mulberry and Ziziphus, Wood of Pomegranate.
- Water: Water of the Torrent Bed, Water of the Great Stream, Flowing Water of the Vast River, Water of the Heavenly River, Water of the Great Sea, Water of Well and Spring.
- Fire: Fire of Thunderclap, Fire in the Furnace, Fire of Overturned Lamp, Fire in the Heavens, Fire under the Mountain, Fire on the Mountaintop.
- Earth: Earth by the Roadside, Earth of City Walls, Earth on Rooftops, Earth of Walls, Earth of the Great Relay Station, Earth in Sand.
The method for deriving Nayin is rumored to originate from the pre-Qin method of "Nà Jiǎ" (incorporating Jia). The Zuo Zhuan, Duke Xi Year 15 quotes Han Jian:
"The tortoise is an image; divination is number. Things are born and then have images; after images, there is growth; after growth, there is number." (Guī, xiàng yě; shì, shù yě. Wù shēng ér hòu yǒu xiàng, xiàng ér hòu yǒu zī, zī ér hòu yǒu shù.)
"Image" precedes "Number"—this is a basic concept in pre-Qin Yi learning. The Nayin method is to merge "Number" with "Image"—transforming the numerical relationships of the Sixty Jiazi into concrete material images of the Five Phases, thereby greatly enriching the information capacity of the Stems and Branches system.
"Metal in the Sea" and "Metal of Sword Edge" both belong to Metal, yet one is in the sea, the other is on a blade—the nature, strength, and use of the "Metal" are entirely different. This method of "material objectification" encoding allows the information capacity of the Sixty Jiazi to extend beyond the framework of "Five Phases $\times$ Yin/Yang" into the specific domain of countless things and phenomena.
From an information capacity perspective, Nayin adds 30 unique "material image symbols" to the Sixty Jiazi, each symbol capable of mapping to a class of concrete things. This additional information capacity is approximately $\log_2(30) \approx 4.91$ bits.
Thus, the total information capacity of the Sixty Jiazi is at least:
Basic Combination Information ($\approx 5.91$ bits) + Nayin Information ($\approx 4.91$ bits) + Relationship Information (Clash, Harmony, etc., to be calculated separately).
This total volume is already considerable—it is at least 10.82 bits plus relationship information.
Section 5: The Complete System of Stem-Branch Timekeeping
The dating of Years, Months, Days, and Hours by the Sixty Jiazi forms the data foundation of Bazi.
A complete point in time is expressed by the Four Pillars of Bazi:
- Year Pillar: One of the Sixty Jiazi (Year dating)
- Month Pillar: One of the Sixty Jiazi (Month dating, delimited by solar terms)
- Day Pillar: One of the Sixty Jiazi (Day dating)
- Hour Pillar: One of the Sixty Jiazi (Hour dating, Twelve shí chén $\times$ Heavenly Stems)
The Four Pillars comprise eight characters (four Heavenly Stems, four Earthly Branches), which is the origin of the name "Eight Characters."
Calculating the theoretical combination number of Bazi from a mathematical perspective:
- Year Pillar: 60 possibilities
- Month Pillar: Constrained by the Year Pillar's Stem (Method of deriving months from the year), theoretically 60 possibilities, but practically about 60.
- Day Pillar: 60 possibilities
- Hour Pillar: Constrained by the Day Pillar's Stem (Method of deriving hours from the day), 12 hours per day, pairing with Stems yields 60 possibilities, but only 12 are used per day.
Considering actual astronomical constraints—the Heavenly Stem of the Year determines the start of the Heavenly Stem of the Month, the Heavenly Stem of the Day determines the start of the Heavenly Stem of the Hour—the actual combination number of Bazi requires a more precise calculation:
Year Pillar (60) $\times$ Month Pillar (12 possibilities per year, constrained by the Year Stem) $\times$ Day Pillar (60) $\times$ Hour Pillar (12 per day)
That is: $60 \times 12 \times 60 \times 12 = 518,400$ combinations.
However, not all 518,400 combinations actually occur in the astronomical calendar due to factors like long/short months and leap months; the actual number of occurring Bazi combinations is slightly lower—but the order of magnitude remains around half a million.
In terms of information capacity: $\log_2(518,400) \approx 18.98$ bits.
This is the "static combination information capacity" of Bazi—about 19 bits.
But this is only the starting point. The information capacity of Bazi is far greater than this.
Here we introduce a critical point: The calculation of information capacity in arcane arts cannot rely merely on simple combinatorial logarithms, but must consider the information contained in the network of relationships among the symbols.
Chapter 3: The Origin of Qimen Dunjia: An Encoding System for Military Strategy and the Heavenly Way
Section 1: The Origin of the Nine Palaces and the Number of the Luo Writing
The spatial foundation of Qimen Dunjia is the Nine Palaces (Jiǔ Gōng). The Nine Palaces originate from the Luo Writing.
The Xici Zhuan states:
"The River produced a chart, Luo produced writing; the Sages took them as models." (Hé chū tú, Luò chū shū, shèngrén zé zhī.)
The arrangement of the Nine Numbers of the Luo Writing:
4 9 2
3 5 7
8 1 6
This is a third-order magic square, where the sum of numbers in every row, column, and main diagonal is fifteen.
The names of the Nine Palaces, according to pre-Qin documents like the Lüshi Chunqiu, Records of Origin (You Shi Lan), relate to the concept of eight directions plus the center. The Nine Palaces correspond to the Eight Trigrams plus the Central Palace:
- Kan (One Palace, North)
- Kun (Two Palace, Southwest)
- Zhen (Three Palace, East)
- Xun (Four Palace, Southeast)
- Zhong (Five Palace, Center)
- Qian (Six Palace, Northwest)
- Dui (Seven Palace, West)
- Gen (Eight Palace, Northeast)
- Li (Nine Palace, South)
This assignment of the Eight Trigrams to the Nine Palaces perfectly matches the numbers of the Luo Writing—Kan trigram in the northern first palace, Kun in the southwestern second palace... Li in the southern ninth palace.
Mathematical characteristics of the Nine Palaces:
- Magic Square Property: Rows, columns, and diagonals all sum to fifteen—this implies that the numerical relationship among the three palaces on any line is "balanced," and the information distribution is uniform.
- Symmetry: Opposite palace numbers sum to ten (1+9, 2+8, 3+7, 4+6)—this implicitly agrees with Yin/Yang symmetry.
- Centrality: Five resides in the center, being half the sum of all diagonals—this is the numerical expression of "Center."
- Rotational Invariance: The Luo Writing has four rotational transformations (0°, 90°, 180°, 270°), forming the cyclic group $C_4$.
The information capacity of the Nine Palaces is based on nine positions $\times$ the content that can be placed in each position = capacity determined by the richness of the content placed.
Section 2: The Origin of the Three Curiosities and Six Instruments
The core symbolic system of Qimen Dunjia includes the "Three Curiosities" (Sān Qí) and the "Six Instruments" (Liù Yí):
Three Curiosities: Yi (乙), Bing (丙), Ding (丁) Six Instruments: Wu (戊), Ji (己), Geng (庚), Xin (辛), Ren (壬), Gui (癸)
Totaling nine Heavenly Stems (Jia 甲 is not used because Jia is the commander, hidden beneath the Six Instruments, hence "Dunjia" or "Escaping Jia").
The method of Jia Hiding:
- Jia Zi hides under Wu.
- Jia Xu hides under Ji.
- Jia Shen hides under Geng.
- Jia Wu hides under Xin.
- Jia Chen hides under Ren.
- Jia Yin hides under Gui.
These six Jia (Jia Zi, Jia Xu, Jia Shen, Jia Wu, Jia Chen, Jia Yin), which are the six leaders of the Sixty Jiazi cycle, are collectively called the "Six Jia." Each of the Six Jia hides under one Instrument, meaning the Six Instruments are the "incarnations" of the Six Jia.
Why must Jia "hide"$20 The Zuo Zhuan, Duke Xuan Year 3 records:
"The position of the Son of Heaven cannot be vacant." (Tiānzǐ zhī wèi, bùkě kuàng yě.)
Jia, the head of the Ten Stems, is like the Son of Heaven. The Son of Heaven does not personally lead the troops but entrusts the generals to carry out his orders—this is the symbolic basis for "Dunjia." Jia hides and does not appear, using the Three Curiosities and Six Instruments as vanguards, like the Son of Heaven hidden in the deep palace dispatching his generals.
From an information science perspective, "hiding" (dùn) means "hiding information"—the information of Jia is not directly presented but expressed indirectly through the Instrument under which it hides. This adds a layer to the system's information hierarchy: the surface information (the Stems displayed by the Six Instruments) and the deep information (the identity of the Jia hidden by the Six Instruments) form a dual-layer encoding, causing the same symbol to carry a double meaning.
The character Qí in the Three Curiosities means "unusual" or "surprise troops." The Guanzi, Minor Officials Chapter (Yòu Guān) states:
"Govern the state with the Orthodox (zhèng); employ troops with the Unusual (qí)." (Yǐ zhèng zhì guó, yǐ qí yòng bīng.)
Laozi, Chapter 67 (in common editions Chapter 57) also states:
"Governing the state with the Orthodox, employing troops with the Unusual, conquering the world without action." (Yǐ zhèng zhì guó, yǐ qí yòng bīng, yǐ wú shì qǔ tiānxià.)
The Three Curiosities are the surprise troops of military strategy. Yi, Bing, and Ding have a special auspicious status in Qimen Dunjia—any palace occupied by the Three Curiosities generally indicates advantage.
Information dimensions of the Three Curiosities and Six Instruments:
- Five Phase and Yin/Yang attributes of the Stems.
- Special identity (Curiosity or Instrument).
- The identity of the Jia hidden by the Instrument (which of the Six Jia).
- The relationship among the Three Curiosities and Six Instruments.
Section 3: The Origin of the Eight Gates
Qimen Dunjia has eight "Gates" (Mén):
Open Gate (Kāimén), Rest Gate (Xiūmén), Life Gate (Shēngmén), Hurt Gate (Shāngmén), Block Gate (Dùmén), Scene Gate (Jǐngmén), Death Gate (Sǐmén), Shock Gate (Jīngmén).
The Eight Gates are assigned to the Eight Palaces (the Central Palace has no gate, temporarily assigned to the Kun Two Palace or Gen Eight Palace).
Meanings of the Eight Gates:
- Open Gate (Qian Six Palace): Initiation, opening.
- Rest Gate (Kan One Palace): Rest, ease.
- Life Gate (Gen Eight Palace): Growth, generation.
- Hurt Gate (Zhen Three Palace): Harm, damage.
- Block Gate (Xun Four Palace): Blockage, sealing off.
- Scene Gate (Li Nine Palace): Scenery, brightness.
- Death Gate (Kun Two Palace): Extinction, ending.
- Shock Gate (Dui Seven Palace): Fear, shock.
Among the Eight Gates, the Open, Rest, and Life Gates are auspicious; the Hurt, Block, and Scene Gates are neutral (some classify Scene Gate as inauspicious; views vary). The Death and Shock Gates are inauspicious.
Information dimensions of the Eight Gates:
- Auspicious/Inauspicious attribute.
- Five Phase attribute (determined by the Palace it occupies).
- Directional attribute (one of the eight directions).
- Temporal attribute (changes with the rotation of the chart).
- Combinational relationship with other symbols (Stars, Spirits, Curiosities/Instruments).
Why establish "Gates"$21 Gates are the pivots of entry and exit. Chapter 1 of the Laozi states:
"Nameless is the beginning of Heaven and Earth; named is the Mother of the myriad things. Thus, constantly without desire, one contemplates their mystery; constantly with desire, one contemplates their manifestations. These two spring from the same source but differ in name; united they are called darkness. Darkness within darkness, the gateway to all mystery." (Wú míng tiāndì zhī shǐ, yǒumíng wànwù zhī mǔ. Gù cháng wú yù yǐ guān qí miào, cháng yǒu yù yǐ guān qí jiǎo. Cǐ liǎng zhě tóng chū ér yì míng, tóng wèi zhī xuán, xuán zhī yòu xuán, zhòng miào zhī mén.)
"The gateway to all mystery" (zhòng miào zhī mén)—the Gate refers to the crucial point for accessing profound principles. Qimen Dunjia is named after "Gate" precisely because it captures the meaning of "pivot." On the human level, the Eight Gates represent the direction and manner of human action—open when needed, rest when needed, generate when needed, block when needed—this is the information of decision-making.
Section 4: The Origin of the Nine Stars
Qimen Dunjia has nine "Stars" (Xīng):
Heavenly Canopy Star (Tiānpéng), Heavenly Root Star (Tiānrúi), Heavenly Rush Star (Tiānchōng), Heavenly Assistant Star (Tiānfǔ), Heavenly Fowl Star (Tiānqín), Heavenly Heart Star (Tiānxīn), Heavenly Pillar Star (Tiānzhù), Heavenly任 Star (Tiānrèn), Heavenly Hero Star (Tiānyīng).
Each of the Nine Stars resides in one Palace:
- Tianpeng (Kan One Palace)
- Tianrui (Kun Two Palace)
- Tianchong (Zhen Three Palace)
- Tianfu (Xun Four Palace)
- Tianqin (Zhong Five Palace)
- Tianxin (Qian Six Palace)
- Tianzhu (Dui Seven Palace)
- Tianren (Gen Eight Palace)
- Tianying (Li Nine Palace)
The names of the Nine Stars are related to the Nine Stars of the Big Dipper. The Seven Stars of the Big Dipper plus the two hidden stars, Left Assistant and Right Auxiliary, combine to make Nine Stars. The Big Dipper held a supreme position in pre-Qin astronomical beliefs.
The Heguanzi, Circular Flow Chapter states:
"When the handle of the Dipper points East, the world enters Spring. When the handle points South, the world enters Summer. When the handle points West, the world enters Autumn. When the handle points North, the world enters Winter." (Dǒu bǐng dōng zhǐ, tiānxià jiē chūn. Dǒu bǐng nán zhǐ, tiānxià jiē xià. Dǒu bǐng xī zhǐ, tiānxià jiē qiū. Dǒu bǐng běi zhǐ, tiānxià jiē dōng.)
The Big Dipper is the pivot of Heaven. Taking the Nine Stars of the Big Dipper as elements of the "Heaven Plate" (Tiānpán) of Qimen Dunjia captures the meaning that the Big Dipper governs the movement of Heaven.
Information dimensions of the Nine Stars:
- Auspicious/Inauspicious attribute.
- Five Phase attribute.
- Original Palace position.
- Position after rotation.
- Combinational relationship with Gates, Curiosities/Instruments, and Spirits.
Auspiciousness of the Nine Stars: Tianxin, Tianren, Tianqin, Tianfu are auspicious stars; Tianchong is neutral (or slightly auspicious); Tianpeng, Tianrui, Tianzhu, Tianying are inauspicious stars.
Section 5: The Origin of the Eight Spirits
Qimen Dunjia has eight "Spirits" (Shén):
Value Symbol (Zhífù), Coiled Serpent (Téngshé), Great Yin (Tàiyīn), Six Harmony (Liùhé), White Tiger (also called Gou Chen 勾陈), Black Tortoise (also called Zhu Que 朱雀), Nine Earths (Jiǔdì), Nine Heavens (Jiǔtiān).
The origin of the Eight Spirits is closely related to ancient astronomical beliefs and the system of "Auspicious and Inauspicious Markers" (Shénshā) derived from Yin and Yang and the Five Phases.
The Zuo Zhuan, Duke Xi Year 5 records the words of the diviner Yan:
"A child's rhyme says: 'On the day of Bing, the Dragon's Tail sets; the uniform vestments are grand; they seize the banner of Guo. The Partridge is blazing, the Heavenly Commander is powerful; fire forms an army in the middle; the Duke of Guo will flee.'"
Terms like "Dragon's Tail" and "Heavenly Commander" reflect the pre-Qin tradition of using astronomical constellations to predict human affairs. The Eight Spirits of Qimen Dunjia inherit this tradition, transforming the astronomical "Spirits" into the arcane "Spirits."
Information dimensions of the Eight Spirits:
- Auspicious/Inauspicious attribute.
- Yin/Yang attribute.
- Intrinsic characteristics (Zhifu governs nobility, Tengshe governs startling changes, Taiyin governs concealment...).
- Palace occupied.
- Combinational relationship with Gates, Stars, Curiosities/Instruments.
Section 6: The Complete Chart Structure of Qimen Dunjia
A single chart in Qimen Dunjia is formed by the superposition of the following layers:
1. Earth Plate (Dìpán, Fixed) Nine Palaces $\times$ Fixed Curiosities/Instruments (The Earth Plate Curiosities/Instruments are determined by the Bureau number, but once set, they do not move).
2. Heaven Plate (Tiānpán, Rotating) Nine Stars + Heaven Plate Curiosities/Instruments (Rotate with the Star carried by the Value Symbol).
3. Man Plate (Rénpán, Rotating) Eight Gates (Rotate with the Gate carried by the Value Embodiment).
4. Spirit Plate (Shénpán, Rotating) Eight Spirits (Rotate with the Value Symbol).
Thus, in a single Qimen Dunjia chart, each palace simultaneously carries four layers of information:
- Earth Plate Curiosities/Instruments (Bottom layer)
- Heaven Plate Star + Heaven Plate Curiosities/Instruments (Second layer)
- Man Plate Gate (Third layer)
- Spirit Plate Spirit (Fourth layer)
Adding the inherent information of the palace itself (Trigram attribute, Five Phase attribute, etc.), each palace is effectively an "information pillar"—vertically superimposed with multiple encodings.
Nine Palaces $\times$ Four Layers of Information = The total information volume of one chart.
This preliminary structure already reveals the information complexity of Qimen Dunjia far exceeds that of ordinary arcane arts. A detailed mathematical comparison will be made in the following sections.
Section 7: Setting the Bureau Number: Eighteen Bureaus for Yin and Yang Escapes
The number of Bureaus in Qimen Dunjia is $18 + 18 = 36$ Bureaus (some argue for repetition; the number of independent bureaus is fewer).
Yang Bureau (Yáng Dùn): Nine Bureaus (from Winter Solstice onwards, Bureaus One to Nine). Yin Bureau (Yīn Dùn): Nine Bureaus (from Summer Solstice onwards, Bureaus Nine down to One).
The establishment of these 18 Bureaus is closely related to the 24 Solar Terms and the 72 Five-Day Periods (Hòu).
Each Solar Term (15 days) is divided into three Yuan periods (Upper, Middle, Lower Yuan), each Yuan lasting 5 days. $24$ Solar Terms $\times 3$ Yuans $= 72$ divisions, corresponding to the 72 Hòu.
Yang Bureau Nine $\times$ Upper/Middle/Lower Yuan $= 27$ Yuan divisions (though in practice, only a portion of these $3 \times 9 = 27$ five-day segments are used). Yin Bureau Nine $\times$ Upper/Middle/Lower Yuan $= 27$ Yuan divisions.
Totaling 54 Yuan divisions$22 The mathematical relationships here are complex and require careful tracing.
In practice, the method for setting the Qimen chart is: Starting from the Yang Bureau from the Winter Solstice, progressing sequentially according to the Yuan period and Solar Term. Starting from the Yin Bureau (Nine) from the Summer Solstice, progressing sequentially.
A new Yuan begins every five days, and the same Bureau is used within that Yuan—but the chart for every shí chén (double-hour) is different (because the Value Symbol rotates with the shí chén). Thus, the information variation in Qimen Dunjia is reflected not only in the "Bureau" level but also in the "Time" level.
Within one Bureau, the chart for each of the 12 shí chén forming a day is different. In fact, one five-day Yuan (60 shí chén) produces 60 different charts.
The mathematics here is crucial:
There are approximately 72 Yuan divisions in a year (5 days each), with 60 shí chén per Yuan. $72 \times 60 = 4,320$ different shí chén charts.
However, because there are 18 Bureaus (Yang Nine + Yin Nine), and each Bureau has variations depending on the shí chén, the actual number of unique charts needs a more precise calculation.
In the mathematical comparison section later, we will analyze this in detail.
Chapter 4: Traces of Stems and Branches and Dunjia Thought in Pre-Qin Classics
Section 1: Stems and Branches in Oracle Bone Inscriptions
Shang Dynasty oracle bone inscriptions (Jiǎgǔwén) are the earliest material evidence of Stems and Branches dating. Oracle bones contain numerous records of Stems and Branches dating days, such as:
"Gui Mao divination, Ke asks, is there misfortune during the ten-day period$23" (Guǐmǎo bǔ, Ké zhēn, xún wáng huò$24) "Ding You divination, Zheng asks, will it rain tomorrow, Wu Xu$25" (Dīngyǒu bǔ, Zhēng zhēn, yì Wùxū yǔ$26)
Such divinations clearly date days using the Sixty Jiazi system, proving that the Sixty Jiazi system was fully mature by the Shang Dynasty at the latest.
The forms of the Heavenly Stems and Earthly Branches in oracle bones:
Jia (Shield shape), Yi (Bent shape), Bing (Platform shape), Ding (Nail shape), Wu (Spear shape), Ji (Bow shape), Geng (Musical instrument shape), Xin (Torture device shape), Ren (工 shape), Gui (Variant of the spear shape).
Zi (Infant shape), Chou (Finger shape), Yin (Arrow shape), Mao (Door shape), Chen (Conch shape), Si (Snake shape), Wu (Pestle shape), Wei (Branch shape), Shen (Lightning shape), You (Wine vessel shape), Xu (Spear shape), Hai (Kernel shape).
The original meanings of these characters reveal that the Stems and Branches may have held concrete material significance in antiquity—rather than being purely abstract symbols as later understood. This implies that the original information content of the Stems and Branches was richer than later understood.
The concept of "Xun" (Ten-day period) also appears in oracle bones—ten days per xun, corresponding to the Ten Heavenly Stems. Divination inscriptions often asked "Is there misfortune during this xun$27"—this is prediction based on the cycle of the Heavenly Stems—a rudimentary form of Bazi thinking.
Section 2: Time and Space Information Encoding in the Book of Changes
The textual content and commentaries of the Book of Changes (Zhou Yi) contain the joint origin of Bazi and Qimen Dunjia thought.
Firstly, the hexagram sequence in the Book of Changes implies temporal information. The Xugua Zhuan states:
"Only after Heaven and Earth came into existence did the myriad things begin to grow. What fills the space between Heaven and Earth is only the myriad things, thus it is followed by Tun. Tun means proliferation; it is the beginning of the growth of things. Things that begin to grow must be nurtured, thus it is followed by Meng. Meng means covering; it is the immaturity of things. Immature things must be nourished, thus it is followed by Xu. Xu is the way of eating and drinking. Eating and drinking must lead to contention, thus it is followed by Song. Contention must lead to the gathering of a crowd, thus it is followed by Shi. Shi means a multitude. A multitude must have something to align with, thus it is followed by Bi. Bi means alignment. Alignment must involve accumulation, thus it is followed by Xiao Chu. Only after things are accumulated can there be rites, thus it is followed by Lü. ..."
The sequence of these sixty-four hexagrams is essentially a temporal narrative from the "Initial differentiation of Heaven and Earth" to the "Completion of all things"—this is similar to the approach of Bazi, which centers on temporal flow.
Secondly, the Shuogua Zhuan's directional assignments of the Eight Trigrams imply spatial information:
"The Emperor emerges from Zhen (East), flourishes in Xun (Southeast), meets in Li (South), commands service in Kun (Southwest), expresses pleasure in Dui (West), battles in Qian (Northwest), labors in Kan (North), and completes the discourse in Gen (Northeast)."
This is the "Later Heaven Bagua Orientation" (Wen Wang Eight Trigrams sequence)—Zhen East, Xun Southeast, Li South, Kun Southwest, Dui West, Qian Northwest, Kan North, Gen Northeast—which differs from the spatial assignments in the Former Heaven Trigrams.
The existence of two spatial reference systems, Former Heaven and Later Heaven, implies two "reference frames" for spatial encoding—this dual reference system provides the intellectual basis for the "rotating disk" mechanism of Qimen Dunjia. The Earth Plate uses the Later Heaven positions (fixed), while the Heaven Plate and Man Plate rotate upon this fixed framework—analogous to the interaction between Former and Later Heaven.
The Xici Zhuan states:
"The Way of Yi is not fixed. Its Way shifts repeatedly; movement does not cease; it circulates through the six positions; its top and bottom are never constant; hardness and softness interchange; it cannot be made into a fixed canon, only adapting to change." (Yì zhī wéi shū yě, bùkě yuǎn. Wéi dào yě lǚ qiān, biàndòng bù jū, zhōuliú liùxū, shàngxià wú cháng, gāngróu xiāngyì, bùkě wéi diǎnyào, wéi biàn suǒ shì.)
This passage vividly reveals the essential characteristic of the Book of Changes—"Change" (Biàn). Unfixed, unconstant, interchanging, adapting only to change—this is the dynamic nature of information. The "Great Cycles" (Dàyùn) and "Flowing Years" (Liúnián) in Bazi reflect "change," just as the "rotating plates" and "flying layouts" in Qimen Dunjia reflect "change." The richness of this "change" directly determines the size of the information capacity.
Section 3: The Book of Documents, Grand Plan and the Five Phases in Mathematical Logic
The Shangshu: Hongfan (Grand Plan) is a classic document on Five Phase theory. The "Nine Categories" (Jiǔ Chóu) presented by Jizi to King Wu have profound parallels with the structure of the Nine Palaces in Qimen Dunjia.
The Hongfan states:
"First, the Five Phases; second, respectfully using the Five Matters; third, using the Eight Political Tasks for agriculture; fourth, harmonizing with the Five Temporal Records; fifth, establishing the Grand Ultimate (Huángjí); sixth, governing with the Three Virtues; seventh, clarifying with Divination to Resolve Doubt; eighth, considering all responses; ninth, aspiring to the Five Blessings and using the Six Extremes."
The Nine Categories use the "Grand Ultimate" (the Fifth Category) in the center, just as the number Five resides in the center of the Luo Writing. This structure of the "Nine Categories" shares an uncanny similarity with the Nine Palaces of Qimen Dunjia—both use Nine as a framework, with the center as the pivot.
It is particularly noteworthy that the Seventh Category, "Clarifying with Divination to Resolve Doubt" (Qímì Jié Yí):
"Select and establish diviners, then order the tortoise and yarrow for divination. They say: Rain, Clear weather, Obscurity, Delay, Success, Affirmation, Regret—seven in all. Five are from tortoise divination, two are used from yarrow, for extension and reversal. Establish people to perform divination; three persons interpret, then follow the words of two."
This details the methods of divination—tortoise divination has five signs (Rain, Clear weather, Obscurity, Delay, Success), and yarrow divination yields two results (Affirmation, Regret), plus "extension and reversal" (extension of variation). This is a description of the information system of pre-Qin divination.
"Three persons interpret, then follow the words of two"—this is the principle of "majority rule," a classical expression of information redundancy coding and error correction mechanisms. Why require three diviners$1 Because the judgment of a single person might contain error ("noise"); following the majority of three reduces the probability of misjudgment—this is completely consistent with modern principles of error-correcting codes in information theory.
Section 4: Examples of Divination in the Zuo Zhuan and Guoyu
Pre-Qin classics preserve numerous examples of divination, which provide valuable material for understanding the information processing methods of the pre-Qin era.
Example 1: Divination of Marquis Li of Chen in the 22nd Year of Duke Zhuang (Zuo Zhuan)
"The Marquis of Chen sent someone to divine. They obtained Guan (Observing) transforming into Pi (Obstruction). The diviner said: 'This is called "Observing the light of a state, which is beneficial for being a guest to the King." Will he replace Chen in ruling$2 No, it will be in another state. If not in his own person, it will be in his descendants. The light is far away and shines from elsewhere. Kun is Earth. Xun is Wind. Qian is Heaven. Wind acts as Heaven over Earth, which is Mountain. If one has the material of a mountain illuminated by heavenly light, he then resides on the earth, thus it is said, "Observing the light of a state, beneficial for being a guest to the King." The courtyard is filled with a hundred sacrifices, presented with jade and silk, the beauty of Heaven and Earth is complete, thus it is said, "Beneficial for being a guest to the King." There is still observation, thus it is said, perhaps in the future. Wind moves and leaves its mark on the earth, thus it is said, perhaps in another state. If in another state, it must be of the Jiang surname. Jiang is descended from the Great Yue. Mountains and peaks are matched with Heaven; nothing can be truly great twice. When Chen declines, will this be its prosperity$3'"
This record is extremely precious. The divination obtained Hexagram Guan transforming into Pi—the original hexagram is Guan (Wind over Earth), the transforming hexagram is Pi (Heaven over Earth), meaning the fourth line changed from Yin to Yang.
The diviner's interpretation process:
- Based on the line text, "Observing the light of a state, beneficial for being a guest to the King."
- Then analyzing the hexagram images: Kun for Earth, Xun for Wind, Qian for Heaven.
- Further inferring: Wind acting as Heaven over Earth suggests the image of a Mountain $\rightarrow$ the image of a State.
- Then relating to "the light is far away and shines from elsewhere" $\rightarrow$ in another state.
- Then deducing the Jiang surname based on the Five Phases and directions.
In this divination process, the extraction of information is multi-layered and multi-dimensional—it involves textual information from the line texts, symbolic information from the hexagram images, and inferential information from the Five Phases and directions. This is the pre-Qin mode of information processing in divination—far more complex than later imagined.
Example 2: The Battle of Qin and Jin at Han (Zuo Zhuan, Duke Xi Year 15)
"Initially, Duke Xian of Jin divined about marrying Bo Ji to Qin; he obtained Gui Mei (Slight Mismatch) transforming into Kui (Strife). Shi Su interpreted it: 'Inauspicious. The changing line says: 'The official cuts the sheep, yet there is no remnant. The woman carries the basket, yet there is no abundance. The western neighbor blames and speaks, which cannot be repaid.' Gui Mei transforming into Kui, still lacking mutual support.' ..." "...When Duke Hui was in Qin, he said: 'If the former lord had followed Shi Su's divination, I would not have suffered this fate.'"
In this record, Shi Su's divination was not followed, and later the negative outcome was realized. This shows that the divination information in pre-Qin times possessed predictive power—but this predictability depended on the diviner's correct interpretation of the information.
Example 3: The Discussion of Musical Pitch by Ling Zhoujiu (Guoyu, Zhou Yu)
"Ling Zhoujiu said: 'Governance is like music; music follows harmony; harmony follows equilibrium. Sounds are used to create music, pitch (lǜ) is used to ensure equilibrium. Metal and stone are used to move it; silk and bamboo are used to carry it. Poetry is used to convey it; singing is used to chant it; the gourd is used to express it; ceramics are used to supplement it; leather and wood are used to regulate it. When things attain their norm, it is called the ultimate of music (yuè jí); where the ultimate gathers is called sound (shēng); sound responding to each other in protection is called harmony (hé); small and large not exceeding bounds is called equilibrium (píng).'"
Although this passage does not directly discuss arcane arts, it reveals the pre-Qin concept of "Pitch and Calendar Unity"—musical pitch is connected to the calendar. This idea is crucial for the mathematical foundation of Qimen Dunjia.
The Twelve Musical Pitches (Lǜ) correspond to the Twelve Earthly Branches:
- Huang Zhong $\leftrightarrow$ Zi
- Da Lü $\leftrightarrow$ Chou
- Tai Cu $\leftrightarrow$ Yin
- Jia Zhong $\leftrightarrow$ Mao
- Gu Xi $\leftrightarrow$ Chen
- Zhong Lü $\leftrightarrow$ Si
- Rui Bin $\leftrightarrow$ Wu
- Lin Zhong $\leftrightarrow$ Wei
- Yi Ze $\leftrightarrow$ Shen
- Nan Lü $\leftrightarrow$ You
- Wu She $\leftrightarrow$ Xu
- Ying Zhong $\leftrightarrow$ Hai
This correspondence means that the Earthly Branches not only carry temporal and spatial information but also auditory (frequency) information—this greatly expands the information dimensions of the Stems and Branches system.
Section 5: The Five Phases and Chronology in Guanzi
While the compilation date of the Guanzi is debated, many chapters reflect pre-Qin Five Phase thought and arcane concepts.
The Guanzi, Five Phases Chapter states:
"At the Summer Solstice, one observes Jia Zi, and the Wood Phase governs... Seventy-two days complete this. Observe Bing Zi, and the Fire Phase governs... Seventy-two days complete this. Observe Wu Zi, and the Earth Phase governs... Seventy-two days complete this. Observe Geng Zi, and the Metal Phase governs... Seventy-two days complete this. Observe Ren Zi, and the Water Phase governs... Seventy-two days complete this."
This passage divides the 360 days of the year into five segments (72 days each), governed by one Phase in each, marked by the starting Stems and Branches—this is a method combining timekeeping by Stems and Branches with the assignment of the Five Phases to time—a precursor to the concept of Five Phases governing the Month Command in Bazi.
Furthermore, the Guanzi, Four Seasons Chapter states:
"Therefore, Yin and Yang are the great principles of Heaven and Earth. The Four Seasons are the great framework of Yin and Yang. Punishment and Virtue (Xíng Dé) are the conjunction of the Four Seasons. When Punishment and Virtue align with the seasons, blessings arise; when they deviate, misfortune arises." (Shì gù yīnyáng zhě, tiāndì zhī dàlǐ yě. Sìshí zhě, yīnyáng zhī dàjīng yě. Xíngdé zhě, sìshí zhī hé yě. Xíngdé hé yú shí zé shēng fú, guǐ zé shēng huò.)
The chain of inference "Yin/Yang $\rightarrow$ Four Seasons $\rightarrow$ Punishment and Virtue" clearly shows the path of pre-Qin arcane arts: starting from the most fundamental Yin/Yang duality, moving through the framework of the Four Seasons, to arrive at judgments of human fortune and misfortune. This logic is entirely inherited by Bazi and Qimen Dunjia.
The Guanzi, Minor Officials Chapter offers a more detailed description of seasonal arcane calculations:
"Spring acts with the politics of Winter—austere; acts with the politics of Autumn—thunder; acts with the politics of Summer—castration i.e., severe restriction. After twelve days, the Earth Qi erupts, cautioning Spring affairs. After twelve days, the minor Mao early spring, plowing begins. After twelve days, Heavenly Qi descends, giving rewards. After twelve days, Righteous Qi arrives, repairing gates and doors. After twelve days, Purity and Brightness, prohibitions are lifted. After twelve days, the main Mao late spring, mating begins."
This subdivides the affairs of Spring into periods of "twelve days," with a change every twelve days—similar to the Qimen Dunjia concept of a "Yuan" (five days per Yuan), involving fine temporal segmentation.
Section 6: The Lunar Months in Lüshi Chunqiu and the System of Mathematical Principles
The Twelve Records (Shí'èr Jì) in the Lüshi Chunqiu represent the culmination of pre-Qin lunar month theory.
The Record of Early Spring states:
"In the month of Early Spring, the Sun is in the Camp House (Yíngshì), at dusk it is in the Heart (Shēn), at dawn it is in the Tail (Wěi). Its Stems are Jia and Yi; its Emperor is Taihao; its Spirit is Gou Mang; its creatures are scaled; its tone is Jue; its pitch is Tai Cu; its number is Eight; its taste is sour; its odor is rank; its sacrifice is the Door; sacrifice to the Spleen first. The East Wind thaws the frost, hibernating insects begin to stir, fish rise under the ice, the otter offers fish to the heron, the migrating geese fly north."
This passage contains extremely rich information: the attributes of just one month include:
- Celestial observation (Sun in Yingshi, dusk in Shen, dawn in Wei).
- Heavenly Stems (Jia and Yi—Wood).
- Heavenly Emperor (Taihao—Emperor of the East).
- Heavenly Spirit (Gou Mang—Spirit of Wood).
- Animal category (Scaled creatures).
- Musical Tone (Jue tone).
- Pitch Name (Tai Cu).
- Number (Eight).
- Taste (Sour).
- Odor (Rank).
- Sacrifice (Sacrifice to the Door, sacrifice to the Spleen first).
- Phenology (East wind thawing, etc., five observations).
One month has twelve or more dimensions of information! The Twelve Records detail the attributes for all twelve months, forming an extremely vast "Annual Information Matrix."
This "Lunar Month" system is precisely the shared knowledge basis for the Month Pillar information in Bazi and the Solar Term initiation of Qimen Dunjia charts.
Especially noteworthy is "Its Number" (qí shù)—the number for Early Spring is Eight, for Mid-Spring is Eight, for Late Spring is Eight (Number of Wood); for Early Summer is Seven, Mid-Summer is Seven, Late Summer is Seven (Number of Fire)... This numerical system corresponds to both the generating numbers of the River Chart and the positional numbers of the Luo Writing.
Section 7: "Number" and "Juncture" in the Zhuangzi
Although the Zhuangzi is famous for Daoist philosophy, it contains profound reflections on "Number" (shù) and "Juncture" (jī).
The Zhuangzi, Transcending Things Chapter (Tianxia) states:
"Hui Shi had many methods, his writings filled five carts. His Dao was discordant, his words did not hit the mark. His intent in charting things was: 'The greatest without outside is called Great One (Dàyī). The smallest without inside is called Small One (Xiǎoyī). Without thickness, it cannot be accumulated, yet it can span a thousand li. Heaven and Earth are low, mountains and marshes are level. The sun at its zenith is already declining; things in the process of being born are already in the process of dying. Great Equality differs from Small Equality; this is called Small Difference. All things are equally the same and equally different; this is called Great Difference.' ..."
Hui Shi's "Ten Points of Charting Things" involve concepts of limits, infinity, and relativity—numerical philosophy. If information capacity can tend toward "the greatest without outside," then the information capacity of any arcane system has the potential for infinite expansion—the problem is how much can be utilized in actual practice.
The Zhuangzi, Discussion on Making Things Equal (Qíwù Lùn) states:
"Heaven and Earth were born together with me, and the myriad things are one with me. If they are already one, can words still exist$4 If one has already spoken of 'One,' can one refrain from speaking$5 One and words become two; two and one become three. From here onward, the skilled calculator cannot arrive, let alone the ordinary person! Thus, from nothing adapting to something, one reaches three, how much more so from something adapting to something$6 There is no adaptation, thus one rests here." (Tiāndì yǔ wǒ bìngshēng, ér wànwù yǔ wǒ wéi yī. Jì yǐ wéi yī yǐ, qiě dé yǒu yán hū$7 Jì yǐ wéi yī yǐ, qiě dé wú yán hū$8 Yī yǔ yán wéi èr, èr yǔ yī wéi sān. Zì cǐ yǐ wǎng, qiǎolì bùnéng dé, ér kuàng qí fán hū$9 Gù zì wú shì yǒu, yǐ zhì yú sān, ér kuàng zì yǒu shì yǒu hū$10 Wú shì, yīn shì yǐ.)
"One and words become two; two and one become three"—this is the classical expression of the self-referential paradox. "From here onward, the skilled calculator (qiǎolì) cannot arrive"—Qiǎolì, meaning those skilled in chronology and mathematics, cannot exhaust this recursive count, let alone the ordinary person. This reveals a deep information theory proposition: The self-referential nature of information leads to an infinite increase in information capacity.
When we discuss the information capacity of Bazi or Qimen Dunjia, are we not facing a similar dilemma$11 The interpretation of a Bazi chart can generate new information, and that new information can be further interpreted... This recursive process is theoretically endless. Furthermore, the multi-layered superposition of Qimen Dunjia, where each layer interacts with others to generate new information—is its depth of recursion greater than that of Bazi$12 This is a question requiring deeper exploration later.
The Zhuangzi, Heaven and Earth Chapter also states:
"In the primal beginning there was nothingness, and nothingness was without name. The stirring of the One brought forth form, but it was not yet shaped. Things obtained their generation, called Virtue (Dé). That which was unshaped had divisions, yet still without separation; this is called Fate (Mìng). When stillness moves and things are born, things achieve their inherent principle, called Form (Xíng). Form preserves Spirit, and each has its standard (yí zé); this is called Nature (Xìng)."
The appearance of the word "Fate" (Mìng) is crucial—"That which was unshaped had divisions, yet still without separation, this is called Fate." Even before things take shape, they already possess inherent differentiation—this is the original meaning of "Fate." What Bazi seeks to divine is precisely this "Fate"—the innate pattern predetermined at birth.
And "each has its standard (yí zé)"—the "standard" or "rule" (yí zé)—this is the "principle" (lǐ) upon which arcane arts rely. The multi-layered structure of Qimen Dunjia is intended to capture the multi-dimensional expression of these "standards."
Section 8: Pre-Qin Military Treatises and Dunjia Thought
The tradition of Qimen Dunjia has always been closely linked to military strategy. Pre-Qin military texts contain rich elements of Dunjia thought.
The Art of War, Laying Plans Chapter (Shǐjì) states:
"Sunzi said: Warfare is a matter of supreme importance to the State; the way of life or death; the road to survival or ruin; it is mandatory that it be studied. Hence the five fundamental factors must be compared when making plans: First, the Way (Dào); second, Heaven (Tiān); third, Earth (Dì); fourth, the Commander (Jiāng); and fifth, Method (Fă)." (Sūnzǐ yuē: Bīng zhě, guó zhī dàshì, shēngsǐ zhī dì, cúnwáng zhī dào, bùkě bù chá yě. Gù jīng zhī yǐ wǔ shì, jiào zhī yǐ jì ér suǒ qí qíng: yī yuē dào, èr yuē tiān, sān yuē dì, sì yuē jiāng, wǔ yuē fǎ.)
This framework of the "Five Factors"—Dao, Heaven, Earth, Commander, Method—corresponds to the multi-layered structure of Qimen Dunjia:
- "Heaven" corresponds to the Heaven Plate (Nine Stars + Heaven Plate Curiosities/Instruments).
- "Earth" corresponds to the Earth Plate (Nine Palaces + Earth Plate Curiosities/Instruments).
- "Commander" corresponds to the Man Plate (Eight Gates).
- "Dao" and "Method" correspond to the overall rules of application.
Sunzi also says:
"Heaven refers to Yin and Yang, cold and heat, and the constraints of the seasons. Earth refers to distance and proximity, hazard and ease, breadth and narrowness, life and death." (Tiān zhě, yīnyáng, hánshǔ, shí zhì yě. Dì zhě, yuǎnjìn, xiǎnyì, guǎngxiǎo, shēngsǐ yě.)
The information of "Heaven" includes Yin/Yang, cold/heat, and temporal constraints—this is the information in the temporal dimension; the information of "Earth" includes distance/proximity, hazard/ease, breadth/narrowness, life/death—this is the information in the spatial dimension. Qimen Dunjia takes the Heaven Plate as primarily temporal and the Earth Plate as primarily spatial, which coincides exactly with Sunzi's classification of "Heaven" and "Earth."
And the words "life and death" (shēngsǐ) are crucial—Qimen Dunjia has the "Life Gate" and the "Death Gate," and the terminology used directly stems from the military tradition.
The Art of War, Maneuvering for Position Chapter states:
"Attack where the enemy is unprepared to defend; advance where they do not expect. To march a thousand li without exhaustion, march where there are no men. To attack and be certain of success, attack where they do not defend. To defend and be certain of security, defend where they do not attack. Thus, the skillful attacker conceals his point of defense from the enemy; the skillful defender conceals his point of attack from the enemy. Subtlety, subtlety, to the point of invisibility (wú xíng); mystery, mystery, to the point of inaudibility (wú shēng), thus one can become the disposer of the enemy's fate."
"Subtlety, subtlety, to the point of invisibility (wú xíng)"—this is the meaning of "Dùn" (Escape/Concealment). Jia hides beneath the Six Instruments, not revealing its form, making it impossible for the enemy to grasp—this is perfectly consistent with the concept of "concealment of form" in military strategy. And "mystery, mystery, to the point of inaudibility (wú shēng)"—this is the concealment and encryption of information. "Dùn" in Qimen Dunjia, from an information science perspective, is an information encryption mechanism—the superficially presented information (the Heavenly Stems shown by the Six Instruments) differs from the deeply hidden information (the identity of the Six Jia)—decoding the deep information requires "decryption" (knowing which Jia hides under which Instrument).
This information encryption mechanism makes the information hierarchy of Qimen Dunjia richer—it has not only "explicit information" (what is superficially visible) but also "implicit information" (what is hidden beneath the surface). Bazi is relatively "transparent"—the Stems and Branches are directly presented, although there is the concept of Hidden Stems, it is not as clearly layered as the "hiding" of Dunjia.
The Nine Grounds Chapter of Sunzi states:
"Dispersive ground, light ground, contention ground, intersecting ground, open ground, heavy ground, obstructing ground, encircled ground, death ground."
These nine types of terrain can also be mapped analogously to the Nine Palaces of Qimen Dunjia—different palaces present different "terrain" characteristics in different Bureaus, with pros, cons, life, and death.
The Six Strategies (attributed to Lü Wang, though its dating is debated, its military thought inherits pre-Qin tradition) also contains extensive application of celestial timing and terrestrial advantage:
"King Wu asked Grand Tutor: 'Leading troops deep into the territory of the feudal lords, facing the enemy army head-on. The two formations face each other, the strength of the multitudes is equal. I do not dare move first. I wish to make the enemy general fearful, and the soldiers confused, so that if they wish to fight they dare not, if they wish to defend they cannot, their fronts and rears separated, their left and right lost—is this possible$13' Grand Tutor replied: 'It is possible.'"
Although this passage does not explicitly mention Dunjia, the military effect described—"making the enemy general fearful and the soldiers confused"—is the ideal application scenario for Qimen Dunjia in military affairs.
Section 9: The Legend of the Yellow Emperor vs. Chiyou and the Origin of Dunjia
The most famous legend concerning the origin of Qimen Dunjia is the story of the Yellow Emperor fighting Chiyou.
The Records of the Five Emperors in the Records of the Grand Historian (Shiji) records:
"During the time of Xuanyuan (Yellow Emperor), the era of Shennong declined. Feudal lords attacked each other, oppressing the common people, and Shennong could not subdue them. Thus, Xuanyuan practiced the use of weapons and mobilized troops to conquer those who did not submit, and all the feudal lords came to assist him. Chiyou was the most violent, and no one could defeat him. The Flame Emperor wished to invade the feudal lords, and all the lords defected to Xuanyuan. Xuanyuan then cultivated virtue and mobilized troops, managed the Five Qi, cultivated the Five Grains, comforted the people, measured the Four Directions, taught the Bear, Grizzly, Panther, Leopard, Tiger, to fight the Flame Emperor at the field of Banquan. After three battles he achieved his aim. Chiyou rebelled and ignored the Emperor's commands. Thus, the Yellow Emperor mustered the feudal lords and fought Chiyou at the field of Zhuolu, finally capturing and killing Chiyou."
While Dunjia is not mentioned here, "cultivated virtue and mobilized troops, managed the Five Qi (wǔ qì), cultivated the Five Grains, comforted the people, measured the Four Directions (dù sì fāng)"—"managing the Qi of the Five Phases" and "measuring the Four Directions" (spatial orientation)—already contain the basic elements of Dunjia.
Legend has it that the Yellow Emperor was trapped by Chiyou's great fog, and the Heavenly Emperor sent the Nine Heavens Mysterious Lady to teach him the Dragon Jia Divine Chapter (also called the Dunjia Heavenly Book). Based on this, the Yellow Emperor invented the South-Pointing Chariot to break the fog and ultimately defeated Chiyou. Although this legend is mythological, it reflects an important concept: the art of Dunjia is closely related to "breaking confusion" (making correct decisions under conditions of incomplete information)—this is the classical expression of "signal processing."
Chiyou's "great fog" is, from an information theory perspective, "information interference" or "obscured vision"—i.e., a noisy environment. The function of the Dunjia art is to extract useful information in a noisy environment and make correct judgments—this is the classical expression of "signal processing."
The Yellow Emperor's legend also includes the achievement of "regulating the calendar and clarifying time":
"Obtained the treasure tripod, pushed the stalks according to the sun's arrival." (Huò bǎodǐng, yíngrì tuī cè.) (Shiji: Wǔdì Běnjì)
"Pushing the stalks according to the sun's arrival" means establishing the calendar. The calendar is the encoding system for temporal information. The dual roles of the Yellow Emperor in "regulating the calendar" and "employing troops" correspond precisely to the division between Bazi (application of the calendar) and Qimen Dunjia (application of military strategy)—both arts originate from the creations of the ancient Sage-Kings.