5D Library › Multimodal Calendrical Tensor Fusion, Modulo-90 Harmonic Dials and Cross-System Resonance Diagnostics · 中文

Chapter 1. Bone Weight: a Sum of Four Lookup Tables

What kind of algorithm bone weight is

The folk method of “bone weight” (chen gu) looks up the year, month, day and hour of birth in four tables, giving four weights in liang and qian, adds them into a total, and then looks up a verse for that total. The four tables give one weight to each of the sixty sexagenary years, the twelve lunar months, the thirty lunar days and the twelve double-hours. The tables in the program are the commonly circulated ones (the year table ordered by the sexagenary cycle, starting with jia-zi, 1984 for example).

Mathematically this is a separable sum of lookups: total = year + month + day + hour, the four terms not affecting each other. Treating year, month, day and hour of birth as uniform, the distribution of the total is the convolution of the four tables’ distributions.

The reachable totals

Calculation

# Chapter 1. [p01] Bone weight (chen gu) as a sum of four lookup tables.
# Weights in qian (10 qian = 1 liang). Year by sexagenary index
# (0 = jia-zi, e.g. 1984), lunar month 1..12, lunar day 1..30,
# double-hour zi..hai. Tables as commonly circulated. The total is a
# sum of four independent lookups; under uniform year, month, day and
# hour we count the reachable totals, their distribution, and the
# totals named in the verse list (2.1 .. 7.2 liang) that no birth hits.
import math
from collections import Counter

YEAR = (12, 9, 6, 7, 12, 5, 9, 8, 7, 8, 15, 9, 16, 8, 8, 19, 12, 6,
        8, 7, 5, 15, 6, 16, 15, 7, 9, 12, 10, 7, 15, 6, 5, 14, 14, 9,
        7, 7, 9, 12, 8, 7, 13, 5, 14, 5, 9, 17, 5, 7, 12, 8, 8, 6,
        19, 6, 8, 16, 10, 7)
MONTH = (6, 7, 18, 9, 5, 16, 9, 15, 18, 8, 9, 5)
DAY = (5, 10, 8, 15, 16, 15, 8, 16, 8, 16, 9, 17, 8, 17, 10, 8, 9,
       18, 5, 15, 10, 9, 8, 9, 15, 18, 7, 8, 16, 6)
HOUR = (16, 6, 7, 10, 9, 16, 10, 8, 8, 9, 6, 6)

def totals():
    c = Counter()
    for y in YEAR:
        for m in MONTH:
            for d in DAY:
                for h in HOUR:
                    c[y + m + d + h] += 1
    return c

if __name__ == "__main__":
    c = totals()
    n = sum(c.values())
    lo, hi = min(c), max(c)
    print("   births (year x month x day x hour): {:,d}".format(n))
    print("   reachable totals: {} values, {:.1f} to {:.1f} liang".format(
        len(c), lo / 10, hi / 10))
    mode = max(c, key=c.get)
    print("   most common total {:.1f} liang, share {:.4f}".format(
        mode / 10, c[mode] / n))
    h = -sum(v / n * math.log2(v / n) for v in c.values())
    print("   entropy {:.3f} bits (of log2 {} = {:.3f} if all equal)"
          .format(h, len(c), math.log2(len(c))))
    verse = range(21, 73)
    missing = [t for t in verse if t not in c]
    print("   verse totals never reached: " + ", ".join(
        "{:.1f}".format(t / 10) for t in missing))
    print("   heaviest entries: year {:.1f}, month {:.1f}, day {:.1f},"
          " hour {:.1f} liang".format(max(YEAR) / 10, max(MONTH) / 10,
                                      max(DAY) / 10, max(HOUR) / 10))
    edge = sum(v for t, v in c.items() if t <= 25 or t >= 65) / n
    print("   share of births at 2.5 liang or less, or 6.5 or more: {:.4f}"
          .format(edge))
    print("\nReading: the 60 x 12 x 30 x 12 births fall on only 51 totals,")
    print("bunched in the middle; the extremes the verses dwell on are")
    print("rare, and the last verse cannot be reached with these tables.")
#    births (year x month x day x hour): 259,200
#    reachable totals: 51 values, 2.1 to 7.1 liang
#    most common total 3.9 liang, share 0.0537
#    entropy 5.030 bits (of log2 51 = 5.672 if all equal)
#    verse totals never reached: 7.2
#    heaviest entries: year 1.9, month 1.8, day 1.8, hour 1.6 liang
#    share of births at 2.5 liang or less, or 6.5 or more: 0.0146
#
# Reading: the 60 x 12 x 30 x 12 births fall on only 51 totals,
# bunched in the middle; the extremes the verses dwell on are
# rare, and the last verse cannot be reached with these tables.
Distribution of total bone weight (the dashed line marks the verse “seven liang two qian”).

The 60 × 12 × 30 × 12 = 259,200 births fall on only 51 totals, from 2.1 to 7.1 liang; the most common is 3.9 liang, with 0.0537 of births. The entropy of the distribution is 5.030 bits, below the 5.672 bits of 51 equally likely totals: the totals bunch in the middle. Births at 2.5 liang or less, or at 6.5 or more, make up only 0.0146.

It is commonly said that bone weight runs from two liang one qian to seven liang two qian. But with these four tables the heaviest year weighs 1.9 liang, the heaviest month and day 1.8 each, the heaviest hour 1.6, at most 7.1 in all: no birth can reach “seven liang two qian”. For it to be reachable, at least one table must differ from the common ones.

What sets the total, and what one double-hour does

Calculation

# Chapter 1. [p02] Which component carries the bone weight, and how
# fragile is it at the edge of a double-hour? The four lookups are
# independent under uniform births, so the variance of the total is the
# sum of the four table variances. Then: a birth time uncertain by one
# double-hour (the neighbouring hour, either side, equally likely):
# the share of births whose total changes, and the mean size of the
# change. Tables of p01, in qian.
YEAR = (12, 9, 6, 7, 12, 5, 9, 8, 7, 8, 15, 9, 16, 8, 8, 19, 12, 6,
        8, 7, 5, 15, 6, 16, 15, 7, 9, 12, 10, 7, 15, 6, 5, 14, 14, 9,
        7, 7, 9, 12, 8, 7, 13, 5, 14, 5, 9, 17, 5, 7, 12, 8, 8, 6,
        19, 6, 8, 16, 10, 7)
MONTH = (6, 7, 18, 9, 5, 16, 9, 15, 18, 8, 9, 5)
DAY = (5, 10, 8, 15, 16, 15, 8, 16, 8, 16, 9, 17, 8, 17, 10, 8, 9,
       18, 5, 15, 10, 9, 8, 9, 15, 18, 7, 8, 16, 6)
HOUR = (16, 6, 7, 10, 9, 16, 10, 8, 8, 9, 6, 6)

def var(t):
    m = sum(t) / len(t)
    return sum((x - m) ** 2 for x in t) / len(t)

if __name__ == "__main__":
    parts = (("year", YEAR), ("month", MONTH), ("day", DAY),
             ("hour", HOUR))
    tot = sum(var(t) for _, t in parts)
    print("   component  mean (qian)  variance  share of total variance")
    for name, t in parts:
        print("   {:9s} {:12.3f} {:9.3f} {:23.3f}".format(
            name, sum(t) / len(t), var(t), var(t) / tot))
    print("   total variance {:.3f}, sd {:.3f} qian".format(tot, tot ** 0.5))
    pairs = [(HOUR[h], HOUR[(h + s) % 12]) for h in range(12)
             for s in (-1, 1)]
    changed = sum(a != b for a, b in pairs) / len(pairs)
    size = sum(abs(a - b) for a, b in pairs) / len(pairs)
    print("   one double-hour off: total changes for {:.4f} of births,"
          .format(changed))
    print("   by {:.3f} qian on average".format(size))
    print("\nReading: the month carries the largest share, then the day; the")
    print("hour carries less, yet a birth time off by one double-hour")
    print("changes the total for most births.")
#    component  mean (qian)  variance  share of total variance
#    year             9.683    14.550                   0.222
#    month           10.417    22.410                   0.342
#    day             11.300    17.543                   0.268
#    hour             9.250    11.021                   0.168
#    total variance 65.524, sd 8.095 qian
#    one double-hour off: total changes for 0.8333 of births,
#    by 3.667 qian on average
#
# Reading: the month carries the largest share, then the day; the
# hour carries less, yet a birth time off by one double-hour
# changes the total for most births.

The four terms are independent, so the variance of the total is the sum of the four tables’ variances, 65.524 (in qian squared). The month contributes most (0.342), then the day (0.268) and the year (0.222), the hour least (0.168). Yet the hour is the easiest to get wrong: if the birth time is off by one double-hour (either way, equally likely), the total changes for 0.8333 of births, by 3.667 qian on average. Of the twelve double-hours only two neighbouring pairs weigh the same: wei and shen (8 qian each) and xu and hai (6 qian each).

Hypothesis · not established

The author’s interpretation (not yet tested): bone weight carries about 5 bits of “information”, far less than the combinations of the four pillars; as part of a report it gives a coarse banding that bunches in the middle, not personal detail. What would show this wrong: if another bone-weight table, widely used and of traceable origin, gives totals with an entropy well above 5 bits (through more table entries, for example), this chapter’s conclusions apply to the common tables only.

Summary

Bone weight is a separable sum of four lookups: 259,200 births fall on 51 totals bunched in the middle, and “seven liang two qian” cannot be reached with the common tables. The variance of the total comes mainly from the month and the day, while an hour off by one changes the total for most births.

Fan, Y. (2026). Multimodal Calendrical Tensor Fusion, Modulo-90 Harmonic Dials and Cross-System Resonance Diagnostics: Climate-Balance Vectors, Flying-Transformation Matrices and Solar-Arc Midpoint Trees [多模态历法张量融合、模九十谐波拨盘与跨系统共振诊断] (Version 1.0.0). 5D Library. https://doi.org/10.5281/zenodo.24090189 · Licensed under Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International (CC BY-NC-ND 4.0).