Math Lab
Home/Class XII/Ch 12/Diet and nutrition problems

Diet and nutrition problems

A diet problem is the quintessential cost-minimisation LPP. Each food contains certain amounts of nutrients (vitamins, minerals, proteins, calories). Each food costs a certain amount. The goal: select quantities of each food to satisfy daily nutritional requirements at minimum cost.

Structure

Decision variables: amounts of each food (in grams, units, servings, etc.).

Objective: minimise total cost Z=c1x1+c2x2+Z = c_1 x_1 + c_2 x_2 + \cdots, where cic_i is the cost per unit of food ii.

Constraints:

  • Nutritional minimums: ai1x1+ai2x2+bia_{i1} x_1 + a_{i2} x_2 + \cdots \ge b_i for each required nutrient ii, where aija_{ij} is the amount of nutrient ii in one unit of food jj and bib_i is the required total.
  • Non-negativity: xj0x_j \ge 0.

In Class XII the problem is two-dimensional (x1,x2x_1, x_2), so graphical solution applies.

Standard form

Let xx = units of Food A, yy = units of Food B. Each food contains nutrient amounts and costs given:

Vit AVit BCost
Food Aa1a_1b1b_1c1c_1
Food Ba2a_2b2b_2c2c_2
Need (per day)A\ge AB\ge B(min)

Minimise Z=c1x+c2yZ = c_1 x + c_2 y subject to:

  • a1x+a2yAa_1 x + a_2 y \ge A
  • b1x+b2yBb_1 x + b_2 y \ge B
  • x,y0x, y \ge 0.

The feasible region is unbounded (in the upper-right), but the minimum is attained at a corner , usually at the intersection of two binding constraints (or at an axis intersection if that's feasible).

Worked examples

Example 1. A diet must contain at least 8080 units of vitamin A and 100100 of B. Food F1 contains 44 A and 22 B per gram, F2 contains 22 A and 55 B per gram. F1 costs ₹55 per gram; F2 costs ₹22 per gram. Find the optimal diet.

Variables: xx grams F1, yy grams F2. Z=5x+2yZ = 5x + 2y.

  • 4x+2y804x + 2y \ge 80 (vit A)
  • 2x+5y1002x + 5y \ge 100 (vit B)
  • x,y0x, y \ge 0.

Constraint lines: 4x+2y=804x + 2y = 80 at (20,0),(0,40)(20, 0), (0, 40). 2x+5y=1002x + 5y = 100 at (50,0),(0,20)(50, 0), (0, 20).

Feasible region above both. Corners (with axes):

  • (50,0)(50, 0): check 4(50)=200804(50) = 200 \ge 80 ✓. Cost: 250250.
  • (0,40)(0, 40): check 5(40)=2001005(40) = 200 \ge 100 ✓. Cost: 8080.
  • Intersection: 4x+2y=80,2x+5y=1004x + 2y = 80, 2x + 5y = 100. Multiply first by 5: 20x+10y=40020x + 10y = 400. Multiply second by 2: 4x+10y=2004x + 10y = 200. Subtract: 16x=20016x = 200, x=12.5x = 12.5. Then 2(12.5)+5y=1002(12.5) + 5y = 100, so 5y=755y = 75, y=15y = 15. Cost: 5(12.5)+2(15)=62.5+30=92.55(12.5) + 2(15) = 62.5 + 30 = 92.5.

Min Z=80Z = 80 at (0,40)(0, 40). Optimal diet: 4040 grams of F2, no F1.

Example 2. A patient is advised to consume at least 1212 units of vitamin C and 2020 of D daily. Pill X has 44 C, 55 D, cost ₹1010/pill. Pill Y has 33 C, 66 D, cost ₹1515/pill.

Variables: xx X-pills, yy Y-pills. Z=10x+15yZ = 10x + 15y. Constraints: 4x+3y124x + 3y \ge 12, 5x+6y205x + 6y \ge 20, x,y0x, y \ge 0.

Lines: 4x+3y=124x + 3y = 12 at (3,0),(0,4)(3, 0), (0, 4). 5x+6y=205x + 6y = 20 at (4,0),(0,10/3)(4, 0), (0, 10/3).

Corners (on axes): (4,0)(4, 0) (y=0y = 0, larger from first; check 5(4)+0=20205(4) + 0 = 20 \ge 20 ✓). (0,4)(0, 4) (x=0x = 0, larger from first; check 5(0)+6(4)=24205(0) + 6(4) = 24 \ge 20 ✓). Intersection: 4x+3y=12,5x+6y=204x + 3y = 12, 5x + 6y = 20. Multiply first by 2: 8x+6y=248x + 6y = 24. Subtract second: 3x=4,x=4/3,y=(1216/3)/3=(20/3)/3=20/93x = 4, x = 4/3, y = (12 - 16/3)/3 = (20/3)/3 = 20/9. Check non-negative: yes. Cost: 40/3+100/313/340/3 + 100/3 \cdot 1 \cdot 3/3 ... let me recompute: 10(4/3)+15(20/9)=40/3+300/9=120/9+300/9=420/9=46.6710(4/3) + 15(20/9) = 40/3 + 300/9 = 120/9 + 300/9 = 420/9 = 46.67.

Values: (4,0):40(4, 0): 40; (0,4):60(0, 4): 60; (4/3,20/9):46.67(4/3, 20/9): 46.67. Minimum Z=40Z = 40 at (4,0)(4, 0).

Example 3. Doctor prescribes a diet with 15001500 calories and 4040 g of protein at minimum. Food P: 300300 cal/serving, 55 g protein, ₹88/serving. Food Q: 150150 cal/serving, 1010 g protein, ₹33/serving. Minimise cost.

xx servings P, yy servings Q. Z=8x+3yZ = 8x + 3y. Constraints: 300x+150y1500300x + 150y \ge 1500 (i.e. 2x+y102x + y \ge 10), 5x+10y405x + 10y \ge 40 (i.e. x+2y8x + 2y \ge 8), x,y0x, y \ge 0.

Lines: 2x+y=102x + y = 10 at (5,0),(0,10)(5, 0), (0, 10). x+2y=8x + 2y = 8 at (8,0),(0,4)(8, 0), (0, 4). Intersection: from first y=102xy = 10 - 2x, sub: x+204x=8x + 20 - 4x = 8, 3x=12-3x = -12, x=4x = 4, y=2y = 2.

Corners: (0,10)(0, 10) (check 0+2080 + 20 \ge 8 ✓). (4,2)(4, 2). (8,0)(8, 0) (check 16+01016 + 0 \ge 10 ✓).

Costs: (0,10):30(0, 10): 30. (4,2):32+6=38(4, 2): 32 + 6 = 38. (8,0):64(8, 0): 64. Min Z=30Z = 30 at (0,10)(0, 10).

Example 4. A pet food must contain at least 3030 g protein, 2020 g fat. Beef supplies 44 g protein, 22 g fat per scoop. Grain supplies 22 g protein, 44 g fat per scoop. Beef costs ₹44/scoop, grain ₹33/scoop.

xx beef, yy grain. Z=4x+3yZ = 4x + 3y. 4x+2y304x + 2y \ge 30, 2x+4y202x + 4y \ge 20, x,y0x, y \ge 0.

Simplify: 2x+y152x + y \ge 15, x+2y10x + 2y \ge 10. Lines: 2x+y=152x + y = 15 at (7.5,0),(0,15)(7.5, 0), (0, 15). x+2y=10x + 2y = 10 at (10,0),(0,5)(10, 0), (0, 5).

Intersection of 2x+y=15,x+2y=102x + y = 15, x + 2y = 10: multiply first by 2: 4x+2y=304x + 2y = 30. Subtract: 3x=20,x=20/3,y=1540/3=5/33x = 20, x = 20/3, y = 15 - 40/3 = 5/3.

Axis corners: (10,0)(10, 0) (y=0y = 0, larger of two; check 20+01520 + 0 \ge 15 ✓). (0,15)(0, 15) (x=0x = 0, larger of two; check 0+30100 + 30 \ge 10 ✓).

Costs: (10,0):40(10, 0): 40. (0,15):45(0, 15): 45. (20/3,5/3):80/3+5=95/331.67(20/3, 5/3): 80/3 + 5 = 95/3 \approx 31.67. Min Z31.67Z \approx 31.67 at (20/3,5/3)(20/3, 5/3).

Example 5. A child's tonic must provide 8080 mg vitamin C and 200200 mg minerals daily. Brand A: 55 mg C, 2020 mg minerals per spoon, ₹22. Brand B: 1010 mg C, 1010 mg minerals per spoon, ₹33.

xx A, yy B. Z=2x+3yZ = 2x + 3y. 5x+10y805x + 10y \ge 80 (i.e. x+2y16x + 2y \ge 16), 20x+10y20020x + 10y \ge 200 (i.e. 2x+y202x + y \ge 20), x,y0x, y \ge 0.

Intersection: from first x=162yx = 16 - 2y. Sub second: 324y+y=2032 - 4y + y = 20, 3y=12-3y = -12, y=4,x=8y = 4, x = 8.

Axis points: (16,0)(16, 0) , check 2(16)202(16) \ge 20 ✓. (0,20)(0, 20) , check 0+40160 + 40 \ge 16 ✓.

Costs: (16,0):32(16, 0): 32. (0,20):60(0, 20): 60. (8,4):28(8, 4): 28. Min Z=28Z = 28 at (8,4)(8, 4).

Example 6. A blood-replacement formula needs 3030 units of iron, 4040 units of vitamin B12. Solution P: 55 iron, 44 B12 per ml, ₹66/ml. Solution Q: 33 iron, 88 B12 per ml, ₹44/ml.

xx P, yy Q. Z=6x+4yZ = 6x + 4y. 5x+3y305x + 3y \ge 30, 4x+8y404x + 8y \ge 40 (i.e. x+2y10x + 2y \ge 10), x,y0x, y \ge 0.

Intersection: 5x+3y=30,x+2y=105x + 3y = 30, x + 2y = 10. From second x=102yx = 10 - 2y. Sub: 5010y+3y=3050 - 10y + 3y = 30, 7y=20-7y = -20, y=20/7y = 20/7, x=1040/7=30/7x = 10 - 40/7 = 30/7.

Axis corners: (6,0)(6, 0) , 5(6)=30305(6) = 30 \ge 30 ✓, 6+0106 + 0 \ge 10 ✗ (6<106 < 10). Infeasible. (10,0)(10, 0) , 5(10)=50305(10) = 50 \ge 30 ✓, 101010 \ge 10 ✓. ✓. (0,10)(0, 10) , 0+30300 + 30 \ge 30 ✓, 0+20100 + 20 \ge 10 ✓. ✓. (Also (0,5)(0, 5) on second only? 0+15<300 + 15 < 30, infeasible.)

Costs: (10,0):60(10, 0): 60. (0,10):40(0, 10): 40. (30/7,20/7):180/7+80/7=260/737.14(30/7, 20/7): 180/7 + 80/7 = 260/7 \approx 37.14. Min Z=260/7Z = 260/7 at (30/7,20/7)(30/7, 20/7).

Try it yourself

  1. A mixture needs at least 300300 g of protein and 200200 g of carbs. Food A: 1010 protein, 2020 carbs per scoop, ₹55. Food B: 2020 protein, 1010 carbs per scoop, ₹88.
  2. Vitamin tablet X: 44 A, 33 B, ₹55. Tablet Y: 33 A, 44 B, ₹33. Need 2020 A, 2424 B. Minimise.
  3. Lunchbox: 15001500 cal, 8080 g protein. Item A: 300300 cal, 2020 g protein, ₹1010. Item B: 400400 cal, 1010 g protein, ₹1212.
  4. Dietary supplement: at least 400400 mg calcium, 3030 mg iron. Tablet 1: 5050 Ca, 55 Fe, ₹88. Tablet 2: 100100 Ca, 22 Fe, ₹66.
  5. Diet of two foods: 55 protein and 44 vitamin C per 100 g of F1 costing ₹5050. 33 protein and 55 vit C per 100g of F2 costing ₹4040. Need at least 3030 protein, 4040 vit C daily.
  6. Two cereals. C1: 200200 cal, 1010 g protein/cup, ₹44. C2: 300300 cal, 55 g protein/cup, ₹66. Need 18001800 cal, 5050 g protein. Minimise.
  7. Pet food: 4040 g protein, 3030 g fat min. Mix A: 55 p, 33 f per oz, ₹11. Mix B: 44 p, 55 f per oz, ₹22. Minimise.
  8. Diet of pills. Each pill of type 1: 2525 mg vit C, 44 mg vit D, costs ₹22. Type 2: 1515 mg vit C, 66 mg vit D, costs ₹11. Need 100100 vit C, 4040 vit D.
  9. Hospital diet must include at least 2020 g of nutrient I and 2020 g of nutrient II daily. Food P provides 44 g I, 22 g II per unit, costs ₹33. Food Q: 11 g I, 44 g II per unit, costs ₹22. Minimise cost.
  10. Infant formula. Type X: 1010 proteins, 55 minerals per scoop, ₹1515. Type Y: 44 proteins, 88 minerals per scoop, ₹1010. Daily need: 3030 proteins, 3030 minerals.
  11. Health bar combinations. Bar A: 200200 cal, 55 g sugar per piece, ₹22. Bar B: 300300 cal, 1010 g sugar, ₹33. Need at least 12001200 cal but at most 2020 g sugar. Minimise cost. (Note: this has a \le constraint too.)
  12. Two ointments. Ointment P: 33 active per ml, ₹55. Q: 55 per ml, ₹88. Need at least 3030 active over a week of treatment. Minimise cost (only constraint: total volume 10\le 10 ml).
  13. Vitamin gummies. A: 44 vit C, 22 zinc per gummy, ₹22. B: 11 vit C, 55 zinc per gummy, ₹11. Daily: 2020 vit C, 1515 zinc.
  14. A weight-loss meal: max 500500 cal, min 2020 g protein. Food P: 200200 cal, 1010 g protein, ₹3030. Food Q: 150150 cal, 55 g protein, ₹2020. Minimise cost. (Has both \le and \ge constraints!)

Pitfalls and tricks

  • Consistent units. Convert everything to a single unit (grams, calories, etc.) before setting up constraints.
  • Diet problems usually have \ge constraints for nutritional needs , unbounded region, but minimum exists.
  • Axis corners may be feasible. Always check them , sometimes the cheapest diet uses just one food.
  • Sketch carefully: too rough a sketch may make you miss a corner.
  • Compute ZZ at the intersection corner carefully , it's often where the minimum lies.

Test Your Knowledge

Quick MCQ check on this chapter

Start Quiz →

AI Summary

Summarize this page in your favorite LLM