What does Library Conflicts, Reproducibility and Erasure Codes conclude, in numbers, about “Reed-Solomon over GF(2^8): Erasure Coding and Recovery in the Standard Library”?

Answer: Chapter 5 implements a systematic Reed-Solomon erasure code over GF(2^8) in standard-library Python; an overhead of 1.50 survives three lost blocks, and all 1,001 survivor sets of RS(10+4) decode.

Scope of the numbers: Library sizes, error rates, hazards and failure rates are illustrative; all calculations are generated by the programs in the book; the book is not legal, financial, procurement or storage-service advice. Chapter 1 draws the library as a knowledge graph and shows that the more volumes there are, the fewer places an error can hide: at 200 volumes, 0.9821 of deviant definitions in the illustrative library sit where another volume can contradict them.

中文版

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: 10, 1001

lostpatternsreplication 3x3RS(6+3)decoded
010.00000.00001
190.00000.00009
2360.00000.000036
3840.03570.000084
41260.14291.00000
51260.35711.00000
6840.67861.00000
RS(10+4): 1,001 of 1,001 survivor sets decodable
Show the full program
# Chapter 5. p52: every loss pattern, enumerated. Nine disks hold either
# three blocks in three copies each (replication, overhead 3.0) or one
# RS(6 + 3) stripe of six blocks (overhead 1.5). For each number L of lost
# disks, the share of the C(9, L) patterns that lose data. Every RS
# pattern with L <= 3 is actually decoded and compared with the data; for
# RS(10 + 4) all C(14, 4) = 1,001 choices of 10 survivors are checked for
# an invertible decoding matrix. Data bytes come from a fixed seed.
import itertools
import math
import random

EXP, LOG = [0] * 512, [0] * 256
v = 1
for i in range(255):
    EXP[i], LOG[v] = v, i
    v <<= 1
    if v & 0x100:
        v ^= 0x11D
for i in range(255, 512):
    EXP[i] = EXP[i - 255]


def mul(a, b):
    return 0 if a == 0 or b == 0 else EXP[LOG[a] + LOG[b]]


def inv(a):
    return EXP[255 - LOG[a]]


def gen(k, m):
    g = [[1 if r == c else 0 for c in range(k)] for r in range(k)]
    return g + [[inv((k + i) ^ j) for j in range(k)] for i in range(m)]


def solve(a, b):
    n = len(a)
    a = [row[:] + [x] for row, x in zip(a, b)]
    for c in range(n):
        p = next((r for r in range(c, n) if a[r][c]), None)
        if p is None:
            return None
        a[c], a[p] = a[p], a[c]
        s = inv(a[c][c])
        a[c] = [mul(s, x) for x in a[c]]
        for r in range(n):
            if r != c and a[r][c]:
                f = a[r][c]
                a[r] = [x ^ mul(f, y) for x, y in zip(a[r], a[c])]
    return [row[n] for row in a]


rng = random.Random(20261112)
G = gen(6, 3)
data = [rng.randrange(256) for _ in range(6)]
code = []
for row in G:
    acc = 0
    for c, d in zip(row, data):
        acc ^= mul(c, d)
    code.append(acc)

print("{:>4} {:>9} {:>16} {:>16} {:>9}".format(
    "lost", "patterns", "replication 3x3", "RS(6+3)", "decoded"))
for L in range(7):
    pats = list(itertools.combinations(range(9), L))
    rep = rs = ok = 0
    for gone in pats:
        if any(all(3 * b + c in gone for c in range(3)) for b in range(3)):
            rep += 1
        alive = [i for i in range(9) if i not in gone]
        if len(alive) < 6:
            rs += 1
            continue
        use = alive[:6]
        got = solve([G[i] for i in use], [code[i] for i in use])
        if got == data:
            ok += 1
        else:
            rs += 1
    print("{:>4} {:>9} {:>16.4f} {:>16.4f} {:>9}".format(
        L, len(pats), rep / len(pats), rs / len(pats), ok))

G2 = gen(10, 4)
good = 0
for alive in itertools.combinations(range(14), 10):
    if solve([G2[i] for i in alive], [0] * 10) is not None:
        good += 1
print("RS(10+4): {:,} of {:,} survivor sets decodable".format(
    good, math.comb(14, 10)))

Single source and citation

Fan, Y. (2026). Cross-Volume Theorem-Conflict Detection in Large Bilingual Monograph Libraries, Anti-Decay of Code Reproducibility and Erasure-Coded Cold Storage (Version 1.0.0), Chapter 5: Reed-Solomon over GF(2^8): Erasure Coding and Recovery in the Standard Library. 5D Library. DOI pending

DOI pending · monograph page goes live after publication · 5DL-B-182 · v1.0.0 · CC-BY-NC-ND-4.0

BibTeX
@book{fan2026182,
  author    = {Fan, Yafu},
  title     = {Cross-Volume Theorem-Conflict Detection in Large Bilingual Monograph Libraries, Anti-Decay of Code Reproducibility and Erasure-Coded Cold Storage},
  year      = {2026},
  publisher = {5D Library},
  edition   = {1.0.0},
  note      = {DOI pending}
}

Other chapter answers in this book