What does Calendrical Tensors and Harmonic Dials conclude, in numbers, about “Flying Four Transformations: a Directed Graph and Three-Layer Stacked Ji”?

Answer: Chapter 3 builds all 43,200 Zi Wei charts: single edges of flying ji are close to random (1.0078 self-ji palaces per chart), but the twelve ji edges reach only 7.458 palaces on average; double stacked ji appears in 0.4137 of charts, and a lunar day off by one changes the stacked palaces in 0.4735.

Scope of the numbers: Marked boxes separate evidence, 16 runnable Python programs, classical sources and hypotheses.

中文版

Data table

The numbers below are printed verbatim by the chapter's Python program and can be reproduced by running it. printed values that match the answer: 1.0078, 43200, 7.458

   charts: 43,200
   self-ji palaces per chart 1.0078; charts with one or more 0.7223
   birth-year ji in the ming palace: 0.0867 (1/12 = 0.0833)
   ming palace's ji by role: min 0.0822, max 0.0850
   distinct palaces hit by the 12 ji edges: 7.458
   (a random map of 12 palaces would hit 7.776)
Reading: one by one, the edges look random: about one self-ji
per chart and every role about equally likely. Together they
are not: zi and chou repeat the stems of yin and mao, so their
ji always fly together and the twelve edges reach fewer palaces.
Show the full program
# Chapter 3. [p05] Zi Wei charts and the directed graph of flying ji.
# Branches zi = 0 .. hai = 11. Ming palace: (2 + month - 1 - hour) mod 12.
# Palace stems by the "five tigers" rule from the year stem. Bureau from
# the nayin element of the ming palace (shui 2, mu 3, jin 4, tu 5,
# huo 6). Ziwei from lunar day and bureau; the other 13 main stars by
# fixed offsets; wenchang, wenqu by hour, zuofu, youbi by month. Each
# palace's stem turns one star into ji; an edge runs from the palace to
# where that star sits (a self-loop is "self ji"). All 10 x 12 x 30 x 12
# = 43,200 combinations of year stem, month, day and hour.
NAYIN = ("jin", "huo", "mu", "tu", "jin", "huo", "shui", "tu", "jin",
         "mu", "shui", "tu", "huo", "mu", "shui", "jin", "huo", "mu", "tu",
         "jin", "huo", "shui", "tu", "jin", "mu", "shui", "tu", "huo", "mu",
         "shui")
BUREAU = {"shui": 2, "mu": 3, "jin": 4, "tu": 5, "huo": 6}
# lu, quan, ke, ji for stems jia .. gui
SIHUA = (("lianzhen", "pojun", "wuqu", "taiyang"),
         ("tianji", "tianliang", "ziwei", "taiyin"),
         ("tiantong", "tianji", "wenchang", "lianzhen"),
         ("taiyin", "tiantong", "tianji", "jumen"),
         ("tanlang", "taiyin", "youbi", "tianji"),
         ("wuqu", "tanlang", "tianliang", "wenqu"),
         ("taiyang", "wuqu", "taiyin", "tiantong"),
         ("jumen", "taiyang", "wenqu", "wenchang"),
         ("tianliang", "ziwei", "zuofu", "wuqu"),
         ("pojun", "jumen", "taiyin", "tanlang"))

def palace_stem(ys, b):
    return (2 * (ys % 5) + 2 + (b - 2) % 12) % 10

def sexagenary(s, b):
    return next(i for i in range(60) if i % 10 == s and i % 12 == b)

def chart(ys, m, d, h):
    ming = (2 + m - 1 - h) % 12
    n = BUREAU[NAYIN[sexagenary(palace_stem(ys, ming), ming) // 2]]
    k = next(k for k in range(n) if (d + k) % n == 0)
    q = (d + k) // n
    z = (2 + q - 1 + (-k if k % 2 else k)) % 12
    f = (4 - z) % 12
    pos = {"ziwei": z, "tianji": z - 1, "taiyang": z - 3, "wuqu": z - 4,
           "tiantong": z - 5, "lianzhen": z - 8, "tianfu": f,
           "taiyin": f + 1, "tanlang": f + 2, "jumen": f + 3,
           "tianxiang": f + 4, "tianliang": f + 5, "qisha": f + 6,
           "pojun": f + 10, "wenchang": 10 - h, "wenqu": 4 + h,
           "zuofu": 4 + m - 1, "youbi": 10 - (m - 1)}
    return ming, {s: p % 12 for s, p in pos.items()}

def ji_edges(ys, pos, table=SIHUA):
    return [pos[table[palace_stem(ys, b)][3]] for b in range(12)]

def all_charts():
    for ys in range(10):
        for m in range(1, 13):
            for d in range(1, 31):
                for h in range(12):
                    yield ys, m, d, h

if __name__ == "__main__":
    n = selfs = any_self = birth_in_ming = distinct = 0
    role = [0] * 12
    for ys, m, d, h in all_charts():
        ming, pos = chart(ys, m, d, h)
        e = ji_edges(ys, pos)
        n += 1
        k = sum(e[b] == b for b in range(12))
        selfs += k
        any_self += k > 0
        birth_in_ming += pos[SIHUA[ys][3]] == ming
        role[(ming - e[ming]) % 12] += 1
        distinct += len(set(e))
    rand_distinct = 12 * (1 - (11 / 12) ** 12)
    print("   charts: {:,d}".format(n))
    print("   self-ji palaces per chart {:.4f}; charts with one or more"
          " {:.4f}".format(selfs / n, any_self / n))
    print("   birth-year ji in the ming palace: {:.4f} (1/12 = {:.4f})"
          .format(birth_in_ming / n, 1 / 12))
    print("   ming palace's ji by role: min {:.4f}, max {:.4f}".format(
        min(role) / n, max(role) / n))
    print("   distinct palaces hit by the 12 ji edges: {:.3f}".format(
        distinct / n))
    print("   (a random map of 12 palaces would hit {:.3f})".format(
        rand_distinct))
    print("\nReading: one by one, the edges look random: about one self-ji")
    print("per chart and every role about equally likely. Together they")
    print("are not: zi and chou repeat the stems of yin and mao, so their")
    print("ji always fly together and the twelve edges reach fewer palaces.")

Single source and citation

Fan, Y. (2026). Multimodal Calendrical Tensor Fusion, Modulo-90 Harmonic Dials and Cross-System Resonance Diagnostics (Version 1.0.0), Chapter 3: Flying Four Transformations: a Directed Graph and Three-Layer Stacked Ji. 5D Library. https://doi.org/10.5281/zenodo.24090189

DOI: 10.5281/zenodo.24090189 · Read the monograph · 5DL-B-070 · v1.0.0 · CC-BY-NC-ND-4.0

BibTeX
@book{fan2026070,
  author    = {Fan, Yafu},
  title     = {Multimodal Calendrical Tensor Fusion, Modulo-90 Harmonic Dials and Cross-System Resonance Diagnostics},
  year      = {2026},
  publisher = {5D Library},
  edition   = {1.0.0},
  doi       = {10.5281/zenodo.24090189},
  url       = {https://doi.org/10.5281/zenodo.24090189}
}

Other chapter answers in this book