关于「同名同辈,撞名远比想象多」,《族谱合龙与义庄永续》给出的定量结论是什么?

结论:先看 A 段。齐夫指数取 0.8,各字概率平方和为 0.01520。平方和倒数,叫有效字池,只有 65.8 个字。四百个候选字,看着宽,实际起作用,不到七十个。最常用十个字,就占了 0.294。指数取 0.6,有效字池也只有 159.6;取 1.0,缩到 26.3。

数据口径:按字辈起名,同代人只剩一字可变,示意参数下一代 11 人就有一半机会撞名;两本 60 人对 40 人之支谱按全名硬接,接对者只占 0.208。 书中数据全为合成或示意,不含任何真实在世者资料;全部计算由书中程序生成;本书是非个人化分析,不构成法律、理财或经营建议,也不做任何血统高下或族群比较。

English version

对照数据表

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

A. one generation, K400 free characters
Zipf s sum p^2 effective pool top-10 share
0.60.00627 159.6 0.174
0.80.01520 65.8 0.294
1.00.03805 26.3 0.446
B. chance of at least one repeated full name among n men
n uniform s0.6 s=0.8 s=1.0 pairs s=0.8
100.107 0.238 0.453 0.741 0.68
200.383 0.667 0.896 0.991 2.89
300.672 0.912 0.991 1.000 6.61
500.959 0.999 1.000 1.000 18.62
801.000 1.000 1.000 1.000 48.04
C. men needed for a 50% / 90% chance of a repeat
approximation sqrt(2 ln 2 / sum p^2): uniform 23.5, s0.8 9.5
uniform24 / 43
Zipf s0.6: 16 / 30
Zipf s0.8: 11 / 21
Zipf s1.0: 8 / 14
查看完整验算程序
# Chapter 1. p11: same-name collisions inside one generation (birthday).
# Model: men of one surname and one generation share the generation
# character, so a two-character given name differs only in the free
# character. The free character is drawn from K candidates with Zipf
# weights p_i proportional to 1 / i^s. The chance that n men contain at
# least one repeated name is 1 - n! e_n(p), where e_n is the elementary
# symmetric polynomial of the weights (exact dynamic programme). The
# uniform case is 1 - prod(1 - i / K). K = 400 and s = 0.8 are
# illustrative values (s = 0.6 and 1.0 shown as sensitivity), not
# measured from any real genealogy.
import math

K = 400


def zipf(k, s):
    raw = [1.0 / (i ** s) for i in range(1, k + 1)]
    tot = math.fsum(raw)
    return [r / tot for r in raw]


def p_no_repeat(weights, n):
    # e[j] = elementary symmetric polynomial of degree j
    e = [1.0] + [0.0] * n
    for w in weights:
        for j in range(n, 0, -1):
            e[j] = math.fsum([e[j], w * e[j - 1]])
    return math.factorial(n) * e[n]


def p_no_repeat_uniform(k, n):
    return math.prod(1.0 - i / k for i in range(n))


def first_n(fun, target=0.5):
    n = 1
    while 1.0 - fun(n) < target:
        n += 1
    return n


if __name__ == "__main__":
    sets = [(sv, zipf(K, sv)) for sv in (0.6, 0.8, 1.0)]
    print("A. one generation, K = {} free characters".format(K))
    print("   Zipf s   sum p^2   effective pool   top-10 share")
    for sv, w in sets:
        q = math.fsum(x * x for x in w)
        print("   {:>6.1f}   {:.5f}   {:>14.1f}   {:>12.3f}".format(
            sv, q, 1.0 / q, math.fsum(w[:10])))
    print("B. chance of at least one repeated full name among n men")
    print("     n   uniform   s=0.6   s=0.8   s=1.0   pairs s=0.8")
    q8 = math.fsum(x * x for x in sets[1][1])
    for n in (10, 20, 30, 50, 80):
        row = [1.0 - p_no_repeat_uniform(K, n)] + [
            1.0 - p_no_repeat(w, n) for _, w in sets]
        print("  {:>4}   {:>6.3f}  {:>6.3f}  {:>6.3f}  {:>6.3f}   {:>8.2f}"
              .format(n, *row, math.comb(n, 2) * q8))
    print("C. men needed for a 50% / 90% chance of a repeat")
    print("   approximation sqrt(2 ln 2 / sum p^2): uniform {:.1f},"
          " s=0.8 {:.1f}".format(math.sqrt(2 * math.log(2) * K),
                                 math.sqrt(2 * math.log(2) / q8)))
    nu = first_n(lambda n: p_no_repeat_uniform(K, n))
    nu9 = first_n(lambda n: p_no_repeat_uniform(K, n), 0.9)
    print("   uniform: {} / {}".format(nu, nu9))
    for sv, w in sets:
        a = first_n(lambda n: p_no_repeat(w, n))
        b = first_n(lambda n: p_no_repeat(w, n), 0.9)
        print("   Zipf s={:.1f}: {} / {}".format(sv, a, b))

唯一数据源与引用

范雅福(Fan, Y.). (2026). 《宗族世系有向无环图合龙算法、字辈同余编码与范氏义庄跨代治理母典》第 1 章「同名同辈,撞名远比想象多」(版本 1.0.0). 5D Library. DOI 待发布

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

BibTeX
@book{fan2026334,
  author    = {Fan, Yafu},
  title     = {Genealogical DAG Merge Algorithms, Generation-Poem Congruence Coding and the Institutional Economics of the Fan Clan Charitable Estate},
  year      = {2026},
  publisher = {5D Library},
  edition   = {1.0.0},
  note      = {DOI pending}
}

本书其他章节结论