All revision notes topics

Linear programmingIB MYP Maths Extended: Revision notes

Section 1

Forming inequalities

Linear programming starts by choosing variables, such as xx tables and yy chairs, and turning each limit in the problem into a constraint (a linear inequality).

  • at most, no more than: ≤\le
  • at least, no fewer than: ≥\ge
  • fewer than: <<; more than: >> Examples: 'at most 14 people' is x+y≤14x+y\le14; 'at least 2 adults' is x≥2x\ge2; 'children at most three times the adults' is y≤3xy\le3x. Resource limits add up each item's use: 4 kg of rice per Type A parcel and 2 kg per Type B with 40 kg available gives 4x+2y≤404x+2y\le40. Counts cannot be negative, so also write x≥0x\ge0 and y≥0y\ge0.
Key termsconstraintinequalityvariable
Common mistake

Swapping the variables in a ratio statement. 'Children at most three times the adults' is y≤3xy\le3x, not x≤3yx\le3y.

Section 2

Graphing an inequality

  1. Draw the boundary line by changing the inequality to an equals sign. Find two points, such as the axis intercepts: 2x+y=162x+y=16 passes through (8,0)(8,0) and (0,16)(0,16).
  2. Use a solid line for ≤\le or ≥\ge (points on the line are allowed) and a dashed line for << or >>.
  3. Test a point, usually (0,0)(0,0). For 2x+y≤162x+y\le16: 0≤160\le16 is true, so shade the side containing the origin. For x+y≥5x+y\ge5: 0≥50\ge5 is false, so shade the other side. Technology (graphing software) can draw and shade each inequality for you.
Key termsboundary linetest point
Exam tip

Be careful if the line passes through (0,0)(0,0). Then pick a different test point, such as (1,0)(1,0) or (0,1)(0,1).

Section 3

The feasible region and its vertices

The feasible region is where all the shaded regions overlap: every point inside satisfies every constraint. Its corners are vertices. Find a vertex by solving the two boundary equations that meet there. For 2x+y=162x+y=16 and x+2y=14x+2y=14: from the first, y=16−2xy=16-2x. Substitute: x+2(16−2x)=14x+2(16-2x)=14, so −3x=−18-3x=-18, x=6x=6 and y=4y=4. The vertex is (6,4)(6,4). The other vertices come from the axes: (0,0)(0,0), (8,0)(8,0), (0,7)(0,7). Check a point is feasible by substituting it into every inequality. (8,7)(8,7) fails because 2(8)+7=23>162(8)+7=23>16.

Key termsfeasible regionvertex
Exam tip

Test your vertex in both original equations before using it.

Section 4

The objective function and the optimal solution

The objective function is the quantity to maximise (profit, people fed) or minimise (cost, time), such as P=30x+20yP=30x+20y. The best value always occurs at a vertex of the feasible region. Evaluate the objective function at every vertex and choose the largest (to maximise) or smallest (to minimise). For vertices (0,0),(8,0),(0,7),(6,4)(0,0),(8,0),(0,7),(6,4) and P=30x+20yP=30x+20y: 0,240,140,2600,240,140,260. The maximum profit is \260atat(6,4).Minimisingworksthesameway.For. Minimising works the same way. For C=2x+3ywithwithx+y\ge6,, x\ge1,, y\ge1,theverticesare, the vertices are (1,5)andand(5,1),giving, giving 17andand13,sotheminimumcostis, so the minimum cost is 13atat(5,1)$. If an objective line is parallel to an edge, two vertices tie and every point on that edge is optimal.

Key termsobjective functionoptimal solution
Common mistake

Choosing the maximum at a point that is not feasible. Only points inside the feasible region count.

Section 5

Solving a real-life problem

  1. Define the variables. 2. Write the constraints and the objective function. 3. Draw the feasible region (or find its vertices by solving pairs of equations). 4. Evaluate the objective function at each vertex. 5. Write the answer in context. Example: a charity with 40 kg of rice and 36 kg of lentils packs xx Type A and yy Type B parcels. The constraints are 4x+2y≤404x+2y\le40 and 2x+3y≤362x+3y\le36, and people fed is 5x+4y5x+4y. The vertices are (0,0)(0,0), (10,0)(10,0), (0,12)(0,12), (6,8)(6,8), giving 0,50,48,620,50,48,62. The best plan is 6 Type A and 8 Type B parcels, feeding 62 people. If the variables must be whole numbers, check that the optimal vertex is a whole-number point. If not, test nearby whole-number points inside the region.
Key termscontextwhole-number solution
Exam tip

Always finish with a sentence in context: 'The charity should pack 6 Type A and 8 Type B parcels.'

That's the notes covered.

Carry on to the next subtopic.

Exam questions on Linear programming

  1. A minibus carries xx adults and yy children. It can carry at most 14 people in total, there must be at least 2 adults, and the number of children can be at most three times the number of adults.
    Determine whether 5 adults and 9 children can travel in the minibus. Give a reason.2 marks
  2. A workshop makes xx tables and yy chairs each week. The weekly limits are 2x+y≤162x+y\le16 (wood) and x+2y≤14x+2y\le14 (labour hours), with x≥0x\ge0 and y≥0y\ge0. The profit is P=30x+20yP=30x+20y dollars. The feasible region has vertices (0,0)(0,0), (8,0)(8,0) and (0,7)(0,7), plus one more vertex where the two boundary lines meet.
    Show that the point (8,7)(8,7) is not in the feasible region.2 marks
  3. A student investigates how the best choice changes when the objective function changes. The feasible region is defined by x≥0x\ge0, y≥0y\ge0, x≤6x\le6, y≤5y\le5 and x+y≤8x+y\le8. The objective is to maximise P=x+kyP=x+ky, where kk is a positive constant.
    Find the coordinates of the two vertices of the feasible region that lie on the line x+y=8x+y=8. Find the maximum value of PP when k=2k=2, and the vertex where it occurs.3 marks
See the full worksheet

Written by the Exaim team, led by Shaun Daswani (Head of Upper Secondary, Improve ME Institute; MSc Financial Mathematics, Imperial College London; BSc, UCL) and Jason Daswani (operational lead, Improve ME Institute; LSE).