关于「压缩与覆盖:十五个原语究竟解释了多少?」,《百卷超图、先验编译与知识帝国标度律》给出的定量结论是什么?
结论:第三章发现共享原语库使朴素描述缩短 6.10 倍,但与好的通用压缩器相比只有 1.04 倍;十五个核心原语覆盖合成书库 100 卷中的 82 卷,完整覆盖需要 28 个。
数据口径:书中的合成书库、比率与风险率均为示意模型;全部计算由书中程序生成;本书不是投资、法律、医疗或技术建议。 第三章发现共享原语库使朴素描述缩短 6.10 倍,但与好的通用压缩器相比只有 1.04 倍;十五个核心原语覆盖合成书库 100 卷中的 82 卷,完整覆盖需要 28 个。
对照数据表
下表数字由本章 Python 程序原样打印,可重新运行复现。 程序只用 Python 标准库与结论吻合的打印值: 1.04, 28, 6.10
| description raw bytes bz2 bytes lzma bytes | |
| separate | 124,389 20,291 13,864 |
| library | 20,387 13,167 13,376 |
| primitives used | 28 (15 core, 13 rare) |
| raw ratio separate / library | 6.10 |
| lzma ratio separate / library | 1.04 |
| ideal bits (5 per letter): separate 621,945, library 101,935 |
查看完整验算程序
# Chapter 3. p06: How much does a shared library of primitives compress
# a hundred-volume description? Synthetic incidence (shared with p07 and
# p08): 100 volumes each use 2 to 5 of 15 core primitives (popularity
# falling as 1 / rank^0.8) and, with chance 0.25, one of 30 rare ones.
# Each primitive has a random definition of 300 to 580 letters from a
# 32-letter alphabet (5 bits a letter, incompressible by design); each
# use carries 24 letters of parameters. "Separate": every volume spells
# out each definition it uses. "Library": each used definition once,
# then a reference per use. Kolmogorov complexity cannot be computed; bz2
# and lzma sizes are upper bounds on it. (bz2 rather than zlib: zlib's
# output size varies between zlib builds.) Seed 100.
import bz2
import lzma
import random
ALPHA = "abcdefghijklmnopqrstuvwxyz012345"
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
if __name__ == "__main__":
rng = random.Random(100)
vols = incidence(rng)
defs = ["".join(rng.choice(ALPHA) for _ in range(300 + 7 * j % 281))
for j in range(45)]
used = sorted({j for v in vols for j in v})
sep, ref = [], ["".join("{}:{};".format(j, defs[j]) for j in used)]
for v in vols:
for j in v:
par = "".join(rng.choice(ALPHA) for _ in range(24))
sep.append(defs[j] + par)
ref.append("#{}{}".format(j, par))
a, b = "".join(sep).encode(), "".join(ref).encode()
print(" description raw bytes bz2 bytes lzma bytes")
for name, s in (("separate", a), ("library", b)):
print(" {:<14} {:10,d} {:11,d} {:11,d}".format(
name, len(s), len(bz2.compress(s, 9)),
len(lzma.compress(s, preset=9))))
print(" primitives used: {} ({} core, {} rare)".format(
len(used), sum(j < 15 for j in used), sum(j >= 15 for j in used)))
print(" raw ratio separate / library: {:.2f}".format(len(a) / len(b)))
print(" lzma ratio separate / library: {:.2f}".format(
len(lzma.compress(a, preset=9)) / len(lzma.compress(b, preset=9))))
print(" ideal bits (5 per letter): separate {:,}, library {:,}".format(
5 * sum(len(x) for x in sep), 5 * sum(len(x) for x in ref)))唯一数据源与引用
范雅福(Fan, Y.). (2026). 《百卷知识超图拓扑、多模态个人先验编译与自主知识帝国标度律》第 3 章「压缩与覆盖:十五个原语究竟解释了多少?」(版本 1.0.0). 5D Library. https://doi.org/10.5281/zenodo.24090260
DOI: 10.5281/zenodo.24090260 · 阅读本章所在专著 · 5DL-B-100 · v1.0.0 · CC-BY-NC-ND-4.0
BibTeX
@book{fan2026100,
author = {Fan, Yafu},
title = {Hundred-Volume Knowledge Hypergraphs, Multimodal Personal Prior Compilation and Autonomous Empire Scaling},
year = {2026},
publisher = {5D Library},
edition = {1.0.0},
doi = {10.5281/zenodo.24090260},
url = {https://doi.org/10.5281/zenodo.24090260}
}