What does A Convergence Criterion for the Self-Evolving Engine conclude, in numbers, about “The Theorem-Dependency Graph: Kahn's Topological Sort, Cycle Detection and a Synthetic Graph of Three Hundred Volumes”?

Answer: Chapter 4 sorts with Kahn's algorithm and finds and repairs cycles with strongly connected components; in a synthetic citation graph of three hundred volumes, 18,828 pairs are comparable, a share of 0.420.

Scope of the numbers: Its parameters are illustrative and contain no production information; all calculations are generated by its programs; it is general business analysis, not business advice. Chapter 4 sorts with Kahn's algorithm and finds and repairs cycles with strongly connected components; in a synthetic citation graph of three hundred volumes, 18,828 pairs are comparable, a share of 0.420.

中文版

Data table

The numbers below are printed verbatim by the chapter's Python program and can be reproduced by running it. standard-library Python onlyprinted values that match the answer: 0.420, 18828

volumes 300, citation edges 589
layers (longest chain + 1)33
volume50: ancestors 13, depth 10
volume 100: ancestors13, depth 9
volume 200: ancestors73, depth 18
volume 299: ancestors 181, depth 30
mean ancestors per volume62.76
comparable pairs 18,828 of 44,8500.420
roots 1, leaves (never cited) 49
Show the full program
# 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)))

Single source and citation

Fan, Y. (2026). 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 (Version 1.0.0), Chapter 4: The Theorem-Dependency Graph: Kahn's Topological Sort, Cycle Detection and a Synthetic Graph of Three Hundred Volumes. 5D Library. DOI pending

DOI pending · monograph page goes live after publication · 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}
}

Other chapter answers in this book