Mathematical Algorithms of the Earthly Branches
Among the relationships between Earthly Branches, besides generation and overcoming there are also punishment, clash, harm, and combination. Clash is taken by counting six apart; harm removes the branch that would combine with the clashing one—for example Zi harms Wei because Zi clashes Wu and thus prevents Wei from combining. The Six Combinations of the Earthly Branches are most important. The Six Combinations: Zi and Chou combine into Earth (gui), Yin and Hai combine into Wood, Mao and Xu combine into Fire, Chen and You combine into Metal, Si and Shen combine into Water, Wu and Wei combine into Earth. These are simply obtained by starting from Zi and going forward, from Chou and going backward—alternating one forward and one backward, jumping to obtain the pairs. Thus Zi-Chou and Yin-Hai are always one odd and one even, combining by position. Empty void of the Earthly Branches: there is Zi-Chou empty, Yin-Mao empty, and Chen-Si empty—emptied by position. For example Zi-Chou in the Jia-Yin decade, though combining, are both empty; Yin-Hai and Mao-Xu in the Jia-Chen decade are all half empty. For calculating decade-void, take the decade's branches and subtract using the number twelve. The method for finding combinations: separate odd and even, and compute by addition and subtraction. Starting from Wu-Wei: Wu is six, Wei is seven, Si is five, Shen is eight, Chen is four, You is nine—in total thirteen. If Zi is not taken as zero but as one, the sum is fourteen, one short of fifteen—one is left unused in the minor derivation. Only the mutual punishments have no simple computational method.
So a function is modeled to approximate them.