Practice: Recurring Shapes of Linear Programs

Recognition · Interpretation

A haulage firm is told: "Each depot must receive at least its scheduled tonnage. Dispatch at the lowest fuel cost." Which shape is this, and on what evidence?

2 hints available, least help first.

Hint 1: Retrieval cue

Which phrase in the description states something that must be achieved, rather than something that is scarce?

Hint 2: Concept cue

Read the two halves separately: one fixes the direction of the constraints, the other the direction of the objective.

Construction · Direct application

A dairy has 480 litres of milk and 90 worker-hours this week. A batch of yoghurt uses 12 litres and 1.5 worker-hours and contributes £9; a batch of cheese uses 30 litres and 3 worker-hours and contributes £21. A supermarket contract obliges the dairy to deliver at least 8 batches of cheese. Maximise contribution.

(a) Name the shape, including anything hybrid about it, and say which clause makes it so.

(b) Write the program, keeping each restriction in the direction the description states it.

(c) The shape predicts which constraints will bind. Test that prediction at the point where both resources are exhausted, and say whether the contract row is satisfied there.

(d) Suppose the contract instead required at least 14 batches of cheese. Say what happens to the point you found, and which constraint then binds in its place.

Write your answer, then compare it with the worked solution.

3 hints available, least help first.

Hint 1: Retrieval cue

Which clause states an obligation rather than a limit, and which direction does an obligation take?

Hint 2: Concept cue

Solve the two resource rows as simultaneous equalities before assuming they meet somewhere usable.

Hint 3: Strategy cue

When a predicted corner comes out negative, check each resource separately: how much of each product would exhaust it, and whether the other resource permits that.

Compare with the worked solution

Comparing does not record a result. Judging your own written answer cannot show that you can do this without help.

(a) The shape. Predominantly packing: "has 480 litres and 90 worker-hours" is capacity language and the objective maximises. The contract clause, "at least 8 batches of cheese", is a requirement floor, so the problem is a hybrid carrying one covering row among its packing rows. (b) The program. Let y and c be batches of yoghurt and cheese this week.

max 9 y + 21 c s.t. 12 y + 30 c ≤ 480 , 1.5 y + 3 c ≤ 90 , c ≥ 8 , y , c ≥ 0 .

The contract row stays ≥ . Negating it to make every row read ≤ would state a ceiling of 8 batches, which is the opposite of the obligation. (c) Testing the prediction. Set both resource rows to equalities:

12 y + 30 c = 480 , 1.5 y + 3 c = 90 .

From the second, y = 60 − 2 c . Substituting: 12 ( 60 − 2 c ) + 30 c = 720 + 6 c = 480 , giving c = − 40 . That is negative, so the two resource rows do not intersect in the nonnegative quadrant and the prediction fails in a specific way: the resources cannot both be exhausted. Checking which is the real limit, milk alone allows at most 480 / 12 = 40 batches of yoghurt, needing 1.5 ( 40 ) = 60 worker-hours of the 90 available; labour alone allows 90 / 1.5 = 60 batches, needing 12 ( 60 ) = 720 litres, well beyond the 480. So milk binds and labour is slack throughout the region. With the contract at c = 8 : milk leaves 480 − 30 ( 8 ) = 240 litres, so y = 20 , using 1.5 ( 20 ) + 3 ( 8 ) = 54 worker-hours, 36 to spare. Contribution is 9 ( 20 ) + 21 ( 8 ) = 180 + 168 = 348 . Comparing contribution per litre of milk, yoghurt earns 9 / 12 = 0.75 and cheese 21 / 30 = 0.70 , so milk is better spent on yoghurt and the contract floor binds: the optimum is ( y , c ) = ( 20 , 8 ) with contribution 348 . (d) A tighter contract. At c = 14 , milk leaves 480 − 30 ( 14 ) = 60 litres, so y = 5 , and labour uses 1.5 ( 5 ) + 3 ( 14 ) = 49.5 hours, still slack. Contribution falls to 9 ( 5 ) + 21 ( 14 ) = 45 + 294 = 339 . The binding pair is again the milk row and the contract row; the contract has simply moved, and each extra obliged batch of cheese costs the dairy contribution because it displaces the more milk-efficient product. What the exercise shows. The shape's prediction, that the scarce resources bind, is a prediction, not a theorem. Here one resource is slack at every feasible point, and the binding pair is one resource and the covering row. Noticing that is the useful outcome: the dairy's constraint is milk and its contract, not labour.

A complete answer does each of these:

  • names the shape
  • recognises hybrid
  • states directions

Error diagnosis · Explanation

A colleague models a clinic's staffing week. The description reads: "Each of the three shifts must be covered by at least 4, 6 and 3 nurses respectively. Nurses work one of two patterns; pattern A costs £620 a week and covers shifts 1 and 2, pattern B costs £700 and covers shifts 2 and 3. Meet the cover at least cost."

The submitted model is

max 620 n A + 700 n B s.t. n A ≤ 4 , n A + n B ≤ 6 , n B ≤ 3 , n A , n B ≥ 0 .

The solver returns n A = 3 , n B = 3 , objective 3960 , status optimal.

(a) Name the shape the description has, and the shape the model was written in.

(b) Identify every direction that is wrong, and say what each wrong row asserts about the clinic.

(c) Explain why the solver reported success, and what that says about using a clean solver status as evidence of a correct model.

(d) Write the model the description asks for, and name the terminal outcome its shape makes most likely.

Write your answer, then compare it with the worked solution.

3 hints available, least help first.

Hint 1: Retrieval cue

Read each constraint aloud as an English sentence about nurses, and compare it with the description.

Hint 2: Concept cue

Check the reported answer against the stated requirements one shift at a time.

Hint 3: Strategy cue

Ask what a solver's status message is a statement about: the program it received, or the problem someone meant to pose.

Compare with the worked solution

Comparing does not record a result. Judging your own written answer cannot show that you can do this without help.

(a) The two shapes. The description is a covering problem: "must be covered by at least" states requirement floors, and "at least cost" minimises. The model is written as a packing problem, maximisation with ≤ rows throughout. Every direction has been inverted. (b) What each wrong row asserts. | Row as written | What it asserts | What the description says |
|---|---|---|
| max 620 n A + 700 n B | spend as much as possible | spend as little as possible |
| n A ≤ 4 | at most 4 nurses may cover shift 1 | at least 4 must |
| n A + n B ≤ 6 | at most 6 may cover shift 2 | at least 6 must |
| n B ≤ 3 | at most 3 may cover shift 3 | at least 3 must | Read back as sentences, the model instructs the clinic to cap its cover and maximise its wage bill. The reported answer, n A = 3 and n B = 3 , leaves shift 1 with 3 nurses against a requirement of 4. The model's "optimum" is infeasible for the actual problem. (c) Why the solver was satisfied. A solver optimises the program it is handed. Reversed inequalities and a flipped objective produce a perfectly well-formed linear program: the feasible set is nonempty and bounded, so an optimum exists and is found. "Status: optimal" is a statement about the program, never about whether the program matches the description. No arithmetic check can catch this class of error, because the arithmetic is not wrong. The check that catches it is reading each row back as a sentence and asking whether the description says that, and noticing that a covering problem's model should have come out with ≥ rows and a minimisation. (d) The model as described.

min 620 n A + 700 n B s.t. n A ≥ 4 , n A + n B ≥ 6 , n B ≥ 3 , n A , n B ≥ 0 .

The covering shape makes infeasibility the outcome to watch for: it cannot run to − ∞ , since costs are positive and the objective is bounded below by zero. Here it is feasible, n A = 4 , n B = 3 satisfies all three rows, since 4 + 3 = 7 ≥ 6 , at cost 620 ( 4 ) + 700 ( 3 ) = 2480 + 2100 = 4580 . Both single-shift rows bind and the shift-2 row is slack, which is the covering shape behaving as expected: cover is bought only where it is required. A fuller answer notes that nurses come in whole numbers, so the correct model is an integer program; the linear relaxation happens to have an integral optimum here, which is luck rather than a property of the formulation.

A complete answer does each of these:

  • names the shape
  • states directions
  • predicts the failure

Classification · Method selection · Explanation

For each description below, name the shape, quote the wording that fixes it, state the direction of the objective and of the constraints, and name the terminal outcome the shape makes most likely.

(a) A water authority must supply at least 40 Ml/day to the north zone and at least 25 Ml/day to the south. Three sources can each feed either zone at different pumping costs. Minimise pumping cost.

(b) A print shop has 60 press-hours and 3,000 sheets this week. A run of leaflets uses 0.5 press-hours and 40 sheets and earns £22; a run of posters uses 1.5 press-hours and 30 sheets and earns £48. Earn as much as possible.

(c) A regional fund of £12m must be placed entirely across four programmes. No programme may take less than 5% or more than 40% of the fund. Programmes have different measured benefit per pound. Maximise total benefit.

(d) One of the three descriptions would change shape if a single clause were added. Choose one, state the clause, and say what the description becomes.

Write your answer, then compare it with the worked solution.

3 hints available, least help first.

Hint 1: Retrieval cue

In each description, find the clause that says what must be achieved or what is scarce, before looking at any number.

Hint 2: Concept cue

A fixed total that must be placed entirely is an equality, not a ceiling. Ask whether the description permits leaving part of it unused.

Hint 3: Strategy cue

For the failure, ask which is possible at all: a problem with nonnegative costs and floors cannot run to − ∞ , and a problem where doing nothing is feasible cannot be infeasible.

Compare with the worked solution

Comparing does not record a result. Judging your own written answer cannot show that you can do this without help.

(a) Covering. The wording is "must supply at least 40 Ml/day … at least 25 Ml/day": requirement floors, one per zone. The objective minimises pumping cost; the constraints read ≥ . The likely failure is infeasibility, the three sources may not jointly be able to deliver 65 Ml/day, rather than unboundedness, which nonnegative costs rule out. Expect the optimum to meet both floors exactly, since any surplus is pumped and paid for without being required. (b) Packing. The wording is "has 60 press-hours and 3,000 sheets": capacities, stated as what exists. The objective maximises earnings; the constraints read ≤ . The likely failure is unboundedness, which would arise if some run consumed no limited resource, not a risk here, since both runs use press-hours and sheets. Infeasibility is near-impossible because printing nothing is feasible. Expect the binding constraints to be the press-hours, the sheets, or both. (c) Allocation. The wording is "must be placed entirely" together with per-programme floors and caps. The total is an equality, ∑ j w j = 12 , and the restrictions are bounds on individual shares rather than further rows mixing the variables. The objective maximises benefit. The likely failure is infeasibility from the bounds. It would arise if the floors summed above the fund or the caps summed below it. Here four floors of 5% sum to 20% and four caps of 40% sum to 160%, so the fund is reachable and the problem is feasible. Expect the optimum to push the best programme to its 40% cap and the worst to its 5% floor. (d) One clause that changes a shape. Several answers are defensible; the requirement is that the clause changes a direction, not a coefficient. Taking (b): add "a standing contract requires at least 12 runs of posters each week." The problem becomes a hybrid, predominantly packing, with the two resource ceilings as ≤ rows, now carrying one covering row y posters ≥ 12 . It must be written with both directions present. Forcing the contract into a ≤ row to keep the system uniform would assert a ceiling of 12 runs, which the description does not say, and the resulting program would solve cleanly while quietly breaching the contract. The hybrid also admits a failure neither pure shape has: if the contract required more poster runs than the press-hours allow, the problem would be infeasible, where a pure packing problem essentially never is. Taking (a) instead: add "no source may pump more than 30 Ml/day." That adds packing rows to a covering problem and creates the same possibility, floors that the capped sources cannot jointly reach.

A complete answer does each of these:

  • names the shape
  • cites the language
  • states directions
  • recognises hybrid
  • predicts the failure
Practice data

Your practice record is stored in this browser only. Clearing it removes every answer and every scheduled review, and cannot be undone.

Results update as you type. Use the up and down arrow keys to move between results, Enter to open one, and Escape to close.

Type to search.

Settings

Appearance

Interface density

Your record

Your progress is stored in this browser and nowhere else: an identifier, the answers you have given, the mastery states and review schedule derived from them, and the lesson you last opened. Clearing it makes you a new learner on this device. It cannot be undone, and it will not affect your appearance or density settings.

Focus timer

Focus--minutes remaining

Phase

Kept in this browser only, and used to label the session in your own history.

Today

Nothing recorded yet. Finish a focus session and it will appear here.

Settings

Focus sessions between long breaks.

Sessions you are aiming for in a day.

Notifications

Your history

Sessions are stored in this browser and nowhere else. They are not evidence and never reach your mastery record.