Worked examples · Linear Programming
Linear Programming, Worked Examples (KBAT)
These hard Linear Programming examples ask you to hold two ideas at once: a full modelling problem that builds four constraints and maximises a whole-number profit, a case where the objective runs parallel to an edge so the maximum is shared along it, and a question that treats a coefficient as unknown and finds the range that keeps the optimum at one vertex. Work each fully before reading on.
What these examples cover
These hard Linear Programming examples ask you to hold two ideas at once. The first is a full modelling problem: read two resource limits and two display rules, turn them into four inequalities, find every corner of the resulting region, then maximise a profit, and confirm the answer is a whole number, as the context demands.
The second and third add a genuine KBAT twist: one shows what happens when the objective runs parallel to an edge, so the maximum is shared along a whole edge rather than pinned to a single corner; the other treats a coefficient as unknown and asks for the range that keeps the optimum at one particular vertex. Attempt each fully before reading on.
Worked examples
Work through all three. The method is the same as ever, boundaries, corners, objective, but each example presses on it a little harder, so keep your working neat enough to defend every corner and every comparison.
A craftsman makes bracelets and necklaces each week. Each item uses 1 unit of silver wire, and at most 10 units are available.
Each bracelet uses 1 pack of beads and each necklace uses 2 packs, with at most 14 packs available. For display, he keeps at least 2 bracelets and at least 1 necklace.
The profit is ringgit. (a) Write the four inequalities.
(b) Find the vertices of the region. (c) Find the number of each item for maximum profit, and state that profit.
Show worked solution
(a) Read each limit as an inequality. Silver wire: each item uses 1 unit, at most 10 units, so .
Beads: pack per bracelet and per necklace, at most 14, so . The display rules give and .
(b) The boundaries are , , and . Solve them in pairs and keep the crossings that satisfy the whole set.
So the region is the quadrilateral with vertices , , and .
(c) Evaluate the profit at each vertex:
Answer
The maximum profit is , from making bracelets and necklaces. Both are whole numbers, so no rounding is needed.
It is worth checking the two closest rivals, gives and gives , because a single arithmetic slip could otherwise crown the wrong corner.
A feasible region is defined by , and . The objective function is .
Find the maximum value of , and describe fully where in the region it is attained.
Show worked solution
First pin down the corners. The boundaries are , and ; solve them in pairs.
So the region is the triangle with vertices , and . Evaluate at each:
Two corners tie at the top with . That is the clue that the objective is parallel to the edge joining them.
Rewrite the objective as : it depends only on , and the edge from to is exactly the line , the largest value can reach in the region.
Answer
The maximum value is . Because is constant along the line , it is attained not just at one corner but at every point on the whole edge from to .
Any point on that edge, for instance , where , is an equally valid optimal answer.
A feasible region is defined by , , and . The objective function is , where .
(a) Find the four vertices of the region. (b) Find the range of values of for which the maximum of occurs at the vertex on the positive -axis.
Show worked solution
(a) Solve the boundaries in pairs. The origin, the two relevant axis-crossings, and the intersection of the two slanted lines give the four corners.
For the last corner, subtract the first slanted equation from the second:
so . The four vertices are , , and , with the vertex on the positive -axis.
(b) Evaluate at each vertex, treating as an unknown:
For the maximum to occur at , the value must be at least as large as the value at every other vertex. Since , already exceeds .
Compare it with and :
The stronger of the two conditions is , and it automatically satisfies as well.
Answer
The maximum of occurs at when . At exactly the corners and tie, both give , so the maximum is then shared along the edge ; for any , alone wins.
A stationery supplier restocks boxes of pens and boxes of pencils. Delivery is only arranged once an order reaches at least 12 boxes in total, so .
Past sales show pencil boxes should never exceed twice the number of pen boxes, so . Each box of pens costs RM8 and each box of pencils costs RM5, giving a total cost .
Find the minimum possible cost, and state how many boxes of each the supplier should order.
Show worked solution
Unlike a maximum profit over a closed shape, this region has no upper bound on , so start by finding where the two boundaries and meet, that corner is the natural place to look for a minimum, since moving further out along either boundary can only add cost.
The line also meets the pure-pens edge at a second corner:
So the two finite corners of the region are and ; everywhere else the region runs off to infinity along (increasing ) or along (increasing beyond 12). Evaluate the cost at the two corners, and check what happens along each direction.
Both directions only push the cost higher as grows, so neither corner is beaten by running further out; the minimum must sit at the cheaper of the two corners.
Answer
The minimum cost is , ordering boxes of pens and boxes of pencils. Moving instead to , all pens, no pencils, raises the cost to RM96, confirming is the cheaper corner.
A café's staff can prepare cups of tea and cups of coffee each hour, limited to cups. Milk stock limits production too: tea uses 2 units of milk per cup and coffee uses 1 unit, with at most 30 units available each hour, so .
The kitchen can also heat enough water for at most 15 cups of tea an hour, so . The profit is ringgit.
(a) Show that the constraint does not actually change the feasible region. (b) Find the vertices of the region.
(c) Find the maximum hourly profit.
Show worked solution
(a) Combine the milk limit with the non-negativity condition : since can never be negative, can never exceed , so the milk limit already forces on its own.
So the water-heating limit adds nothing new; the region is fully described by , , and alone. (b) Find each vertex from these four boundaries.
Check against the milk limit: , so it is genuinely a corner of the region. The four vertices are , , and .
(c) Evaluate at each:
Answer
The maximum hourly profit is , from cups of tea and cups of coffee. The water-heating limit never comes into it, always check whether a stated limit is actually active before leaning on it.
A tailor makes shirts and pairs of trousers each day, where and . Fabric limits the total number of garments to at most 9 a day, so .
Each shirt needs 2 buttons and each pair of trousers needs 1 button, and at most buttons are available each day, so , where is a positive constant. The profit is ringgit.
The maximum profit is achieved by making shirts and pairs of trousers, using all the fabric and all the buttons available that day. (a) Find the value of .
(b) Find the other vertices of the feasible region, and confirm that this plan really does give the maximum profit.
Show worked solution
(a) 'Using all the fabric and all the buttons' means both limits hold with equality at . Check the fabric first: , which matches exactly, as expected.
Substitute the point into the button equation to find .
(b) With , the region's four boundaries are , , and . Solve them in pairs for the remaining corners.
Check against the fabric limit: , so it is a genuine corner.
Check against the button limit: , also genuine. The four corners are , , and .
Evaluate at each to confirm the given plan wins.
Answer
The button stock is , and the maximum profit is from shirts and pairs of trousers, comfortably ahead of the next-best corner, , at RM28.
A gift shop packs Standard hampers and Deluxe hampers for a festival. Wrapping time limits the total to at most 20 hampers, so .
A corporate order requires at least 3 Standard hampers, so . Stock rules also require at least 40% of the hampers packed to be Deluxe.
The profit is ringgit, since Standard earns RM6 and Deluxe earns RM4 per hamper. (a) Show that the 40% rule can be written as .
(b) Find the vertices of the feasible region. (c) Find the maximum profit.
Show worked solution
(a) 'At least 40% Deluxe' means is at least 40% of the total number of hampers, .
Expand and collect the terms on one side.
(b) The three boundaries are , and (equivalently ). The non-negativity condition never becomes active here, since whenever .
Solve the three boundaries in pairs.
The three vertices are , and . (c) Evaluate at each:
Answer
The maximum profit is , from Standard and Deluxe hampers. Check the stock rule: out of hampers is exactly Deluxe, so the optimum sits right on that boundary, as it should.
A workshop assembles standard toolkits and deluxe toolkits each day, where and are whole numbers. Assembly time limits the total to at most 9 toolkits a day, so .
Screws limit production further: each standard toolkit uses 3 screws and each deluxe toolkit uses 5, with at most 30 screws available, so . The profit is ringgit.
Find the number of each toolkit that gives the maximum profit, and state that profit.
Show worked solution
First find the corners of the region in the usual way, treating and as if they could be any non-negative number.
Subtract three times from to find where the two slanted boundaries actually meet.
Evaluate at all four corners, including the origin:
The highest value, RM37.50, sits at , but toolkits come as whole units, so this corner cannot be built exactly. The true best plan must be a whole-number point close to it, so check the nearby possibilities directly.
Among the whole-number points, gives the highest profit, better even than the whole-number corner , which gives only RM36.
Answer
The maximum profit with a whole number of toolkits is , from standard toolkits and deluxe toolkit. It falls just short of the RM37.50 found at , which is exactly what should happen once the answer is pulled back onto whole numbers.
Hard questions in this chapter rarely need harder arithmetic; they need clearer thinking about what a corner is, when several corners tie, and how the objective's coefficients steer the answer. Keep those three ideas in view and the marks follow.
Key method points
These three examples stretch the same core skill in three directions: careful modelling, spotting a shared maximum, and reasoning with an unknown coefficient. Keep the following in mind.
- Model carefully: each resource limit becomes one inequality, and each minimum requirement becomes one inequality.
- A region bounded by four lines can have four corners; find each by solving the right pair of boundaries and checking it against the rest.
- When two corners give the same objective value, the objective is parallel to the edge between them, and every point on that edge is optimal.
- Rewriting an objective, for example , can reveal at a glance which constraint it runs parallel to.
- With an unknown coefficient, compare the target vertex's value against every other and combine the resulting inequalities; the strictest one gives the range.
- Always confirm the winning corner obeys every constraint, and give whole-number answers when the quantities are physical counts.
How a teacher helps
Hard Linear Programming questions reward a calm, orderly hand more than raw speed. Students who lose marks usually rush the comparison at the end, declaring a winner before checking the near-ties, or missing that two corners are level.
In a one-to-one lesson our teacher builds the habit of laying every corner's value in a row and reading them side by side, so a tie or a parallel edge is spotted rather than overlooked. Because our teachers are experienced, you learn to defend each step.
Lessons are taught in English, while SPM papers are set in both Malay and English, so the notation reads the same to you either way.
Get 1-to-1 help.
Book a Trial ClassFrequently asked questions
What does it mean when two corners give the same maximum?
It means the objective line is parallel to the edge joining those two corners, so every point along that edge gives the same optimal value. You may report either corner, or note that the whole edge is optimal; the value is what the mark depends on.
How do I handle an objective with an unknown coefficient?
Write the objective's value at each vertex, leaving the unknown in place. To keep the maximum at a chosen vertex, that vertex's value must be at least every other's; solve each comparison and take the strictest inequality as your range.
My region has four sides. How many corners should I expect?
A convex region bounded by four lines usually has four corners, one at each pair of adjacent boundaries. Find them by solving the correct pairs, and discard any intersection that breaks a constraint, it lies outside the region.
Do hard questions need harder calculation?
Rarely. The numbers stay clean by design.
What is harder is the reasoning, proving a corner belongs to the region, noticing a tie, or tracking how a coefficient changes the winner. Neat, labelled working is what protects the method marks.
Source:SRC-DSKP-EN