CG6–CG8 - Linear programming
Linear programming finds the best choice when several limits must hold at once. CG6 translates the situation into inequalities; CG7 uses their common region to maximise or minimise a quantity; CG8 identifies that quantity as an objective function. You will keep the meaning of each variable in view, so the best point on a graph becomes a usable answer.
Turning a situation into constraints
A workshop makes metres of fabric A and metres of fabric B. Each metre of A needs minutes of cutting and minute of finishing; B needs minute of cutting and minutes of finishing. There are minutes of each process available. If the profits are £ and £ per metre, what mix gives the greatest profit?
Trying a few guesses might find a good mix. A graph can establish the best one, including fractional metres that guessing whole numbers would miss.
You already know
A linear inequality in two variables describes a half-plane. Its boundary is a straight line. Use a solid boundary for or , a dashed boundary for or , and a test point to select the correct side.
Define the variables and their units before writing inequalities. Then translate one limit at a time: cutting uses minutes, finishing uses minutes. “At most” includes equality; “at least” also includes equality, but points in the opposite direction.
Constraint
A constraint is a condition restricting the allowed values of the variables. A linear constraint uses only constant multiples of the variables and a constant, as in . The condition is not linear.
A restriction from the meaning of the variables counts too: lengths cannot be negative. They need not be whole numbers, because fractional metres can be made and sold.
Worked example 1: limited resources
Question. Write the constraints for the workshop described above.
Plan. Add the time used by the two fabrics for each process, compare with the available time, and include non-negative lengths.
Why not use for both processes? The two products use different amounts of each resource, so the coefficients must reflect those amounts.
Answer. , , , .
Check. Making , uses minutes of each process, so it satisfies every constraint.
The next example changes one requirement: finishing must now occupy at least minutes, rather than at most . The cutting limit stays the same.
Worked example 2: a minimum requirement
Question. A production plan requires at least finishing minutes but allows no more than cutting minutes. Write its constraints for the same two fabrics.
Plan. Keep the same time expressions and change only the direction of the finishing inequality.
Why keep equality in both? Exactly minutes meets both “at least” and “no more than”.
Answer. , , , .
Check. , uses cutting minutes and finishing minutes, so it is allowed.
Words such as “more” and “less” only become precise when you check whether equality is allowed.
Watch out
Wrong: “at least ” becomes . That excludes exactly . Right: . “More than ” would use the strict inequality.
Now reduce only the minimum finishing requirement.
The feasible region and its vertices
The allowed choices are the points satisfying every constraint simultaneously; their intersection is the feasible region.
Draw each boundary accurately using two points, then test which side satisfies its inequality. Follow the shading instruction in the question: OCR often asks you to shade the region that is not satisfied, leaving the feasible region unshaded. The diagrams here highlight the feasible region in sage so that it is easy to identify.
Feasible point and feasible region
A feasible point satisfies every constraint. The feasible region is the set of all such points. A vertex is a corner formed where boundary lines meet, provided their intersection satisfies all the other constraints too. An intersection outside the common region is not one of its vertices.
Non-negativity restricts the picture to the first quadrant. A boundary line may meet an axis beyond the permitted part of that axis, so do not automatically list all intercepts as vertices.
Worked example 3: the workshop's feasible polygon
Question. Find the vertices of the region , , , .
Plan. Find the permitted axis endpoints, then solve the two sloping boundaries simultaneously.
The origin also satisfies every inequality, giving four vertices in all. Draw the boundary lines through their intercepts and keep the common portion in the first quadrant.
Why check both inequalities on an axis? The tighter constraint, not the first one you happen to read, fixes the endpoint.
Answer. , , , .
Check. At the non-axis corner, and . The first panel below shows the resulting quadrilateral.
Change only the finishing capacity from to . One boundary moves, changing two vertices.
Worked example 4: a moved constraint
Question. Find the vertices for , , , .
Plan. Recheck the axes, then solve the changed pair of boundary equations.
Why not keep the old corner? A point at the intersection must satisfy the new equality as well as the unchanged one.
Answer. , , , .
Check. gives and , and both coordinates are non-negative.
It is possible for constraints to have no common points. For example, and cannot both hold; the feasible region is empty. An empty region means that the stated requirements cannot all be met.
Watch out
Wrong: include as a vertex in Worked example 3 because it lies on . It violates , giving . Every proposed vertex must pass every constraint.
Change the finishing capacity again and find the new corner.
Objective functions and maximisation
The constraints say what you may choose; the objective function says which allowed choice you prefer.
Objective function
An objective function is the quantity to be maximised or minimised, written in terms of the decision variables. If the profits per metre are £ for A and £ for B, the profit in pounds is . The constraints restrict production; they do not themselves state its value.
For a fixed profit , is a straight line. Changing slides this line parallel to itself. To maximise profit, move it towards increasing values until it last touches the feasible region. On a non-empty closed bounded polygon, at least one vertex gives a maximum and at least one gives a minimum. If the objective is parallel to an edge, a whole edge can share the optimum. This vertex principle is not on the formulae sheet: learn it.
Continue this lesson.
You’re previewing NovaLearn without an account. Create a free account to read the rest.
Create free account