5D Library › Hundred-Volume Knowledge Hypergraphs, Multimodal Personal Prior Compilation and Autonomous Empire Scaling · 中文

Chapter 8. Practice: Zero Marginal Cost, Rising Consistency Cost and a Fixity Schedule

What scales and what does not

A finished digital volume can be copied at almost no cost; that is the true part of “zero marginal cost replication”. Writing the next volume is another matter, because every volume that shares a primitive with earlier ones must agree with them in notation, parameters and claims. p15 counts the pairs of volumes that share primitives as the synthetic library grows.

Calculation

# Chapter 8. p15: Zero marginal cost of copies, rising marginal cost of
# consistency. A digital copy of a finished volume costs almost nothing.
# But two volumes that use the same primitive must agree on notation,
# parameters and claims; each such pair is a consistency check. Using
# the synthetic incidence of p06 (same seed), count the volume pairs
# that share at least one or two primitives among the first n volumes,
# and the new pairs that volume n adds (average of the last ten).
import random

def incidence(rng):
    w = [1 / (j + 1) ** 0.8 for j in range(15)]
    vols = []
    for _ in range(100):
        k = rng.choice((2, 2, 3, 3, 3, 4, 4, 5))
        use = set()
        while len(use) < k:
            use.add(rng.choices(range(15), weights=w)[0])
        use = sorted(use)
        if rng.random() < 0.25:
            use.append(15 + rng.randrange(30))
        vols.append(use)
    return vols

def pairs(vols, s):
    return sum(len(set(vols[i]) & set(vols[k])) >= s
               for i in range(len(vols)) for k in range(i + 1, len(vols)))

if __name__ == "__main__":
    vols = incidence(random.Random(100))
    print("   volumes   pairs sharing 1+   sharing 2+   new pairs per volume")
    for n in (10, 25, 50, 75, 100):
        new = (pairs(vols[:n], 1) - pairs(vols[:n - 10], 1)) / 10
        print("   {:7d}   {:16,d}   {:10,d}   {:20.1f}".format(
            n, pairs(vols[:n], 1), pairs(vols[:n], 2), new))
#    volumes   pairs sharing 1+   sharing 2+   new pairs per volume
#         10                 30            7                    3.0
#         25                228           68                   15.0
#         50                979          344                   35.4
#         75              2,024          642                   46.9
#        100              3,620        1,269                   68.6

Among the first 10 volumes 30 pairs share a primitive; among 50, 979; among 100, 3,620. Each new volume now adds about 68.6 pairs to check, against 3.0 when the library was small. Copies scale at zero cost; consistency scales roughly with the square of the library. The practical answer is the one this library uses: shared definitions, automatic checks (every program re-run, every printed number traced to an output) and a fixed house style, so that the checks are done by machines rather than by rereading.

A fixity schedule

Silent corruption is the other cost that grows with time. p16 computes the chance of losing an archive of three copies in a century, depending on how often the SHA-256 checksums are compared and bad copies replaced.

Calculation

# Chapter 8. p16: How often to check the checksums. Three copies of an
# archive; each copy is silently corrupted with chance 1 - exp(-r d) in
# an interval of d years (r = 0.01 a year, illustrative). At each check
# the SHA-256 sums are compared and any corrupted copy is replaced from
# a good one; the archive is lost only if all three copies go bad
# within one interval. Chance of loss over 100 years, by interval, and
# the number of checks it takes.
from math import exp

R = 0.01

def loss(d, copies=3, years=100):
    p = 1 - exp(-R * d)
    return 1 - (1 - p ** copies) ** (years / d)

if __name__ == "__main__":
    print("   check every   checks in 100 years   chance of loss")
    for d in (1, 2, 5, 10, 25, 50, 100):
        print("   {:5d} years   {:19d}   {:14.6f}".format(
            d, 100 // d if d < 100 else 0, loss(d)))
    print("   with two copies and yearly checks: {:.6f}".format(
        loss(1, copies=2)))
#    check every   checks in 100 years   chance of loss
#        1 years                   100         0.000099
#        2 years                    50         0.000388
#        5 years                    20         0.002318
#       10 years                    10         0.008585
#       25 years                     4         0.042595
#       50 years                     2         0.118122
#      100 years                     0         0.252580
#    with two copies and yearly checks: 0.009852

Checking every year, the chance of loss in 100 years is 0.000099; every five years 0.002318; every 25 years 0.042595; never, 0.252580. With only two copies and yearly checks it is 0.009852, a hundred times worse than with three. A yearly fixity check of three copies costs little and is the difference between a hundredth of a percent and a quarter.

Note

A preservation checklist for each volume. Three digital copies on different kinds of infrastructure (repository with DOI, code platform, offline disk); SHA-256 sums published with each release and compared every year; printed copies deposited with at least two libraries; programs in plain ASCII, standard library only, with their output printed beside them.

Summary

Copies are free; consistency is not, and its cost per volume rises as the library grows. Three copies checked every year keep the chance of losing an archive in a century near one in ten thousand.

Fan, Y. (2026). Hundred-Volume Knowledge Hypergraphs, Multimodal Personal Prior Compilation and Autonomous Empire Scaling: Cross-Disciplinary Isomorphisms, Zero-Marginal-Cost Replication and Century-Scale Knowledge Preservation [百卷知识超图拓扑、多模态个人先验编译与自主知识帝国标度律] (Version 1.0.0). 5D Library. https://doi.org/10.5281/zenodo.24090260 · Licensed under Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International (CC BY-NC-ND 4.0).