What does Inhibition Matrices, Windows and Enzyme Competition conclude, in numbers, about “The Schedule, Solved Exactly”?
Answer: Chapter 6 enumerates all 177147 three-slot schedules: the optimum scores 0.8605 against 0.5394 for everything at breakfast, and, more to the point, 0.8355 of arbitrary schedules are worse than everything at breakfast.
Scope of the numbers: Its parameters are illustrative or synthetic; all figures are produced by the programs printed in the book; the book is not medical advice, does not diagnose, and must not be used to start, stop or change any supplement or medicine. Marked boxes separate published evidence, runnable Python calculations (sixteen 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. printed values that match the answer: 0.5394, 0.8355, 0.8605, 177147
| schedules scored | 177147 |
| best 0.8605, worst 0.1561, median 0.4384 | |
| 10th to 90th percentile | 0.3145 to 0.5716 |
| everything at breakfast scores 0.5394 | |
| share of schedules worse than that | 0.8355 |
| schedules within 0.01 of the best | 1 (0.00001) |
| schedules within 0.02 of the best | 3 (0.00002) |
| schedules within 0.05 of the best | 19 (0.00011) |
| so a guessed split lands near the optimum rarely, and the | |
| median guess gives up 0.4906 of the best | |
| value of moving one item out of the all-at-breakfast pile: | |
| item to slot score gain | |
| magnesium | 3 0.6441 +0.1047 |
| calcium | 3 0.6369 +0.0975 |
| theanine | 3 0.6244 +0.0850 |
| zinc | 2 0.6176 +0.0782 |
| zinc | 3 0.6071 +0.0677 |
| vitamin K2 | 3 0.5655 +0.0260 |
| the best single move is worth +0.1047, which is 0.3260 of | |
| the whole gain the full schedule achieves |
Show the full program
# Chapter 6. p12: How lucky a guessed schedule is. The previous program
# found the best of the 177,147 labelled schedules. This one scores all
# of them and looks at the distribution, which answers a question the
# optimum does not: if someone splits the pile by instinct rather than
# by arithmetic, how well are they likely to do? It also ranks the
# single moves out of the morning pile by what each one is worth on its
# own, because a reader who will change exactly one thing should know
# which one. The model is identical to p11, repeated here so that this
# program runs on its own.
ITEMS = (
# name, dose mg, molar mass, site, Km mmol, needs, phase
("magnesium", 400.00, 24.305, "divalent", 4.0000, "plain", "eve"),
("zinc", 25.00, 65.380, "divalent", 0.1500, "lowphy", "any"),
("calcium", 500.00, 40.080, "divalent", 5.0000, "plain", "eve"),
("iron", 18.00, 55.850, "divalent", 0.0800, "acid", "morn"),
("vitamin D3", 0.10, 384.600, "micelle", 0.0004, "fat", "morn"),
("vitamin K2", 0.18, 444.700, "micelle", 0.0005, "fat", "any"),
("NAD precursor", 300.00, 255.200, "nrk", 1.0000, "plain", "morn"),
("curcumin", 500.00, 368.400, "conjugate", 1.0000, "fat", "any"),
("piperine", 10.00, 285.300, "conjugate", 0.0500, "plain", "any"),
("theanine", 200.00, 174.200, "amino", 1.0000, "plain", "eve"),
("caffeine", 100.00, 194.200, "cyp1a2", 0.5000, "plain", "morn"),
)
# slot: label, clock hour, fat g, phytate mg, polyphenol mg, stomach pH
SLOTS = (
("breakfast 07:00", 7.0, 18.0, 120.0, 40.0, 2.0),
("afternoon 14:00", 14.0, 2.0, 0.0, 0.0, 1.6),
("evening 22:00", 22.0, 8.0, 60.0, 0.0, 1.9),
)
FAT_HALF, PHY_MASS, ZN_MASS = 9.0, 660.0, 65.38
PH_HALF, PH_HILL = 3.4, 2.4
PHASE_PEAK = {"morn": 6.0, "eve": 22.5, "any": None}
PHASE_WIDTH = 5.0
ENH_MAX, ENH_K = 1.60, 0.020 # piperine on curcumin, saturating
def mmol(dose_mg, molar_mass):
return dose_mg / molar_mass
def site_factor(i, group):
name, dose, mm, site, km, needs, phase = ITEMS[i]
s = mmol(dose, mm)
extra = sum(mmol(ITEMS[j][1], ITEMS[j][2]) / ITEMS[j][4]
for j in group if j != i and ITEMS[j][3] == site)
return (s / (km * (1.0 + extra) + s)) / (s / (km + s))
def condition_factor(needs, slot):
_, _, fat_g, phytate, polyphenol, ph = slot
f = 1.0
if needs == "fat":
f *= (fat_g / (FAT_HALF + fat_g)) / (18.0 / (FAT_HALF + 18.0))
if needs == "acid":
f *= 1.0 / (1.0 + polyphenol / 120.0)
f *= (1.0 / (1.0 + (ph / PH_HALF) ** PH_HILL)) \
/ (1.0 / (1.0 + (1.6 / PH_HALF) ** PH_HILL))
if needs == "lowphy":
ratio = (phytate / PHY_MASS) / (25.0 / ZN_MASS)
f *= 1.0 / (1.0 + 0.55 * ratio)
return min(1.0, f)
def phase_factor(phase, slot):
peak = PHASE_PEAK[phase]
if peak is None:
return 1.0
d = abs((slot[1] - peak + 12.0) % 24.0 - 12.0)
return 2.718281828459045 ** (-(d / PHASE_WIDTH) ** 2)
def enhance(i, group):
# curcumin gains if piperine is in the same slot
if ITEMS[i][0] != "curcumin":
return 1.0
for j in group:
if ITEMS[j][0] == "piperine":
s = mmol(ITEMS[j][1], ITEMS[j][2])
return 1.0 + ENH_MAX * s / (ENH_K + s)
return 1.0
def item_score(i, group, s):
return (site_factor(i, group)
* condition_factor(ITEMS[i][5], SLOTS[s])
* phase_factor(ITEMS[i][6], SLOTS[s])
* enhance(i, group))
def total(assign):
groups = [[i for i, a in enumerate(assign) if a == s]
for s in range(len(SLOTS))]
out = 0.0
for s, group in enumerate(groups):
for i in group:
out += item_score(i, group, s)
return out / len(ITEMS)
if __name__ == "__main__":
n, k = len(ITEMS), len(SLOTS)
scores = []
assign = [0] * n
best, arg = -1.0, None
while True:
v = total(assign)
scores.append(v)
if v > best:
best, arg = v, tuple(assign)
i = 0
while i < n:
assign[i] += 1
if assign[i] < k:
break
assign[i] = 0
i += 1
if i == n:
break
scores.sort()
m = len(scores)
allone = total([0] * n)
def q(a):
return scores[int(a * (m - 1))]
print(" schedules scored: {}".format(m))
print(" best {:.4f}, worst {:.4f}, median {:.4f}"
.format(scores[-1], scores[0], q(0.5)))
print(" 10th to 90th percentile: {:.4f} to {:.4f}"
.format(q(0.1), q(0.9)))
print(" everything at breakfast scores {:.4f}".format(allone))
worse = sum(1 for v in scores if v < allone)
print(" share of schedules worse than that: {:.4f}".format(worse / m))
for tol in (0.01, 0.02, 0.05):
near = sum(1 for v in scores if v >= scores[-1] - tol)
print(" schedules within {:.2f} of the best: {} ({:.5f})"
.format(tol, near, near / m))
print(" so a guessed split lands near the optimum rarely, and the")
print(" median guess gives up {:.4f} of the best"
.format(1.0 - q(0.5) / scores[-1]))
print(" value of moving one item out of the all-at-breakfast pile:")
print(" item to slot score gain")
moves = []
for i in range(n):
for s in (1, 2):
a = [0] * n
a[i] = s
moves.append((total(a) - allone, ITEMS[i][0], s + 1, total(a)))
moves.sort(reverse=True)
for gain, name, slot, v in moves[:6]:
print(" {:<15}{:<10d}{:<9.4f}{:+.4f}".format(name, slot, v, gain))
print(" the best single move is worth {:+.4f}, which is {:.4f} of"
.format(moves[0][0], moves[0][0] / (scores[-1] - allone)))
print(" the whole gain the full schedule achieves")Single source and citation
Fan, Y. (2026). Polypharmacy Supplement Interactions, Chronotherapy Dosing Windows and Cytochrome Enzyme Competition (Version 1.0.0), Chapter 6: The Schedule, Solved Exactly. 5D Library. https://doi.org/10.5281/zenodo.24090250
DOI: 10.5281/zenodo.24090250 · Read the monograph · 5DL-B-096 · v1.0.0 · CC-BY-NC-ND-4.0
BibTeX
@book{fan2026096,
author = {Fan, Yafu},
title = {Polypharmacy Supplement Interactions, Chronotherapy Dosing Windows and Cytochrome Enzyme Competition},
year = {2026},
publisher = {5D Library},
edition = {1.0.0},
doi = {10.5281/zenodo.24090250},
url = {https://doi.org/10.5281/zenodo.24090250}
}