关于「局部审计与剪枝增益:每条新规则查多少对,每剪一条消多少冲突」,《母机收敛判据》给出的定量结论是什么?

结论:第五章说明审计范围比审计人数更重要:只查依赖图近邻时每条新规则约查 7.2 对,全库核对要 2949.5 对;按冲突数贪心剪枝的命中率是 0.818,随机剪枝只有 0.330。

数据口径:书中母机参数均为示意,不涉及任何服务器、域名、密钥或生产信息;全部计算由书中程序生成;本书是非个人化的经营分析,不构成经营建议。 第四章用卡恩算法排序、用强连通分量查环修环,三百卷合成引用图中可比对为 18,828 对,占 0.420。

English version

对照数据表

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

mean pair checks per new rule (last 100 before n)
n full ancestors local
300249.5 124.7 7.8
1,000949.5 577.1 7.5
3,0002949.5 1950.3 7.2
quarterly cost of 24 new rules at n3,000, K = 6,000
full70,788 over K
ancestors46,808 over K
local173 within K
查看完整验算程序
# Chapter 5. p51: what one new rule costs to check, by audit scope.
# Model (illustrative): rules arrive one by one; rule v cites k in
# {1, 2, 3} earlier rules, 0.8 of them from the 40 newest. Scopes:
#   full      check against every live rule          cost n
#   ancestors check against its whole premise closure
#   local     parents, grandparents and siblings (other rules that
#             cite one of its parents) at insertion time
# Mean cost over the 100 rules before each checkpoint; quarterly cost
# for 24 new rules against a budget K of 6,000 pair checks.
import math
import random


def grow(n, rng):
    par, kids, anc = [], [], []
    cost = {"full": [], "ancestors": [], "local": []}
    for v in range(n):
        k = min(v, rng.choice((1, 2, 3)))
        ps = set()
        while len(ps) < k:
            if rng.random() < 0.8:
                ps.add(rng.randrange(max(0, v - 40), v))
            else:
                ps.add(rng.randrange(0, v))
        a = 0
        near = set(ps)
        for u in ps:
            a |= anc[u] | (1 << u)
            near |= set(par[u]) | set(kids[u])
            kids[u].append(v)
        par.append(sorted(ps))
        kids.append([])
        anc.append(a)
        cost["full"].append(v)
        cost["ancestors"].append(bin(a).count("1"))
        cost["local"].append(len(near))
    return cost


if __name__ == "__main__":
    rng = random.Random(20261113)
    cost = grow(3000, rng)
    print("mean pair checks per new rule (last 100 before n)")
    print("      n      full  ancestors   local")
    for n in (300, 1000, 3000):
        row = [math.fsum(cost[s][n - 100:n]) / 100
               for s in ("full", "ancestors", "local")]
        print("  {:>5,}  {:>8.1f}  {:>9.1f}  {:>6.1f}".format(n, *row))
    print("quarterly cost of 24 new rules at n = 3,000, K = 6,000")
    for s in ("full", "ancestors", "local"):
        c = 24 * math.fsum(cost[s][2900:3000]) / 100
        print("  {:<9}  {:>9,.0f}  {}".format(
            s, c, "within K" if c <= 6000 else "over K"))

唯一数据源与引用

范雅福(Fan, Y.). (2026). 《三百卷定理依赖图拓扑排序与母机收敛判据、立项噪音与剪枝增益的闭环停机条件母典》第 5 章「局部审计与剪枝增益:每条新规则查多少对,每剪一条消多少冲突」(版本 1.0.0). 5D Library. DOI 待发布

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

BibTeX
@book{fan2026332,
  author    = {Fan, Yafu},
  title     = {Topological Ordering of the Theorem-Dependency Graph of Three Hundred Volumes and a Convergence Criterion for the Self-Evolving Engine: Halting Conditions between Proposal Noise and Pruning Gain},
  year      = {2026},
  publisher = {5D Library},
  edition   = {1.0.0},
  note      = {DOI pending}
}

本书其他章节结论