What does Spiritual Quotient, Prior Conditioning and RAG Agents conclude, in numbers, about “The Library Graph: Islands, the Fiedler Value and a Small World”?
Answer: Chapter 6 builds a graph from the keywords of all 82 volumes: once volumes 3, 9, 24 and 31, the islands of the 73-volume edition, carry keywords their own text supports and share topics with volumes 080 to 082, the whole library is connected with no islands and a Fiedler value of 0.5475, a small world (clustering 0.591 against 0.208 at random); without "pre-registration" volumes 3 and 9 hang on 3 edges each.
Scope of the numbers: Marked boxes separate evidence, 16 runnable Python programs, classical sources and hypotheses.
Data table
The numbers below are printed verbatim by the chapter's Python program and can be reproduced by running it. printed values that match the answer: 0.5475, 0.591, 080, 082, 82
table: 82 volumes, 204 shared keywords; pre-registration in 32
rule A all keywords: 82 volumes, 691 edges
components [82]; isolated: none
largest component holds 100% of volumes
largest: lambda2 0.5475, diameter 5
mean distance 2.23, clustering 0.591
hubs: 081 (42), 079 (41), 080 (39)
without hubs, largest component: 79
former islands, degree: 003 (32), 009 (33), 024 (6), 031 (5)
rule B without pre-registration: 82 volumes, 321 edges
components [82]; isolated: none
largest component holds 100% of volumes
largest: lambda2 0.4161, diameter 6
mean distance 2.69, clustering 0.383
hubs: 082 (22), 081 (21), 069 (20)
without hubs, largest component: 79
former islands, degree: 003 (3), 009 (3), 024 (6), 031 (5)
Reading: 'no islands' holds for all 82 volumes under both
rules. Volumes 003, 009, 024 and 031 now carry keywords their
own text supports, and volumes 080 to 082 add links to them
through shared topics. Connected is not woven: without
pre-registration the former islands hang on three to six
edges each, and the core meets the fringe through few
bridges.Show the full program
# Chapter 6. p11: The library as a graph: islands, Fiedler value, diameter.
# Nodes: all 82 volumes of the library (001 to 082). Data: each volume's
# English keywords from its book.yaml, lower-cased and turned into
# ASCII; only keywords that occur in at least two volumes can make an
# edge, so the table keeps those (VOCAB, most frequent first) and lists
# for each volume the numbers of the ones it uses (LINKS; "-" = none).
# The table is generated from the 82 book.yaml files by
# tools/extract_keywords.py and embedded so that this program stays
# self-contained. Rule A joins two volumes that share any keyword; rule
# B ignores "pre-registration", the method keyword found in the most
# volumes. Reported: components, isolated volumes, and for the largest
# component the algebraic connectivity lambda2 (second-smallest
# eigenvalue of the graph Laplacian, by Jacobi rotations), diameter,
# mean distance, mean clustering coefficient, the three best-connected
# volumes, and the largest component left after those three are removed.
VOCAB = (
"pre-registration", "barnum effect", "base rates", "thompson sampling",
"dihedral group", "guiguzi", "kuramoto model", "modular arithmetic",
"multi-armed bandit", "mutual information", "optimal stopping",
"a/b testing", "book of changes", "chinese remainder theorem",
"incentive compatibility", "kelly criterion", "matching test",
"optional stopping", "sample size", "sunzi", "absorbing markov chain",
"adverse selection", "autophagy", "bone conduction", "bundling",
"circadian rhythm", "critical slowing down", "crossover trial",
"default mode network", "entropy", "ephemeris", "error propagation",
"first-passage time", "gaussian copula", "golden ratio", "han feizi",
"hawkes process", "heart rate variability", "incrementality",
"kalman filter", "matthew effect", "ornstein-uhlenbeck process",
"preferential attachment", "qimen dunjia", "replicator dynamics",
"sexagenary cycle", "sha-256", "shao yong",
"shifted-beta-geometric model", "shiji", "signalling", "solar terms",
"survival analysis", "transaction costs", "winner's curse",
"5-ht2a receptor", "a-weighting", "adler equation", "affine maps",
"algebraic connectivity", "allostatic load", "ampk", "analects",
"arnold tongue", "attention residue", "auditory feedback",
"barbell strategy", "bayesian updating", "beta-hydroxybutyrate",
"betweenness centrality", "bid-ask spread", "bifurcation",
"binary numbers", "binaural beats", "birthday problem", "boolean cube",
"branching ratio", "bregman divergence", "brier score", "calibration",
"cannibalization", "cash flow", "chargebacks", "checkout design",
"cohen's kappa", "complex contagion", "conditional entropy",
"confounding", "controllability gramian", "convention sensitivity",
"conversion funnel", "customer lifetime value", "cyclic groups",
"daodejing", "dark patterns", "declination", "decoy effect",
"default effect", "dendrobium officinale", "dynamic programming",
"eigenvector centrality", "entropic brain", "equation of time",
"escalation of commitment", "external focus of attention", "fat tails",
"fisher information", "forer effect", "forgetting curve",
"functional graph", "fundamental matrix", "garden of forking paths",
"genetic nurture", "glucocorticoid receptor", "glucomannan",
"goodhart's law", "graph laplacian", "hagen-poiseuille",
"harmonics-to-noise ratio", "hazard rate", "heavy tails",
"hick-hyman law", "hormesis", "hpa axis", "hysteresis",
"identifiability", "implied volatility", "information cascades",
"inverse effectiveness", "jump diffusion", "ketone bodies",
"kleiber's law", "klein four-group", "leibniz", "lifetime value",
"limit order book", "loss aversion", "luoshu", "magic square",
"market microstructure", "markov chain", "mechanism design",
"mengxi bitan", "modularity", "mtorc1", "mucosal wave",
"multiple comparisons", "multiple testing", "mussa-rosen",
"optimal error rate", "permutation group", "phase locking",
"phonation threshold pressure", "pitch-shift reflex", "placebo",
"power laws", "precision weighting", "predictive coding", "price ratio",
"proper scoring rules", "refunds", "reputation", "resonance breathing",
"retrieval-augmented generation", "revelation principle",
"reward prediction error", "risk of ruin", "roc curve", "royal cubit",
"saddle-node bifurcation", "salience network", "schumann resonance",
"screening", "self-referral", "sequential probability ratio test",
"shannon entropy", "shapley value", "singer's formant",
"sleep fragmentation", "slow-wave sleep", "small-world networks",
"sound masking", "source-filter theory", "spectral gap",
"structural identifiability", "sybil attack", "tail latency",
"time-restricted eating", "triple network model",
"twelve-tone equal temperament", "two-sided markets", "ucb1", "upsell",
"variance risk premium", "voice science", "volatility skew",
"weibull distribution", "wenxin diaolong", "willingness to pay",
"wisdom of crowds", "xor", "yogacara", "zi wei dou shu", "ziping",
)
LINKS = """
001 93 | 002 0 23 65 | 003 0 46 168 | 004 26 29 165 175 | 005 22 68 130 187
006 42 90 127 155 190 | 007 98 114 | 008 6 28 55 73 101 | 009 0 27 171
010 65 104 118 145 152 153 177 182 194 | 011 1 9 86 201 | 012 98 114 117 179
013 85 97 124 169 | 014 25 37 60 113 123 162 165 | 015 3 8 191 201
016 10 53 161 | 017 22 61 68 130 131 144 187 | 018 5 6 95 118
019 15 32 49 66 105 | 020 12 26 41 93 126 129 155 195 | 021 12 | 022 112 113
023 62 108 149 | 024 27 50 64 149 | 025 42 69 85 100 127 180
026 19 67 78 79 159 167 199 | 027 14 50 115 141 164
028 12 26 41 124 143 167 169 | 029 23 39 71 145 152 153 177 182 194
030 22 61 122 144 | 031 25 27 56 181 | 032 3 8 40 | 033 0 17 54 111
034 128 | 035 44 | 036 19 52 131 143 196 | 037 4 13 45 92 147 175 189
038 10 15 70 105 126 193 195 | 039 36 39 41 76 135 | 040 33 66
041 40 88 112 176 | 042 3 8 10 19 35 103 174 191 | 043 39 104
044 6 183 199 | 045 21 36 70 76 135 139 | 046 34 121 | 047 96 97 136
048 3 8 11 17 38 48 91 176 | 049 77 106 | 050 14 141 164 185
051 28 37 60 123 128 154 156 157 162 170 188 | 052 88
053 0 28 37 117 156 157 170 184 188 | 054 0 55 101 122 184
055 0 10 15 20 99 166 | 056 0 15 53 125 129 166 193 | 057 0 25 84 140 178
058 0 11 48 52 71 81 87 91 | 059 0 53 77 78 79 139 159
060 0 30 34 44 51 102 106 | 061 0 20 31 54 110 163 186
062 0 6 32 43 57 63 99 119 125 137 138 147 150 151 | 063 0 1 5 14 24 96
064 0 4 7 16 47 72 75 132 133 140 183 202 | 065 0 1 7 13 16 29 200
066 0 7 13 16 31 45 51 58 84 102 203 | 067 0 4 16 43 45 51 75 89 137 200
068 0 14 24 33 44 46 49 74 80 120 148 172 173
069 0 1 2 5 20 35 67 80 94 103 107 110 134 158 174 192
070 0 2 9 29 33 43 89 109 202 203 | 071 0 1 2 59 69 100 116 146
072 0 1 2 4 7 13 30 47 72 132 133 | 073 0 1 2 7 30 32 109
074 21 62 108 134 161 190 | 075 3 10 46 74 173 185 186
076 0 1 9 12 47 59 86 116 163 180
077 0 1 11 17 18 35 54 82 83 94 121 136 160 197 198
078 0 3 8 9 18 24 38 49 82 83 158 160 192 198
079 0 5 9 19 36 38 48 50 148 172
080 0 6 18 23 56 57 63 73 111 142 146 151 154 171 178 179 181 189
081 0 5 11 17 18 21 40 42 52 64 81 90 115 119 120 196 197
082 0 1 2 4 31 34 58 87 92 95 107 138 142 150 168
"""
def books():
out = {}
for part in LINKS.replace("\n", " | ").split("|"):
part = part.split()
if part:
out[int(part[0])] = set() if part[1] == "-" else {
int(x) for x in part[1:]}
return out
def graph(bk, skip):
adj = {n: set() for n in bk}
for a in bk:
for b in bk:
if a < b and (bk[a] & bk[b]) - skip:
adj[a].add(b)
adj[b].add(a)
return adj
def components(adj):
seen, comps = set(), []
for n in sorted(adj):
if n in seen:
continue
stack, comp = [n], set()
while stack:
x = stack.pop()
if x not in comp:
comp.add(x)
stack.extend(adj[x] - comp)
seen |= comp
comps.append(comp)
return sorted(comps, key=len, reverse=True)
def jacobi_eigs(m, sweeps=60):
n = len(m)
a = [row[:] for row in m]
for _ in range(sweeps):
off = sum(a[i][j] ** 2 for i in range(n) for j in range(n) if i != j)
if off < 1e-18:
break
for p in range(n - 1):
for q in range(p + 1, n):
if abs(a[p][q]) < 1e-14:
continue
th = (a[q][q] - a[p][p]) / (2 * a[p][q])
t = (1 if th >= 0 else -1) / (abs(th) + (th * th + 1) ** 0.5)
c = 1 / (t * t + 1) ** 0.5
s = t * c
for k in range(n):
akp, akq = a[k][p], a[k][q]
a[k][p], a[k][q] = c * akp - s * akq, s * akp + c * akq
for k in range(n):
apk, aqk = a[p][k], a[q][k]
a[p][k], a[q][k] = c * apk - s * aqk, s * apk + c * aqk
return sorted(a[i][i] for i in range(n))
def stats(adj, comp):
nodes = sorted(comp)
ix = {v: i for i, v in enumerate(nodes)}
lap = [[0.0] * len(nodes) for _ in nodes]
for v in nodes:
lap[ix[v]][ix[v]] = len(adj[v] & comp)
for w in adj[v] & comp:
lap[ix[v]][ix[w]] = -1.0
lam2 = jacobi_eigs(lap)[1]
dist_all, diam = [], 0
for s in nodes:
dist, frontier = {s: 0}, [s]
while frontier:
nxt = []
for x in frontier:
for y in adj[x] & comp:
if y not in dist:
dist[y] = dist[x] + 1
nxt.append(y)
frontier = nxt
diam = max(diam, max(dist.values()))
dist_all += [d for d in dist.values() if d]
cl = []
for v in nodes:
nb = list(adj[v] & comp)
k = len(nb)
if k < 2:
cl.append(0.0)
continue
e = sum(1 for i in range(k) for j in range(i + 1, k)
if nb[j] in adj[nb[i]])
cl.append(2 * e / (k * (k - 1)))
return lam2, diam, sum(dist_all) / len(dist_all), sum(cl) / len(cl)
FORMER = (3, 9, 24, 31) # isolated in the 73-volume edition
if __name__ == "__main__":
bk = books()
print(" table: {} volumes, {} shared keywords;"
" pre-registration in {}".format(
len(bk), len(VOCAB), sum(1 for v in bk.values() if 0 in v)))
for name, skip in (("A all keywords", set()),
("B without pre-registration", {0})):
adj = graph(bk, skip)
comps = components(adj)
m = sum(len(v) for v in adj.values()) // 2
iso = [n for n in sorted(adj) if not adj[n]]
print(" rule {}: {} volumes, {} edges".format(name, len(adj), m))
print(" components {}; isolated: {}".format(
[len(c) for c in comps][:6], " ".join(
"{:03d}".format(n) for n in iso) or "none"))
share = len(comps[0]) / len(adj)
print(" largest component holds {:.0%} of volumes".format(share))
lam2, diam, mean_d, clus = stats(adj, comps[0])
print(" largest: lambda2 {:.4f}, diameter {}".format(lam2, diam))
print(" mean distance {:.2f}, clustering {:.3f}".format(
mean_d, clus))
hubs = sorted(adj, key=lambda v: -len(adj[v]))[:3]
print(" hubs: " + ", ".join("{:03d} ({})".format(
h, len(adj[h])) for h in hubs))
rest = {v: adj[v] - set(hubs) for v in adj if v not in hubs}
print(" without hubs, largest component: {}".format(
len(components(rest)[0])))
print(" former islands, degree: " + ", ".join(
"{:03d} ({})".format(v, len(adj[v])) for v in FORMER))
print("\nReading: 'no islands' holds for all 82 volumes under both")
print("rules. Volumes 003, 009, 024 and 031 now carry keywords their")
print("own text supports, and volumes 080 to 082 add links to them")
print("through shared topics. Connected is not woven: without")
print("pre-registration the former islands hang on three to six")
print("edges each, and the core meets the fringe through few")
print("bridges.")Single source and citation
Fan, Y. (2026). Spiritual Quotient Quantification, Prior-Conditioned Generation and Retrieval-Augmented Cognitive Agents (Version 1.0.0), Chapter 6: The Library Graph: Islands, the Fiedler Value and a Small World. 5D Library. https://doi.org/10.5281/zenodo.24090203
DOI: 10.5281/zenodo.24090203 · Read the monograph · 5DL-B-076 · v1.0.0 · CC-BY-NC-ND-4.0
BibTeX
@book{fan2026076,
author = {Fan, Yafu},
title = {Spiritual Quotient Quantification, Prior-Conditioned Generation and Retrieval-Augmented Cognitive Agents},
year = {2026},
publisher = {5D Library},
edition = {1.0.0},
doi = {10.5281/zenodo.24090203},
url = {https://doi.org/10.5281/zenodo.24090203}
}Other chapter answers in this book
- Chapter 1 · Five Dimensions or One: The Spectrum and Information of an SQ Scale
- Chapter 2 · Reliability, the "Shape" of a Profile and a Blind-Pick Test
- Chapter 3 · Prior Conditioning: How Much Uncertainty Can a Profile Remove?
- Chapter 4 · The Context Budget: Lagrangian Water-Filling and the Best Number of Passages
- Chapter 5 · Retrieval Augmentation: One-Book Recall and Cross-Book Synthesis
- Chapter 7 · Looking Up and Looking Down, and Shao Yong's Observing of Things
- Chapter 8 · A Seven-Flag Audit and a Blind Comparison