Home | Blog | Command Reference | Launch RainbowStats

Eat Your Broccoli

July 1, 2026

You can partially blame George Dantzig for military rations. One of the earliest applications of his 1947 simplex algorithm was the famous diet problem: how to feed soldiers at minimum cost while meeting nutritional requirements. Although Dantzig did not invent the modern Meal, Ready-to-Eat (MRE), his work on linear programming transformed military logistics and made large-scale ration optimization practical.

My efforts with RainbowStats are two-fold. First, to build a practical statistical toolkit for everyday analysis. Second, to recreate and extend many of the models and algorithms that I first encountered—or built myself—over the past fifty years.

My first implementation of the simplex method was likely around 1975, written on punch cards and submitted to an IBM 360 mainframe. Like many students of that era, I learned optimization the hard way: one deck of cards, one batch run, and one syntax error at a time.

In a previous post, I showed that the cost of food as a percentage of median family income has steadily declined since 1980. In this article, I revisit that observation using the simplex method itself. By formulating a nutritional optimization problem similar to Dantzig's original diet problem, we can estimate the minimum cost of meeting basic dietary requirements over time and demonstrate just how dramatically the economic burden of food has fallen for the typical American household.

The chart above is straightforward. My question is whether families use substitution techniques to control the household food budget. To test that idea, I created an interactive linear program that builds a food budget for a family of four earning the median U.S. income. The program selects foods that meet the family’s nutritional requirements while minimizing total cost. I then run the same optimization for each monthly date from January 1980 through May 2026.

Every parent knows that preparing meals is not simply a matter of minimizing cost. If it were, the solution would be beans and broccoli every night. Until this exercise, I had no idea broccoli was considered such a nutritional powerhouse. To make the problem more realistic, I added minimum food requirements for meat, chicken, and other protein sources.

The results below show that over time there is little if any substitution between food groups based on cost. The results also show that as in the above chart the cost feeding a family of four as percent of income has steadily declined. What the study does not show is the substition effect of dining inside the home versus dining at outside in fast-food resturants. Families must budget for time in preparing tthe food as both parents often work to make ends meet.

That study will be forthcoming. Meanwhile, eat your brocolli.

Run the complete analysis in RainbowStats

Optimized Results

Linear Programming Solution

Status: Optimal
Objective Value: 39.0772
Problem: Minimize
Dimensions: 58 constraints, 26 variables

Decision Variables

VariableValue
White_Rice1
Spaghetti_and_Macaroni1
White_Bread2
Chocolate_Chip_Cookies0
Ground_Beef1
Ribeye_Steak0.5
Stew_Beef0.5
Bacon_Sliced0
Boneless_Ham0
Whole_Chicken1
Frozen_Turkey2
Eggs1.1016
Whole_Milk0
Cheddar_Cheese0.2617
Oranges0
Strawberries0
Potatoes2
Field_Grown_Tomatoes0
Cabbage2
Yellow_Onions1
Broccoli0.75
Frozen_Orange_Juice0
Dried_Beans2
Pork_Chops0
Chicken_Breast0
Butter0

Constraint Analysis

ConstraintSenseActivityRHSSlackStatus
LowerBound_White_Rice101Slack
UpperBound_White_Rice110Binding
LowerBound_Spaghetti_and_Macaroni10.50.5Slack
UpperBound_Spaghetti_and_Macaroni110Binding
LowerBound_White_Bread202Slack
UpperBound_White_Bread22-0Binding
LowerBound_Chocolate_Chip_Cookies000Binding
UpperBound_Chocolate_Chip_Cookies022Slack
LowerBound_Ground_Beef10.50.5Slack
UpperBound_Ground_Beef110Binding
LowerBound_Ribeye_Steak0.50.50Binding
UpperBound_Ribeye_Steak0.510.5Slack
LowerBound_Stew_Beef0.50.50Binding
UpperBound_Stew_Beef0.521.5Slack
LowerBound_Bacon_Sliced000Binding
UpperBound_Bacon_Sliced011Slack
LowerBound_Boneless_Ham000Binding
UpperBound_Boneless_Ham011Slack
LowerBound_Whole_Chicken101Slack
UpperBound_Whole_Chicken110Binding
LowerBound_Frozen_Turkey20.51.5Slack
UpperBound_Frozen_Turkey220Binding
LowerBound_Eggs1.101601.1016Slack
UpperBound_Eggs1.101620.8984Slack
LowerBound_Whole_Milk000Binding
UpperBound_Whole_Milk022Slack
LowerBound_Cheddar_Cheese0.26170.250.0117Slack
UpperBound_Cheddar_Cheese0.261721.7383Slack
LowerBound_Oranges000Binding
UpperBound_Oranges022Slack
LowerBound_Strawberries000Binding
UpperBound_Strawberries022Slack
LowerBound_Potatoes202Slack
UpperBound_Potatoes220Binding
LowerBound_Field_Grown_Tomatoes000Binding
UpperBound_Field_Grown_Tomatoes022Slack
LowerBound_Cabbage202Slack
UpperBound_Cabbage220Binding
LowerBound_Yellow_Onions101Slack
UpperBound_Yellow_Onions110Binding
LowerBound_Broccoli0.7500.75Slack
UpperBound_Broccoli0.750.750Binding
LowerBound_Frozen_Orange_Juice000Binding
UpperBound_Frozen_Orange_Juice011Slack
LowerBound_Dried_Beans202Slack
UpperBound_Dried_Beans220Binding
LowerBound_Pork_Chops000Binding
UpperBound_Pork_Chops022Slack
LowerBound_Chicken_Breast000Binding
UpperBound_Chicken_Breast011Slack
LowerBound_Butter000Binding
UpperBound_Butter022Slack
ProteinReq497.221548017.2215Slack
CaloriesReq9,254.15077,2002,054.1507Slack
IronReq54540Binding
CalciumReq3,0003,000-0Binding
FiberReq92.457517.45Slack
VitaminCReq348.1225123.1Slack
4/9 • Slide 4

Ingredients

UseNameSeriesProteinCaloriesIronCalciumVitamen CFiberFatCarbsMinMax
trueWhite_RiceAPU000070131236.01680.07.232.00.06.43.6368.00.01.0
trueSpaghetti_and_MacaroniAPU000070132213.0371.01.620.00.03.21.575.00.51.0
trueWhite BreadAPU000070211140.01200.04.5120.00.08.012.0220.00.02.0
trueChocolate_Chip_CookiesAPU00007024215.0480.01.540.00.02.022.065.00.02.0
trueGround_BeefAPU000070311277.01136.05.418.00.00.088.00.00.51.0
trueRibeye_SteakAPU000070342523.0290.02.615.00.00.022.00.00.51.0
trueStew_BeefAPU000070343226.0250.02.615.00.00.017.00.00.52.0
trueBacon SlicedAPU000070411112.0231.00.45.00.00.020.00.00.01.0
trueBoneless_HamAPU000070431221.0145.01.010.00.00.06.01.00.01.0
trueWhole_ChickenAPU000070611180.0680.02.420.00.00.040.00.00.01.0
trueFrozen_TurkeyAPU000070631130.0135.01.415.00.00.01.00.00.52.0
trueEggsAPU000070811112.6143.01.7556.00.00.09.51.10.02.0
trueWhole_MilkAPU00007091123.261.00.0113.00.00.03.34.80.02.0
trueCheddar_CheeseAPU0000710212113.01820.00.77200.00.00.0150.07.00.252.0
trueOrangesAPU00007113110.947.00.140.053.22.40.112.00.02.0
trueStrawberriesAPU00007114153.0145.01.460.098.09.01.035.00.02.0
truePotatoesAPU00007121128.1349.02.734.044.87.60.480.80.02.0
trueField_Grown_TomatoesAPU00007123111.632.00.518.017.02.20.47.00.02.0
trueCabbageAPU00007124011.122.00.540.036.62.20.15.20.02.0
trueYellow_OnionsAPU00007124044.9183.01.379.012.36.80.242.30.01.0
trueBroccoliAPU000071241213.1154.02.7180.0220.013.41.731.30.00.75
trueFrozen_Orange_JuiceAPU00007131110.745.00.220.050.00.20.210.40.01.0
trueDried_BeansAPU000071423321.6347.05.1143.04.015.21.263.40.02.0
truePork_ChopsAPU0000FD310127.0242.00.910.00.00.014.00.00.02.0
trueChicken BreastAPU0000FF110192.0499.01.315.00.00.011.00.00.01.0
trueButterAPU0000FS11010.53216.00.024.00.00.0365.00.10.02.0
1/9 • Slide 1

RainbowStats combines econometric modeling with interactive visualization to help identify these changing relationships, allowing users to move beyond static models and explore how the economy behaves across different regimes.