关于「定理依赖图:卡恩拓扑排序、环检测与三百卷合成图」,《母机收敛判据》给出的定量结论是什么?
结论:第四章用卡恩算法排序、用强连通分量查环修环,三百卷合成引用图中可比对为 18,828 对,占 0.420。
数据口径:书中母机参数均为示意,不涉及任何服务器、域名、密钥或生产信息;全部计算由书中程序生成;本书是非个人化的经营分析,不构成经营建议。 第四章用卡恩算法排序、用强连通分量查环修环,三百卷合成引用图中可比对为 18,828 对,占 0.420。
对照数据表
下表数字由本章 Python 程序原样打印,可重新运行复现。 程序只用 Python 标准库与结论吻合的打印值: 0.420, 18828
| volumes 300, citation edges 589 | |
| layers (longest chain + 1) | 33 |
| volume | 50: ancestors 13, depth 10 |
| volume 100: ancestors | 13, depth 9 |
| volume 200: ancestors | 73, depth 18 |
| volume 299: ancestors 181, depth 30 | |
| mean ancestors per volume | 62.76 |
| comparable pairs 18,828 of 44,850 | 0.420 |
| roots 1, leaves (never cited) 49 |
查看完整验算程序
# Chapter 4. p43: a synthetic citation DAG of 300 volumes.
# Model (illustrative, not the real catalogue): volume v cites k in
# {1, 2, 3} earlier volumes; with prob 0.8 each premise comes from the
# 40 most recent volumes, else from any earlier one. Ancestor sets are
# int bitsets. Comparable pairs (one is an ancestor of the other) are
# the pairs a dependency-aware audit must read; the rest of the
# C(300, 2) pairs share no premise chain. Seeded for determinism.
import math
import random
N = 300
def build(rng):
parents = [[] for _ in range(N)]
for v in range(1, N):
k = min(v, rng.choice((1, 2, 3)))
chosen = set()
while len(chosen) < k:
if rng.random() < 0.8:
u = rng.randrange(max(0, v - 40), v)
else:
u = rng.randrange(0, v)
chosen.add(u)
parents[v] = sorted(chosen)
return parents
if __name__ == "__main__":
rng = random.Random(20261113)
par = build(rng)
anc, depth = [0] * N, [0] * N
for v in range(N):
for u in par[v]:
anc[v] |= anc[u] | (1 << u)
depth[v] = max(depth[v], depth[u] + 1)
sizes = [bin(a).count("1") for a in anc]
edges = len([u for v in range(N) for u in par[v]])
comp = math.fsum(sizes)
total = math.comb(N, 2)
print("volumes {}, citation edges {}".format(N, edges))
print("layers (longest chain + 1) = {}".format(max(depth) + 1))
for v in (50, 100, 200, 299):
print(" volume {:>3}: ancestors {:>3}, depth {:>2}".format(
v, sizes[v], depth[v]))
print("mean ancestors per volume = {:.2f}".format(comp / N))
print("comparable pairs {:,} of {:,} = {:.3f}".format(
int(comp), total, comp / total))
roots = len([v for v in range(N) if not par[v]])
leaves = set(range(N)) - {u for v in range(N) for u in par[v]}
print("roots {}, leaves (never cited) {}".format(roots, len(leaves)))唯一数据源与引用
范雅福(Fan, Y.). (2026). 《三百卷定理依赖图拓扑排序与母机收敛判据、立项噪音与剪枝增益的闭环停机条件母典》第 4 章「定理依赖图:卡恩拓扑排序、环检测与三百卷合成图」(版本 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}
}