The Water Butt Is the Boss: Linear Programming on a Leicester Allotment
Photo by Photo by BEN ELLIOTT on Unsplash on Unsplash
Late November is when allotment holders do their best maths. The beds are mostly empty, the seed catalogues are on the kitchen table, and every plan sounds brilliant because nothing has been eaten by slugs yet.
This is the moment to plan properly — and the planning is a linear programming problem wearing a woolly hat. Let's build one from scratch.
The plot, and the four numbers that rule it
Picture a Leicester plot with 24 square metres of usable bed space. Say it's 6 metres by 4 metres of good soil plus a strip down the side; the exact shape doesn't matter, the area does.
We'll plant two things:
- Tomatoes — high value, sun worshippers, thirsty
- Kale — hardy, tolerant of shade, cheap to water, and the only green anyone in the house actually eats in February
Let t be the square metres of tomatoes and k the square metres of kale. Four constraints, straight from the site:
- Space. t + k ≤ 24
- Sunlight. Only about 10 m² gets six or more hours of midsummer sun, and tomatoes sulk without it: t ≤ 10
- Water. The butt holds enough for 32 watering cans a week. Tomatoes need two cans per square metre per week, kale needs one: 2t + k ≤ 32
- The kitchen. We want greens all winter, so at least 6 m² of kale: k ≥ 6
Plus the obvious: t ≥ 0 and k ≥ 0.
Why the water constraint looks lopsided
Every inequality should be able to explain itself in plain English. The 2t + k line says: a square metre of tomatoes costs twice as much water as a square metre of kale. That's not arbitrary — it's the number you get by standing at the butt with a can and counting.
This is the bit worth doing with children before any algebra appears. Measure one watering can. Water a square metre of bed. Count the cans. Suddenly the coefficient 2 isn't a symbol off a worksheet, it's a fact about your own garden.
Drawing the feasible region
On a grid with t across and k up, each inequality knocks out half the plane. The surviving shape — the feasible region — is every planting plan that doesn't break the rules.
Work the corners. Boundary lines meet where two constraints are both tight:
- k = 6 with t = 0 gives (0, 6)
- k = 6 with t = 10 gives (10, 6)
- t = 10 with 2t + k = 32 gives (10, 12)
- 2t + k = 32 with t + k = 24 gives (8, 16)
- t + k = 24 with t = 0 gives (0, 24)
Five corners, forming a pentagon. Test one interior point to check you've shaded the right side — (5, 10) satisfies every rule, so the region is the one containing it.
Scoring the corners
Now we need something to maximise. Give each crop a points value per square metre, reflecting what the household actually gets out of it: tomatoes 5 points, kale 3 points. Score P = 5t + 3k.
| Corner (t, k) | What it means | Score 5t + 3k |
|---|---|---|
| (0, 6) | All kale, minimum greens | 18 |
| (10, 6) | Maximum sun, minimum kale | 68 |
| (10, 12) | Sunny corner, water just holds | 86 |
| (8, 16) | Space and water both maxed | 88 |
| (0, 24) | A kale farm, no tomatoes | 72 |
The best plan is 8 m² of tomatoes and 16 m² of kale, scoring 88. Not the sunniest corner, not the biggest tomato patch. Just the point where space and water run out at exactly the same moment.
That is the fundamental theorem of linear programming doing its quiet work: the optimum lives on a corner of the feasible region, so you only ever have to test a handful of points.
Reading the answer like a gardener
Look at which constraints did the work. Space: binding. Water: binding. Sunlight and the family's kale minimum: slack, with room to spare. In other words, the water butt decides your allotment, not the fence and not the sun.
That immediately raises the useful question. What if you bought a second butt?
Relax the water constraint to 2t + k ≤ 44 and the pentagon changes shape. Water stops being a limit, the sunniest strip becomes the best place to be, and the optimum shifts to (10, 14) with a score of 92.
Four extra points for one water butt. Is that worth the money? Only you can price a point — and that's a conversation about marginal value that a ten-year-old can have quite happily at the kitchen table.
A printable planning sheet
Make a one-page sheet for each child or pair:
- A grid from 0 to 26 on both axes, 1 cm squares
- The four constraints in words at the top, with a space to write the inequality underneath each one
- A blank 2×2 table headed "crop", "m²", "points per m²", "total"
- A corner-testing table with five empty rows
- A "what if?" strip at the bottom: extra water butt, a shady summer, a household that wants more tomatoes, a neighbour giving away a spare bed
Rulers out, colour the feasible region, then argue about whether the answer matches what the family actually wants to eat. It usually doesn't, and that argument is the best part of the lesson.
Where the model stops
Linear programming assumes straight lines: double the area, double the water. Real beds have edges, paths, shade that moves, crop rotation, blight and a fox with opinions. The model won't grow your tomatoes.
What it will do is stop you planting the entire plot with one crop and then discovering, in July, that you've run out of water in week three. That's worth a page of graph paper any day.