What does Bistability, Lipolysis and Menu Math conclude, in numbers, about “The Mineral the Diet Takes Away”?

Answer: Chapter 5 finds the cheapest day meeting all three electrolyte floors costs 1.44, or 9.95 from whole food alone, a ratio of 6.91.

Scope of the numbers: Its parameters are illustrative or synthetic; the samples of Chapter 4 are generated; all figures are produced by the programs printed in the book; the book is not medical advice and does not diagnose. Chapter 4 reaches an area of 0.9645 for the index against 0.9244 for the waist ratio on the same synthetic sample, so the blood test adds 0.0400, with a best index cutoff of 8.705.

中文版

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: 1.44, 6.91, 9.95

   floors: sodium 3000 mg, potassium 3500 mg, magnesium 400 mg
   energy these items may take: 900 kcal
   all nine items: cheapest plan costs 1.44
      1 x spinach 180 g
      3 x table salt 2.5 g
      3 x lite salt 2 g
      3 x magnesium capsule
      sodium 3036 mg, potassium 3989 mg, magnesium 457 mg, 41 kcal
      slack: sodium 36 mg, potassium 489 mg, magnesium 57 mg
   whole foods only: cheapest plan costs 9.95
      3 x spinach 180 g
      1 x almonds 28 g
      1 x salmon 150 g
      3 x bone broth 250 ml
      sodium 3033 mg, potassium 3589 mg, magnesium 621 mg, 717 kcal
      slack: sodium 33 mg, potassium 89 mg, magnesium 221 mg
   whole foods cost 8.51 more and bring 676 kcal more
   ratio of the two costs: 6.91
   the cheap plan spends 0.375 of its cost on the three salts and capsules
Show the full program
# Chapter 5. p09: Meeting the electrolyte floors at the lowest cost. A
# low-carbohydrate week lowers insulin, and low insulin makes the kidney
# excrete sodium, which drags potassium and magnesium with it, so the
# floors below are the ones a careful plan holds. Nine items, nought to
# three portions of each, every one of the 262,144 combinations priced
# by exhaustive search. Composition figures are rounded from published
# food tables; the prices are illustrative. The whole-food-only run
# repeats the search with the three added salts and capsules removed.
ITEMS = (
    # name, sodium, potassium, magnesium (mg), kcal, cost
    ("avocado 150 g",       11,  727,  44, 240, 1.20),
    ("spinach 180 g",      126,  839, 157,  41, 0.90),
    ("almonds 28 g",         0,  208,  76, 164, 0.45),
    ("pumpkin seeds 28 g",   5,  223, 156, 158, 0.50),
    ("salmon 150 g",        75,  534,  44, 310, 3.50),
    ("bone broth 250 ml",  860,  110,  10,  40, 1.10),
    ("table salt 2.5 g",   970,    0,   0,   0, 0.01),
    ("lite salt 2 g",        0, 1050,   0,   0, 0.05),
    ("magnesium capsule",    0,    0, 100,   0, 0.12),
)
WHOLE = 6                       # the first six items are whole foods
FLOOR = (3000, 3500, 400)       # sodium, potassium, magnesium, mg a day
KCAL_CAP = 900                  # kcal these items may take of the day
MAXP = 3

def search(items):
    n = len(items)
    best = None
    counts = [0] * n
    while True:
        na = k = mg = kcal = 0
        cost = 0.0
        for i, c in enumerate(counts):
            if c:
                _, a, b, m, e, p = items[i]
                na += a * c
                k += b * c
                mg += m * c
                kcal += e * c
                cost += p * c
        if (na >= FLOOR[0] and k >= FLOOR[1] and mg >= FLOOR[2]
                and kcal <= KCAL_CAP):
            if best is None or cost < best[0] - 1e-12:
                best = (cost, tuple(counts), na, k, mg, kcal)
        i = 0
        while i < n:
            counts[i] += 1
            if counts[i] <= MAXP:
                break
            counts[i] = 0
            i += 1
        if i == n:
            break
    return best

if __name__ == "__main__":
    print("   floors: sodium {} mg, potassium {} mg, magnesium {} mg"
          .format(*FLOOR))
    print("   energy these items may take: {} kcal".format(KCAL_CAP))
    for label, items in (("all nine items", ITEMS),
                         ("whole foods only", ITEMS[:WHOLE])):
        best = search(items)
        if best is None:
            print("   {}: no combination meets the floors".format(label))
            continue
        cost, counts, na, k, mg, kcal = best
        print("   {}: cheapest plan costs {:.2f}".format(label, cost))
        for i, c in enumerate(counts):
            if c:
                print("      {} x {}".format(c, items[i][0]))
        print("      sodium {} mg, potassium {} mg, magnesium {} mg,"
              " {} kcal".format(na, k, mg, kcal))
        print("      slack: sodium {} mg, potassium {} mg,"
              " magnesium {} mg".format(na - FLOOR[0], k - FLOOR[1],
                                        mg - FLOOR[2]))
    a = search(ITEMS)
    b = search(ITEMS[:WHOLE])
    print("   whole foods cost {:.2f} more and bring {} kcal more"
          .format(b[0] - a[0], b[5] - a[5]))
    print("   ratio of the two costs: {:.2f}".format(b[0] / a[0]))
    print("   the cheap plan spends {:.3f} of its cost on the three salts"
          " and capsules".format(sum(a[1][i] * ITEMS[i][5]
                                     for i in range(WHOLE, len(ITEMS)))
                                 / a[0]))

Single source and citation

Fan, Y. (2026). Insulin-Glucagon Bistability, Visceral Lipolysis Kinetics and Linear-Programming Diet Optimization (Version 1.0.0), Chapter 5: The Mineral the Diet Takes Away. 5D Library. https://doi.org/10.5281/zenodo.24090248

DOI: 10.5281/zenodo.24090248 · Read the monograph · 5DL-B-095 · v1.0.0 · CC-BY-NC-ND-4.0

BibTeX
@book{fan2026095,
  author    = {Fan, Yafu},
  title     = {Insulin-Glucagon Bistability, Visceral Lipolysis Kinetics and Linear-Programming Diet Optimization},
  year      = {2026},
  publisher = {5D Library},
  edition   = {1.0.0},
  doi       = {10.5281/zenodo.24090248},
  url       = {https://doi.org/10.5281/zenodo.24090248}
}

Other chapter answers in this book