关于「合并冲突的生日问题:共享文件、热点文件与私有目录」,《团队规模的协调边界》给出的定量结论是什么?

结论:第五章把合并冲突写成生日问题:一个热点文件让四个窗口的冲突概率达到 0.6875,私有目录则为零。

数据口径:书中参数为示意;全部计算由书中程序生成;本书属于非个人化经营建议。 第四章以本出版局每波四卷并行为示意场景:容量峰值在 6.78 个窗口,四个窗口已拿到峰值的 89.6 %,协调者的审稿队列把上限压在四。

English version

对照数据表

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

P(at least one conflict per wave)
nA uniformB +hot fileC hot->coordD private
20.11750.33820.11750.0000
30.30860.65430.30860.0000
40.51640.84890.51640.0000
50.69650.94310.69650.0000
60.82820.98120.82820.0000
80.95890.99860.95890.0000
hot file alone, n = 4: 0.6875; n = 2: 0.2500
A with only 40 shared files left, n = 4: 0.1352
查看完整验算程序
# Chapter 5. p52: one hot shared file against private directories.
# Each agent touches file j independently with probability p_j. No file
# is touched by two agents with probability
# prod_j [(1 - p_j)^n + n p_j (1 - p_j)^(n - 1)], computed as a math.fsum
# of logarithms. Layouts (illustrative): A, 200 shared files, p = 0.025
# each (about 5 per agent); B, A plus one catalogue file every agent
# edits with p = 0.5; C, B with the catalogue written only by the
# coordinator; D, private directory per agent, nothing shared.
import math


def p_clash(n, probs):
    logs = [math.log((1 - p) ** n + n * p * (1 - p) ** (n - 1))
            for p in probs]
    return 1.0 - math.exp(math.fsum(logs))


LAYOUT = {
    "A uniform": [0.025] * 200,
    "B +hot file": [0.025] * 200 + [0.5],
    "C hot->coord": [0.025] * 200,
    "D private": [0.0] * 200,
}

if __name__ == "__main__":
    names = ("A uniform", "B +hot file", "C hot->coord", "D private")
    print("P(at least one conflict per wave)")
    print("   n  " + "  ".join("{:>12}".format(x) for x in names))
    for n in (2, 3, 4, 5, 6, 8):
        print("  {:2d}  ".format(n) + "  ".join(
            "{:12.4f}".format(p_clash(n, LAYOUT[x])) for x in names))
    hot = [0.5]
    print("hot file alone, n = 4: {:.4f}; n = 2: {:.4f}".format(
        p_clash(4, hot), p_clash(2, hot)))
    shared = [0.025] * 40
    print("A with only 40 shared files left, n = 4: {:.4f}".format(
        p_clash(4, shared)))

唯一数据源与引用

范雅福(Fan, Y.). (2026). 《林格曼效应与布鲁克斯定律、团队与智能体军团规模的协调开销最优边界母典》第 5 章「合并冲突的生日问题:共享文件、热点文件与私有目录」(版本 1.0.0). 5D Library. DOI 待发布

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

BibTeX
@book{fan2026322,
  author    = {Fan, Yafu},
  title     = {The Ringelmann Effect and Brooks's Law: the Optimal Size of Teams and Agent Squads under Coordination Overhead},
  year      = {2026},
  publisher = {5D Library},
  edition   = {1.0.0},
  note      = {DOI pending}
}

本书其他章节结论