What does Spectral Gaps and Bottleneck Cuts conclude, in numbers, about “Eastern and Western Sources: the Changshan Snake of Sunzi's "Nine Grounds" and Kirchhoff's Circuit Equations of 1847”?
Answer: Chapter 7 examines the Changshan snake of the Sunzi's "Nine Grounds" and Kirchhoff's circuit equations of 1847.
Scope of the numbers: The parameters are illustrative; all calculations are generated by the book's programs; the book is not individual business advice, and any change to a production system or a real supply chain must be reviewed and released by hand by the person in charge. Marked boxes separate published evidence, runnable Python calculations (18 programs), classical sources and the author's hypotheses.
Data table
The numbers below are printed verbatim by the chapter's Python program and can be reproduced by running it. standard-library Python only
| shape lambda2 head->tail tail->head mid->both | |
| plain snake (path) | 0.1206 33 33 8 |
| tail bitten (cycle) | 0.4679 1 1 8 |
| two inner sinews | 0.3820 3 3 1 |
| (rounds until the watched end holds half of its final share) | |
| Wu and Yue in one boat ties lambda2 | |
| no tie | 0 0.0000 |
| one storm tie | 1 0.3542 |
| left and right hands | 4 2.0000 |
Show the full program
# Chapter 7. p71: the Changshan snake of Sunzi's "Nine Grounds" written as
# a graph. A strike at one node is a unit signal that spreads by
# x <- x - eps L x (eps = 1 / (dmax + 1)); "the tail arrives" when the
# tail holds half of its final share 1/n. Shapes: a plain snake (path of
# 9), the snake biting its tail (cycle of 9), and the snake with two
# inner sinews (path plus links 0-4 and 4-8). Then the Wu and Yue men in
# one boat: two groups of four with no tie, then storm ties added.
# All shapes are illustrative readings of the text, not the text itself.
import math
def laplacian(n, edges):
lap = [[0.0] * n for _ in range(n)]
for i, j in edges:
lap[i][j] -= 1.0
lap[j][i] -= 1.0
lap[i][i] += 1.0
lap[j][j] += 1.0
return lap
def jacobi(mat, tol=1e-22):
n = len(mat)
a = [row[:] for row in mat]
v = [[1.0 if i == j else 0.0 for j in range(n)] for i in range(n)]
sweeps = 0
while True:
off = math.fsum(a[i][j] ** 2 for i in range(n)
for j in range(i + 1, n))
if off < tol or sweeps > 60:
break
sweeps += 1
for p in range(n - 1):
for q in range(p + 1, n):
if abs(a[p][q]) < 1e-300:
continue
th = (a[q][q] - a[p][p]) / (2.0 * a[p][q])
t = math.copysign(1.0, th) / (abs(th) + math.hypot(th, 1.0))
c = 1.0 / math.sqrt(t * t + 1.0)
s = t * c
for k in range(n):
akp, akq = a[k][p], a[k][q]
a[k][p] = c * akp - s * akq
a[k][q] = s * akp + c * akq
for k in range(n):
apk, aqk = a[p][k], a[q][k]
a[p][k] = c * apk - s * aqk
a[q][k] = s * apk + c * aqk
for k in range(n):
vkp, vkq = v[k][p], v[k][q]
v[k][p] = c * vkp - s * vkq
v[k][q] = s * vkp + c * vkq
order = sorted(range(n), key=lambda i: a[i][i])
vals = [a[i][i] for i in order]
vecs = [[v[k][i] for k in range(n)] for i in order]
return vals, vecs, sweeps
def arrive(n, edges, start, watch):
lap = laplacian(n, edges)
deg = [lap[i][i] for i in range(n)]
eps = 1.0 / (max(deg) + 1)
x = [0.0] * n
x[start] = 1.0
goal = 0.5 / n
for k in range(1, 5000):
lx = [math.fsum(lap[i][j] * x[j] for j in range(n))
for i in range(n)]
x = [x[i] - eps * lx[i] for i in range(n)]
if all(x[w] >= goal for w in watch):
return k
return -1
n = 9
shapes = [("plain snake (path)", [(i, i + 1) for i in range(8)]),
("tail bitten (cycle)", [(i, (i + 1) % 9) for i in range(9)]),
("two inner sinews", [(i, i + 1) for i in range(8)]
+ [(0, 4), (4, 8)])]
print("shape lambda2 head->tail tail->head mid->both")
for name, es in shapes:
lam = jacobi(laplacian(n, es))[0][1]
print("%-20s %7.4f %10d %10d %9d"
% (name, lam, arrive(n, es, 0, [8]), arrive(n, es, 8, [0]),
arrive(n, es, 4, [0, 8])))
print("(rounds until the watched end holds half of its final share)")
print()
wu = [(a, b) for a in range(4) for b in range(a + 1, 4)]
yue = [(a + 4, b + 4) for a, b in wu]
print("Wu and Yue in one boat ties lambda2")
for label, ties in (("no tie", []), ("one storm tie", [(3, 4)]),
("left and right hands", [(0, 4), (1, 5), (2, 6),
(3, 7)])):
lam = jacobi(laplacian(8, wu + yue + ties))[0][1]
lam = 0.0 if lam < 1e-9 else lam
print("%-25s %5d %7.4f" % (label, len(ties), lam))Single source and citation
Fan, Y. (2026). Graph-Laplacian Spectral Gaps and Cheeger Constants: Single-Point Bottleneck Cuts in Multi-Agent Workflows and Cross-Border Supply Chains (Version 1.0.0), Chapter 7: Eastern and Western Sources: the Changshan Snake of Sunzi's "Nine Grounds" and Kirchhoff's Circuit Equations of 1847. 5D Library. DOI pending
DOI pending · monograph page goes live after publication · 5DL-B-243 · v1.0.0 · CC-BY-NC-ND-4.0
BibTeX
@book{fan2026243,
author = {Fan, Yafu},
title = {Graph-Laplacian Spectral Gaps and Cheeger Constants: Single-Point Bottleneck Cuts in Multi-Agent Workflows and Cross-Border Supply Chains},
year = {2026},
publisher = {5D Library},
edition = {1.0.0},
note = {DOI pending}
}Other chapter answers in this book
- Chapter 1 · Algebraic Connectivity: Why a High Degree Is Not Robustness
- Chapter 2 · The Cheeger Constant: How Narrow the Neck Is, Clamped from Both Sides by the Spectrum
- Chapter 3 · Where to Add One Link: Greedy Addition, the Fiedler Score and the Illusion of Quantity
- Chapter 4 · Multi-Agent Workflows: Consensus Speed, the Orchestrating Hub and Single Points of Hand-off
- Chapter 5 · Cross-Border Supply Chains: Effective Resistance, Maximum Flow and the Weight of One Port
- Chapter 6 · Opposing Evidence and Boundaries: Where the Algebraic Connectivity Misleads
- Chapter 8 · The Empirical Loop: a Quarterly Checkup of the Workflow Graph, Link Advice and a Plan for Refutation