Solve the following linear programming problem graphically :
Maximise z=500x+300y,
subject to constraints
x+2y≤12
2x+y≤12
4x+5y≥20
x≥0,y≥0
Exam answer
Draw the lines (graph below):
L1:x+2y=12 through (12,0) and (0,6);
L2:2x+y=12 through (6,0) and (0,12);
L3:4x+5y=20 through (5,0) and (0,4).
Why?
Each constraint is drawn first as a straight line, by replacing the inequality sign with =. Two points fix a line, and the easiest two are where it meets the axes: put y=0 to get the x-intercept, then x=0 to get the y-intercept.
For example, for L1:y=0 gives x=12, and x=0 gives 2y=12, so y=6.
At (0,0):0≤12 is true for L1 and L2, and 0≥20 is false for L3. So shade towards the origin for L1,L2 and away from it for L3. With x,y≥0, the feasible region is ABCDE (shaded). It is bounded.
Why?
Each line divides the plane into two halves. A test point not on the line tells us which half satisfies the inequality: if the point satisfies it, shade its side; if not, shade the other side. The origin is the easiest test point when the line does not pass through it.
x,y≥0 keeps us in the first quadrant. The feasible region is the part that satisfies every constraint at once. It is bounded because it fits inside a finite box.
At C, solving x+2y=12 and 2x+y=12:
2(2x+y)−(x+2y)⇒3x=24−12=12
⇒x=4, and then 2y=12−4⇒y=4. So C is (4,4).
Why?
C is where L1 and L2 cross, so it satisfies both equations. Doubling the second equation makes the y terms equal, 2y in each, and subtracting removes y.
The other corners lie on the axes, so we read them from the intercepts: A(0, 4) and B(0, 6) on the y-axis, E(5, 0) and D(6, 0) on the x-axis.
The feasible region ABCDE (shaded). Its corners are A(0, 4), B(0, 6), C(4, 4), D(6, 0) and E(5, 0).CornerA(0,4)B(0,6)C(4,4)D(6,0)E(5,0)z=500x+300y120018003200←max30002500Why?
Put each corner into z=500x+300y. For example, at C(4, 4):
The region is bounded, so the largest value in the table is the maximum of z.
Why?
Corner point theorem: when the feasible region is bounded, z has a maximum and a minimum, and each occurs at a corner point. So comparing the values at the corners is enough.
∴ Maximum z=3200 at x=4,y=4.
Where this comes from
Chapter 12, Linear Programming: LPP: maximise graphically, bounded region.
Spot it: a rule like x+2y≥10, often with "Minimise Z". The region no longer touches the origin.
Here:4x+5y≥20 fails at (0,0), so shade away from the origin for it, and towards it for the two ≤ rules. The region ABCDE is bounded, so the largest value, 3200 at (4,4), is the maximum.