IA idea · Optimisation & linear programming
The cheapest healthy weekly shop: a linear programming diet problem
Research question
Using nutrition labels and supermarket prices for ten foods you actually eat, what is the cheapest weekly basket that meets chosen targets for energy, protein and fibre without exceeding a salt limit, and how realistic is it?
Make it yours, then agree it with your teacher.
Next step: plan this IA free — the planner opens with this question filled in. For feedback on your own draft, the IA package (€39 once) gives you 5 AI feedback credits and every annotated exemplar in full.
Why it makes a good exploration
The diet problem is one of the oldest uses of linear programming. Doing it with your own shopping basket produces a strange, cheap answer that is rich material for reflection: why would nobody eat it?
The mathematics you'll need
- Setting up an objective function and several linear constraints
- Linear programming with more than two variables (solver, explained on a two-food version by hand)
- Shadow prices: how much the cost rises if a constraint tightens
- Sensitivity of the solution to price changes
Where the data comes from
Read prices and nutrition labels for ten foods from a supermarket website or the shelf; record the date. Take nutrient targets from a public health source in your country and cite it.
- Desmos graphing calculator — Free graphing and regression (y₁ ~ ax₁ + b) — fit models to your data and show residuals.
A possible outline
- Choose foods and targets and justify them.
- Solve a two-food version graphically to show how the method works.
- Solve the full problem with a spreadsheet solver and explain what it is doing.
- Add realistic constraints (variety, maximum portions) and compare costs.
- Test how sensitive the basket is to price changes and reflect on what cost does not capture.
Pitfalls that cost marks
- Letting a solver produce an answer you can't explain.
- Using nutrient targets without a source.
- Presenting an absurd basket without discussing why it is absurd.
Showing personal engagement
- Use your own family's usual foods.
- Compare the optimal basket with what you actually buy.
- Explore how much a vegetarian constraint adds to the cost.
See Criterion C: personal engagement for what examiners look for.
Which course is it for?
| Course | Fit | Maths to lean on |
|---|---|---|
| AA SL | Good fit | Setting up an objective function and several linear constraints; Linear programming with more than two variables (solver, explained on a two-food version by hand) |
| AA HL | Not a natural fit | The mathematics is mainly from the AI course; at AA HL the exploration would need an AA-level approach (calculus, proof or probability theory) to reach the top of Criterion E. |
| AI SL | Good fit | Setting up an objective function and several linear constraints; Linear programming with more than two variables (solver, explained on a two-food version by hand) |
| AI HL | Good fit | Setting up an objective function and several linear constraints; Linear programming with more than two variables (solver, explained on a two-food version by hand) |
Level: Solid. Needs some independent work beyond class examples. See how the IA differs between AA and AI, SL and HL.
How this idea reaches the top bands
Reflection (D)
For this idea, start with the weak points: letting a solver produce an answer you can't explain; and using nutrient targets without a source. Say how each one affects your answer.
Use of mathematics (E)
SL: setting up an objective function and several linear constraints; linear programming with more than two variables (solver, explained on a two-food version by hand); shadow prices: how much the cost rises if a constraint tightens; sensitivity of the solution to price changes, each explained in your own words and carried out correctly.
How optimisation explorations reach the top bands in general: Optimisation & linear programming IA ideas. Guides: A · B · C · D · E · self-grade sheet.
Taking it further
Compare the cost of meeting the same targets in two countries or two supermarkets, or add a taste-preference score as a second objective.
Extending it for HL
Add an HL technique the question genuinely needs: what an HL optimisation exploration adds.
See a complete IA, marked
Is it cheaper to leave the heating on low overnight? A two-temperature model of my bedroom (AI HL) is a complete optimisation exploration, marked on every criterion.
Frequently asked questions
Which IB Maths course is this IA idea for?
It works for AI SL, AI HL and AA SL. We rate it Solid: it needs some independent work beyond class examples.
What mathematics does this IA use?
Setting up an objective function and several linear constraints, linear programming with more than two variables (solver, explained on a two-food version by hand), shadow prices: how much the cost rises if a constraint tightens and sensitivity of the solution to price changes.
Where can I get data for this IA?
Read prices and nutrition labels for ten foods from a supermarket website or the shelf; record the date. Take nutrient targets from a public health source in your country and cite it. Checked sources and tools: Desmos graphing calculator.
Turn this idea into your IA
The planner opens with “The cheapest healthy weekly shop: a linear programming diet problem” filled in: the question, the maths and the data sources.
Your plan is kept in this browser. A free account keeps it with your drafts on any device: Join free · Sign in
Also: free IA self-check · A–E checklist (PDF) · have a draft? AI feedback or a review with Pete (€100)
Writing it up: how to write a Maths IA, step by step · structure and format · mistakes that cost marks · IA modelling, step by step
Similar ideas
- How few staff can a café roster? An integer programming rotaAI SLAI HLAA SLSolid
- What speed minimises the total cost of a long drive?AA SLAI SLAA HLAI HLSolid
- What price maximises profit at our school bake sale?AA SLAI SLAA HLAI HLSolid
- What is the cheapest way to hire coaches for a school trip?AA SLAI SLAA HLAI HLAccessible
All optimisation ideas · AI SL ideas · AI HL ideas · AA SL ideas · All 239 IA ideas