scieee Science in your language
[en] (orig)

Diet optimization for nutrition per dollar

Author: Freiburger, Andrew
Publisher: Zenodo
DOI: 10.5281/zenodo.17298763
Source: https://zenodo.org/records/17298763/files/diet_optimization.pdf
P o iding he mos cos -e ec i e,
nu i ionally-su icien , ood
ecommenda ions o Ame icans
And ew F eibu ge
Ma ch 19, 2025
1
Abs ac
An inc easing pe cen age o Ame icans ind hemsel es inancially s ained in paying o weekly
g oce ies. This o en leads o buying he mos calo ically dense and p ocessed oods, since
hese a e cheape , o e heal hy and os ensibly mo e expensi e oods. The e ha e been
a emp s in li e a u e and a he USDA o c ea e op imiza ions ha ind heal h ul die a y choices
while adhe ing o s ic budge s, bu hese a emp s ha e gene ally been academic exe cises
and ha e ailed o impac he demog aphic ha hey we e ying o help. Mo i a ed by his
sho coming, I le e aged he “o icial” and open-sou ce USDA da a se s pe aining o ood
p ices, ood nu i ional composi ion, and human physiological needs o design an op imiza ion
model ha inds a nu i ionally adequa e die o he use , explo ed o mysel he ein, a he
lowes possible cos . The op imum die o e ed a su p isingly di e se se o ing edien s and
quan i ies ha me my nu i ional needs o $9.68 pe day a cu en p ices (Janua y 2025).
Keywo ds: Food, nu i ion, USDA, op imiza ion, open-sou ce, LP, cos -e ec i e, oods amps
In oduc ion
The Food S amp Ac o 1964, passed as pa o P esiden Lyndon Johnson’s “G ea Socie y”
legisla i e ac s, ushe ed in he i s con inuous p og am o di ec go e nmen assis ance in he
pu chasing o g oce ies (a concep i s empo a ily employed du ing he G ea Dep ession).
The p og am ini ially co e ed 0.2% o he US popula ion bu now subsidizes he g oce ies o
12.4% o Ame icans, peaking a 15.1% in 2012 (1), and cos s ~$100B in jus Fede al
expendi u es (2). The impac o his p og am and he needs o i s g owing popula ion o
Ame icans mus he e o e be an inc easing ocus o public and p i a e esea ch..
Food choices a a g oce y s o e a e excep ionally di icul , despi e seeming so o dina y, because
he e a e housands o op ions wi h a ying nu i ional densi ies and all 92 o human’s nu i ional
needs a e only known by a iny ac ion o he popula ion. Low-income Ame icans he e o e
o en make ood choices based on some comp omise be ween as e, sa ia ion, and p ice, which
gene ally esul s in choosing oods wi h he mos calo ies and leas mic onu i ional alue (3)
and will nega i ely a ec hei well-being and pe haps he de elopmen o hei child en (4).
Gi en he complexi y o his si ua ion and he se e e absence o heal h and nu i ional
educa ion, howe e , I belie e ha e en he mos heal h-conscious consume s make subop imal
die a y choices.
Backg ound
The e iden p oblem o inding nu i ional- ich die s on s ic budge s has been a opic o
academic in es iga ion o a cen u y (5), bu has ecei ed g owing in e es p esumably because
2
o he ad ances in compu a ional esou ces and objec -o ien ed p og amming languages. A
e iew om 2015 de ailed e o s in his di ec ion o e he p e ious decade (6). Un o una ely,
hese s udies gene ally only examined calo ies o he agg ega e cos o di e en die egimes,
and hei op imiza ions did no o e speci ic oods ha mee all o he known mic onu i ional
die a y goals.
The e a e se e al s udies ha ha e included mic onu i ional da a in hei op imiza ion, al hough
hese s udies gene ally examined he a ec s o die a y choices on nu i ion o cos and did no
p o ide a ge ed die a y guidance (7, 8). The only s udy I ound ha o e ed speci ic die a y
ad ice o mee nu i ional needs a he leas possible cos (9) was designed speci ically o he
Ghanan popula ion, and included local wild oods as a pa o he die ha ob iously canno be
di ec ly used o Ame ican consume s who do no ha e access o hese ee oods.
The USDA’s Th i y Food Plan (10) is he go e nmen ’s a emp o p o ide die a y guidance
h ough sugges ing p opo ions o ood g oups (e.g. 10% lea y g eens, 20% whole g ains, e c) a
a ious cos egimes. Un o una ely, his endea o and i s annual epo ail o o e concise,
ac ionable, ad ice o Ame icans ea nes ly looking o make he bes die a y choices in he
g oce y aisles.
A e e iewing a ailable li e a u e, i appea s ha he e has no been a comp ehensi e
op imiza ion model cons uc ed ha p o ides he Wes e n consume wi h sugges ions o ood
selec ion ha mos cos -e ec i ely sa is y accep ed nu i ional guidelines. I belie e ha his is a
huge unadd essed ma ke and would d ama ically imp o e he heal h o he people in ou
communi ies who a e pe haps in he mos need o aid.
Model Fo mula ion
Da a agg ega ion
Th ee da a se s we e acqui ed o my op imiza ion model: ood p icing, physiological needs,
and ood nu ien s. I elec ed o sou ce hese da a om he USDA, assuming ha sou cing all o
hese da a om he same go e nmen en i y would c ea e he mos obus op imiza ion and
s eamline connec ing he dispa a e da a. These assump ions un o una ely p o ed alse: he
p icing da a was inc edibly spa se (150 oods, and only ui s and ege ables), he physiological
da a con ained less han hal o he needs iden i ied in li e a u e, and he da a sou ces used
di e en namespaces so hey we e no in e ope able. The ollowing adjus men s we e he e o e
necessa y o each o he espec i e da a sou ces o co ec some o e sigh s and s anda dize
he da a sou ces so ha hey could be in eg a ed in o he op imiza ion he ein.
3
P icing da a
The p icing da a was sou ced om he Economic Resea ch Se ice Di ision o he USDA(11),
which de ined only 155 ood i ems and had ex ensi e duplica ion: e.g. esh aspbe ies and
ozen aspbe ies, o esh a ichoke and canned a ichoke. F ozen oods ha e minimal
di e ences wi h esh oods, and canned oods a e much less nu i ionally de ined in he ood
composi ion da a han esh oods, so ozen and canned oods we e omi ed om conside a ion
o c ea e his op imiza ion. The esul ing 69 oods we e he basis o he op imiza ion, and a e
lis ed in Table A1.
A e he op imiza ion ailed o con e ge wi h jus hese a iables, I no iced ha i was no
possible o mee he a equi emen s gi en hese ood op ions. I he e o e added laxseeds o
he op imiza ion as a low-cos , whole- ood, sou ce o a and p o ein. The p icing da a was
sou ced om Amazon (12), he yield was assumed o be 1 (since he whole seed is consumed),
and he cupEqui alen Size (de ined by he USDA as weigh pe cup o a ood) de i ed om an
analy ical websi e (13).
Physiological da a
Physiological needs o mysel – Ac i e, 28 yea s-old man, 5’10”, 150lb – we e sou ced om he
USDA “DRI [daily equi ed in ake] Calcula o o Heal hca e P o essionals” and p ocessed in o
Table 1. While his is no he mos comp ehensi e lis o nu i ional needs, con aining less han
hal o he nu ien s ha a e ac ually equi ed by humans, i was selec ed because i is an
“o icial” and open-sou ce se o nu i ional needs and co e s he mos impo an nu ien s. The
assump ion likely made by he USDA is ha by ollowing hese nu i ional guidelines is ha by
sa is ying hese nu i ional needs h ough ea ing whole oods, one would likely also sa is y
nu i ional needs o he o he ace nu ien s ha a e no cap u ed he e.
Se e al nu ien s – Ch omium, Vi amin B12, Vi amin D, Choles e ol, Iodine, Molybdenum, and
Phospho us – we e con ained in less han 6 oods, and we e he e o e omi ed o p e en he
op imiza ion om ei he becoming in easible (such as Vi amin D and Iodine which we e in no
oods) o om o cing he inclusion o he ew oods ha con ain hese nu ien s (such as
Molybdenum in jus 3 oods). This is pa ly based on he belie ha some o hese nu ien s a e
p esen in mos o whole oods despi e hem no being explici ly measu ed in hese da a: i.e. I
belie e ha un epo ed nu ien abundance in oods canno be in e p e ed as a measu ed ze o
abundance o a nu ien in a ood.
Table 1: The nu i ional equi emen s ha a e used o he op imiza ion, wi h changes no ed.
No ably, all o he “ND” (No De e mined) uppe bounds we e changed o 10,000 o he
espec i e uni s, which a e no included in he “Changes” column o highligh he mo e impac ul
changes o he physiological nu ien needs. All o he uni s we e also s anda dized – g ams o
4
mac onu ien s and millig ams o mic onu ien s – o acili a e he di ec compa ison be ween
nu ien s and easie p og amming.
Nu ien
Lowe bound
Uppe bound
Modi ica ions
Ca bohyd a e
331g
478g
To al Fibe
41g
ND
P o ein
54g
ND
The ange was changed o [100,150] o
mee my speci ic exe cise needs
Fa
65g
114g
Sa u a ed a y acids
“As low as possible”
Uppe bound o 10% o al calo ies
(33.3g) based on ecen li e a u e
Linolenic Acid
1.6g
ND
Linoleic Acid
17g
ND
Die a y Choles e ol
“As low as possible”
Uppe bound o 800mg, as a easible
uppe limi (~4 eggs wo h).
To al Wa e
NA
3.7L
A low o 0.37 (10% o max) was c ea ed
since ood migh be oo d y below his.
Ene gy
2400kcal
3200kcal
Added his e m because i was NOT
included in he USDA ecommenda ions
Vi amins
Vi amin A
900 mcg
3,000 mcg
Vi amin C
90 mg
2,000 mg
Vi amin D
15 mcg
100 mcg
Vi amin B6
1.3 mg
100 mg
Vi amin E
15 mg
1,000 mg
Vi amin K
120 mcg
ND
Thiamin
1.2 mg
ND
Vi amin B12
2.4 mcg
ND
Ribo la in
1.3 mg
ND
Fola e
400 mcg
1,000 mcg
The uppe bound was changed o
3000mcg o e lec mo e ecen li e a u e
Niacin
16 mg
35 mg
Choline
0.55 g
3.5 g
Pan o henic Acid
5 mg
ND
Bio in
30 mcg
ND
5

Ca o enoids
NA
ND
The ange was a bi a ily de ined as
[0,1E5], since ca o enoids a e gene ally
no nu i ional
Mine als
Calcium
1,000 mg
2,500 mg
Chlo ide
2.3 g
3.6 g
Ch omium
35 mcg
ND
Coppe
900 mcg
10,000 mcg
Fluo ide
4 mg
10 mg
Iodine
150 mcg
1,100 mcg
I on
8 mg
45 mg
Magnesium
400 mg
350 mg
The uppe bound he e is amazingly lowe
han he lowe bound, so he uppe bound
was c ea ed o be 10,000mg
Manganese
2.3 mg
11 mg
Molybdenum
45 mcg
2,000 mcg
Phospho us
0.7 g
4 g
Po assium
3,400 mg
ND
The ND he e was eplaced wi h
15,000mg because po assium is
gene ally no a conce n in excess and
was oo close o he lowe bound a he
1E4mg de aul .
Selenium
55 mcg
400 mcg
Sodium
1,500 mg
2,300 mg
Zinc
11 mg
40 mg
Food composi ion da a
The nu i ional composi ion o a ious oods was sou ced om he 10/24 elease o he USDA’s
“FoodDa a Cen al” collec ion o ood da a (14). The esul ing zip ile con ained ~50 iles, o
bo h da a and me ada a. The me ada a, in addi ion o documen ed e minology (15), we e used
o decyphe he IDs om he da a iles. The esul ing da a iles con ained 18.1M nu i ional
da a poin s and 1.9M oods. Gi en he limi ed scope o p icing da a, he a ay o ood op ions
we e il e ed o jus oods con aining “ aw” o ma ch he exclusi e lis o ui s and ege ables
6
om he p icing da a, which esul ed in 2254 oods. These oods included aw mea s as well as
ui s and ege ables, bu hese we e il e ed la e in he op imiza ion code.
Model cons uc ion
The model consis s o a a iable o each ood i em – ul ima ely 70 including laxseeds – ha
we e bound [0,5] o limi consolida ion o he sol e o jus a ew nu i ionally dense and cheap
oods. This is also designed o make he die a y sugges ions mo e a ac i e o people who like
o ea some di e si y o oods o e he cou se o a week.
The p ima y cons ain s in he sys em is
𝑙𝑏𝑛≤ 𝑛
𝑁
∑(𝑞𝑛*𝑓𝑛 ∀ 𝑓∈𝐹) ≤ 𝑢𝑏𝑛
whe e is he quan i y o he nu ien in ood o he oods ha con ain nu ien .
𝑞𝑛𝑛 𝑓𝑛𝐹 𝑛∈𝑁
Each sum o each nu ien is bounded by he and USDA physiological equi emen s o
𝑙𝑏𝑛𝑢𝑏𝑛
each nu ien displayed in Table 1. Ano he cons ain was added o olume
5 [𝑐𝑢𝑝𝑠]≤ 𝑓𝐹
∑(𝑣𝑜𝑙𝑓*𝑓𝑛) ≤ 20 [𝑐𝑢𝑝𝑠]
o ensu e ha he olume o ood is easonable. The objec i e unc ion
𝑚𝑖𝑛 𝑓𝐹
∑(𝑝𝑓*𝑓)
inds he o al minimal yielded-weigh p ice o 100-g am uni s o all ood .
𝑝𝑓𝑓∈𝐹
Solu ion
Algo i hm
The op imiza ion was sol ed h ough he Simplex algo i hm ia he GLPK (GNU Linea
P og amming Ki ) sol e (16), h ough he Op lang and Op langHelpe Py hon package. All
a iables we e con inuous, so he p oblem was s ic ly a linea p og am and no a MILP.
Resul s
The op imized die was $9.68 pe day and consis ed o he oods in Table 2. The die was
highly skewed owa ds pin o beans and ca o s, p esumably as sou ces o p o ein & i amins
7
and mine als, espec i ely. In e es ingly, only 38 g ams (~¼ o a cup) o lax seeds we e
needed o balance he die , and speci ically mee he a y acid equi emen s, om he o he wise
comple ely whole- ood egan die . The espec i e nu ien quan i ies o his op imized die we e
isualized be ween lowe and uppe bounds in Figu e 1, which, impo an ly, indica es which
nu ien cons ain s we e limi ing he op imiza ion.
Table 2: The g am amoun o each ood ha sa is ies all o he cons ain s o nu i ional needs
and olume equi emen s.
Food
Ca o s
Pin o
beans
Bluebe ies
Colla ds
Co n
Cele y
Raspbe ies
Cucumbe
Flax
seeds
Amoun
(g)
500
500
249
197
173
155
118
75
38
The op imum ing edien s om Table 2 we e passed in o Cha GPT o c ea e an ac ionable
die a y egime ha could be ollowed. The p omp ead: “c ea e a day o meals om he
ollowing ing edien s, wi hou adding any calo ies. The numbe s a e denomina ed in g ams o
he gi en ood.” The meal egime p oposed by Cha GPT is con ained in Figu e 2. The
op imiza ion could concei ably be un i e a i ely o simula e an en i e week, and hen he
cooking ins uc ions o he ull week would be speci ied by Cha GPT, e ec i ely emula ing he
ole o a pe sonal nu i ionis .
8
9
Ok a
3.70475
0.8345
0.36375
1.6513
Onions
1.1062
0.9
0.3527
0.4335
O anges
1.4624
0.68
0.4079
0.8771
Papaya
4.41145
0.81
0.23145
0.9105
Peaches
2.89215
0.98
0.3362
0.98395
Pea s
1.8472
0.9
0.3638
0.7466
Pineapple
3.81515
0.755
0.25905
0.7612
Pin o beans
1.4173
2.4692
0.3858
0.2215
Plum
4.4276
0.97
0.2756
1.0818
Pomeg ana e
2.4672
0.56
0.3417
1.5055
Po a oes
0.8166
0.8113
0.2646
0.2663
Radish
1.8126
0.9
0.2756
0.555
Raspbe ies
6.9464
0.98
0.3252
2.30605
Red peppe s
1.8742
0.82
0.2646
0.6047
Spinach
3.5074667
0.8486666
0.2866
1.169
S awbe ies
3.15515
0.97
0.3252
1.0573
Swee
po a oes
1.1565
0.8818
0.4409
0.5782
Toma oes
2.435
0.91
0.3748
1.0028333
Tu nip g eens
2.72095
0.763
0.3362
1.19535
Wa e melon
0.382
0.52
0.3307
0.2429
Zucchini
1.6359
0.7695
0.3968
0.8437
All da a p ocessing, op imiza ion design, simula ion, and isualiza ion occu ed in a single
Py hon No ebook, displayed in he ollowing pages. Py hon was used because i connec s o
wo k lows de eloped o my esea ch and allows his p ojec o mo e easily scale in o a p ope
ool wi h a use in e ace.
16