What does Quantum-Inspired Search and Verified Conjectures conclude, in numbers, about “Following the Natural Joints and Reasoning to Hypotheses: Cook Ding, Shen Kuo, Peirce and Hardy”?
Answer: Chapter 7 examines Cook Ding in the Zhuangzi, Shen Kuo's rule for stacked piles, Peirce on abduction and one sentence of Hardy, and checks Shen Kuo's correction on 27,000 piles.
Scope of the numbers: Parameters are illustrative and all calculations are generated by the book's programs. Marked boxes separate published evidence, runnable Python calculations (20 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 onlyprinted values that match the answer: 27000
| top a x b | layers | brute | frustum | Shen | excess |
|---|---|---|---|---|---|
| 1 x 1 | 2 | 5 | 14/3 | 5 | 1/3 |
| 2 x 3 | 4 | 68 | 66 | 68 | 2 |
| 3 x 5 | 6 | 265 | 260 | 265 | 5 |
| 4 x 4 | 10 | 805 | 790 | 805 | 15 |
| 10 x 12 | 8 | 1,716 | 5120/3 | 1,716 | 28/3 |
| 5 x 9 | 25 | 10,225 | 10,125 | 10,225 | 100 |
| exhaustive check a, b, n in 1 to 30: 27,000 piles, 0 mismatches |
Show the full program
# Chapter 7. p71: Shen Kuo's stacked-jar count against the solid formula.
# Mengxi Bitan, juan 18: a pile of jars whose top layer is a by b and
# whose bottom layer is c by d, with n layers (c = a + n - 1,
# d = b + n - 1). Brute force counts every jar layer by layer. The
# continuous frustum ("chu tong") volume n/6 [(2b + d) a + (2d + b) c]
# undercounts; Shen Kuo adds the excess n (c - a) / 6. Exact Fraction
# arithmetic; the pile sizes are illustrative.
from fractions import Fraction
def brute(a, b, n):
count = 0
for i in range(n):
count += (a + i) * (b + i)
return count
def frustum(a, b, n):
c, d = a + n - 1, b + n - 1
return Fraction(n, 6) * ((2 * b + d) * a + (2 * d + b) * c)
def shen(a, b, n):
c = a + n - 1
return frustum(a, b, n) + Fraction(n * (c - a), 6)
def show(x):
return "{:,}".format(int(x)) if x.denominator == 1 else str(x)
if __name__ == "__main__":
print(" top a x b layers brute frustum Shen excess")
for a, b, n in ((1, 1, 2), (2, 3, 4), (3, 5, 6), (4, 4, 10),
(10, 12, 8), (5, 9, 25)):
br, fr, sh = brute(a, b, n), frustum(a, b, n), shen(a, b, n)
print(" {:>4} x {:<3} {:>5} {:>7,} {:>9} {:>7,} {:>7}".format(
a, b, n, br, show(fr), int(sh), show(sh - fr)))
assert sh == br
bad = 0
for a in range(1, 31):
for b in range(1, 31):
for n in range(1, 31):
if shen(a, b, n) != brute(a, b, n):
bad += 1
print(" exhaustive check a, b, n in 1 to 30: {:,} piles, {} mismatches"
.format(30 ** 3, bad))Single source and citation
Fan, Y. (2026). Quantum-Inspired Combinatorial Search, Abductive Intuition and Computationally Verified Breakthrough Monograph Engineering (Version 1.0.0), Chapter 7: Following the Natural Joints and Reasoning to Hypotheses: Cook Ding, Shen Kuo, Peirce and Hardy. 5D Library. DOI pending
DOI pending · monograph page goes live after publication · 5DL-B-364 · v1.0.0 · CC-BY-NC-ND-4.0
BibTeX
@book{fan2026364,
author = {Fan, Yafu},
title = {Quantum-Inspired Combinatorial Search, Abductive Intuition and Computationally Verified Breakthrough Monograph Engineering},
year = {2026},
publisher = {5D Library},
edition = {1.0.0},
note = {DOI pending}
}Other chapter answers in this book
- Chapter 1 · The Square-Root Wall: a Classical Simulation of Amplitude Amplification and the Lower Bound for Unstructured Search
- Chapter 2 · Annealing, Restarts and the Metropolis Rule: Classical Recipes for Escaping Local Optima
- Chapter 3 · The Burden of Proof for a Speedup: Time to Solution, Scaling Laws and Dequantisation
- Chapter 4 · Amplifying Samples by Value: Importance Sampling and Upper Confidence Bounds
- Chapter 5 · Shared Structure: Spectral Fingerprints, Exhaustive Mappings and the Typicality of Combinations
- Chapter 6 · A Pipeline for Ramanujan-Style Conjectures: Abundant Generation, Exhaustive Refutation and Exact Bounds
- Chapter 8 · Closing the Empirical Loop: Standard Operating Templates and Checker Specification