8 of 9

LESSON 4 · Algebra Unlocked

Design Your Own Diet

Try a mini linear-programming problem. You want to minimize cost while meeting two rules: at least 60 grams of protein and at most $10 per day. Rice costs $1/cup with 5g protein. Chicken costs $4/100g with 30g protein.

Let r = cups of rice, c = 100g portions of chicken. Set up two inequalities: 5r + 30c ≥ 60 (protein) and r + 4c ≤ 10 (budget).

Try (r=0, c=2): protein 60, cost $8. Try (r=6, c=1): protein 60, cost $10. Try (r=12, c=0): cost $12 — over budget. The minimum-cost feasible combo sits at (0, 2) — two chicken portions, $8.

The same logic — minimize inside inequality boundaries — is what a grocery-delivery app's route planner solves every second of the day.