关于「同一时辰,同一卦:生日问题与人群退化」,《梅花易数的哈希与基率》给出的定量结论是什么?

结论:第二章计算碰撞:同一天随机起卦的两人撞卦概率是 0.0833,同一时辰的人群全部撞卦;全年范围内,实际规则的两人撞卦概率是理想哈希的 2.232 倍,16 个人就足以让撞卦更可能发生。

数据口径:书中的人群分布、注意率与记忆率均为示意;全部计算由书中程序生成;本书分析结构与概率,不做任何个人占断,也不构成商业、法律或理财建议。 第六章用似然比为「事后对上」定价,并模拟选择性记忆如何把一半对一半的运气变成 0.795 的回忆相符率。

English version

对照数据表

下表数字由本章 Python 程序原样打印,可重新运行复现。 程序只用 Python 标准库与结论吻合的打印值: 16, 2.232

hashpair-pn50%distinctdistinct
in 30in 100
ideal, 384 slots0.002602428.988.1
ideal, 192 slots0.005211727.878.1
date-time rule0.005811627.676.3
pair-p ratio, rule / ideal 384: 2.232
查看完整验算程序
# Chapter 2. p22: the birthday problem in hexagram space, across a year.
# Casting times drawn uniformly from the 51,840 date-times of p11 give a
# non-uniform law on 192 slots. We compare three hashes: an ideal one on
# all 384 slots, an ideal one on 192, and the real date-time rule; for
# each, the collision probability of a pair (the sum of p squared), the
# group size at which a shared output becomes more likely than not, and
# the expected number of distinct outputs in a group. Exact arithmetic.
import math
from collections import Counter
from fractions import Fraction


def law():
    cnt = Counter()
    for y in range(1, 13):
        for m in range(1, 13):
            for d in range(1, 31):
                for h in range(1, 13):
                    a = y + m + d
                    t = a + h
                    cnt[(a % 8 or 8, t % 8 or 8, t % 6 or 6)] += 1
    n = 12 * 12 * 30 * 12
    return [Fraction(cnt[k], n) for k in sorted(cnt)]


def no_clash(ps, n):
    e = [Fraction(1)] + [Fraction(0)] * n
    for p in ps:
        for k in range(n, 0, -1):
            e[k] += e[k - 1] * p
    return math.factorial(n) * e[n]


def report(name, ps):
    pair = math.fsum(float(p * p) for p in ps)
    n = 2
    while no_clash(ps, n) > Fraction(1, 2):
        n += 1
    d30 = math.fsum(1 - (1 - float(p)) ** 30 for p in ps)
    d100 = math.fsum(1 - (1 - float(p)) ** 100 for p in ps)
    print("{:<22} {:>7.5f} {:>6} {:>9.1f} {:>9.1f}".format(
        name, pair, n, d30, d100))


def main():
    print("hash                   pair-p  n50%  distinct  distinct")
    print("                                     in 30    in 100")
    report("ideal, 384 slots", [Fraction(1, 384)] * 384)
    report("ideal, 192 slots", [Fraction(1, 192)] * 192)
    report("date-time rule", law())
    print("pair-p ratio, rule / ideal 384: {:.3f}".format(
        math.fsum(float(p * p) for p in law()) * 384))


if __name__ == "__main__":
    main()

唯一数据源与引用

范雅福(Fan, Y.). (2026). 《梅花易数体用生克自动机、年月日时哈希碰撞与外应注意捕获基率》第 2 章「同一时辰,同一卦:生日问题与人群退化」(版本 1.0.0). 5D Library. DOI 待发布

DOI 待发布 · 专著页正式发布后上线(本站暂无专著页) · 5DL-B-156 · v1.0.0 · CC-BY-NC-ND-4.0

BibTeX
@book{fan2026156,
  author    = {Fan, Yafu},
  title     = {Plum-Blossom Numerology as a Body-Use Automaton, Hash Collisions in Date-Time Casting and Base Rates of Attention-Captured Omens},
  year      = {2026},
  publisher = {5D Library},
  edition   = {1.0.0},
  note      = {DOI pending}
}

本书其他章节结论