This article covers the essential skills of linear programming – an advanced topic in DSE Paper 1 Section A(2) and Section B worth 4–6 marks. You will learn how to graph linear inequalities to find the feasible region, how to define and optimize the objective function, how to use the vertex method to find maximum/minimum values, and how to handle integer solutions for real-world problems. The article includes step-by-step worked examples, DSE exam techniques, practice questions. These are high-level skills that can help you secure top marks in the exam.
By the end of this article, you should be able to:
Linear programming appears every year in DSE Paper 1 Section A(2) and Section B. Questions may ask you to:
These are high-level skills that can help you secure top marks.
Linear programming questions often appear in Section A(2) as short-answer questions worth 3–4 marks, and in Section B as longer problems worth 5–6 marks.
A linear inequality in two variables (e.g., \( 2x + 3y \le 12 \)) represents a half-plane. To graph it:
Question: Shade the feasible region defined by:
\( x \ge 0 \), \( y \ge 0 \), \( x + y \le 6 \), \( 2x + y \le 8 \)
Graph the lines: \( x+y=6 \) and \( 2x+y=8 \), with \( x\ge0, y\ge0 \).
Test \( (0,0) \): \( 0+0 \le 6 \) ✓, \( 0+0 \le 8 \) ✓. So shade below both lines in the first quadrant.
The feasible region is a polygon with vertices: \( (0,0), (4,0), (2,4), (0,6) \).
The objective function is a linear expression to be maximized or minimized, e.g., \( P = 3x + 4y \). The vertex method states that the maximum or minimum value of a linear objective function over a convex polygon occurs at one of the vertices of the feasible region.
Steps:
Vertex method: The optimal solution for a linear program is always at a corner point of the feasible region.
Question: Maximize \( P = 3x + 2y \) subject to:
\( x \ge 0, y \ge 0, x + y \le 5, x + 2y \le 8 \).
Vertices: Intersections of boundary lines. Compute:
Maximum is 15 at \( (5,0) \).
Answer: Max \( P=15 \).
In real-world problems, variables often must be integers (e.g., number of products, people). The vertex method may give non-integer solutions. To find the optimal integer solution:
The optimal integer solution is not always the nearest integer point to the vertex. Always check feasible integer points thoroughly.
Question: Maximize \( P = 10x + 12y \) subject to:
\( x \ge 0, y \ge 0, 2x + 3y \le 30, 3x + 2y \le 30 \), with \( x, y \) integers.
Vertices: \( (0,0), (10,0), (0,10), (6,6) \) (intersection: \( 2x+3y=30, 3x+2y=30 \) → \( x=y=6 \)).
Evaluate at vertices: \( (6,6) \to P=132 \). But \( x,y \) are integers, and \( (6,6) \) is already integer, so optimal integer solution is \( (6,6) \) with \( P=132 \).
If vertex non-integer, e.g., \( (5.5, 4.5) \), we would check nearby integer points.
Answer: Max \( P=132 \) at \( (6,6) \).
Linear programming is used to optimize real-world problems involving limited resources. Common applications include:
Question: A factory produces two products A and B. Each unit of A requires 2 hours of labour and 1 unit of material; each unit of B requires 1 hour of labour and 2 units of material. The factory has 100 hours of labour and 80 units of material available per week. Profit for A is $30 per unit, for B is $20 per unit. How many of each should be produced to maximize profit?
Let \( x \) = units of A, \( y \) = units of B.
Constraints: \( 2x + y \le 100 \) (labour), \( x + 2y \le 80 \) (material), \( x \ge 0, y \ge 0 \).
Objective: maximize \( P = 30x + 20y \).
Vertices: \( (0,0), (50,0), (0,40), (40,20) \) (intersection: \( 2x+y=100, x+2y=80 \) → \( x=40, y=20 \)).
Evaluate: \( (0,0):0, (50,0):1500, (0,40):800, (40,20):30(40)+20(20)=1200+400=1600 \).
Max profit = $1600 at \( (40,20) \).
Answer: Produce 40 units of A and 20 units of B.
Question: Minimize \( C = 4x + 5y \) subject to:
\( x \ge 0, y \ge 0, x + 2y \ge 6, 3x + y \ge 6 \).
Graph and find vertices: Intersections: \( (0,3) \) (from \( x=0, x+2y=6 \)), \( (2,0) \) (from \( y=0, 3x+y=6 \)), and intersection of \( x+2y=6 \) and \( 3x+y=6 \): solve: \( x+2y=6, 3x+y=6 \) → \( x=1.2, y=2.4 \).
Evaluate: \( (0,3): C=15, (2,0): C=8, (1.2,2.4): C=4(1.2)+5(2.4)=4.8+12=16.8 \).
Minimum is 8 at \( (2,0) \).
Answer: Min \( C=8 \).
Question: Maximize \( P = 6x + 5y \) subject to:
\( x \ge 0, y \ge 0, 2x + y \le 10, x + 3y \le 12 \), with \( x, y \) integers.
Vertices: \( (0,0), (5,0), (0,4) \), intersection: \( 2x+y=10, x+3y=12 \) → \( x=3.6, y=2.8 \).
Non-integer vertex \( (3.6,2.8) \). Evaluate nearby integer points in feasible region: \( (3,3): P=18+15=33 \), \( (4,2): P=24+10=34 \), \( (3,2): P=18+10=28 \), \( (4,3): \) check constraints: \( 2(4)+3=11 \le 10 \)? No. So best integer is \( (4,2) \) with \( P=34 \).
Also check \( (3,3) \) gives 33. So max integer is 34.
Answer: Max \( P=34 \) at \( (4,2) \).
Question: A baker makes cakes and cookies. Each cake requires 3 cups of flour and 2 cups of sugar; each cookie requires 2 cups of flour and 1 cup of sugar. The baker has 60 cups of flour and 40 cups of sugar. Profit is $5 per cake and $3 per cookie. How many of each should be made to maximize profit?
Let \( x \) = cakes, \( y \) = cookies.
Constraints: \( 3x + 2y \le 60 \), \( 2x + y \le 40 \), \( x \ge 0, y \ge 0 \).
Objective: maximize \( P = 5x + 3y \).
Vertices: \( (0,0), (20,0), (0,30) \), intersection: \( 3x+2y=60, 2x+y=40 \) → \( x=20, y=0 \)? Wait: solve: from \( y=40-2x \) into first: \( 3x+2(40-2x)=60 \) → \( 3x+80-4x=60 \) → \( -x=-20 \) → \( x=20, y=0 \). Actually intersection is (20,0) which is already a vertex. The other intersection is (0,30)? Check: \( 2(0)+y=40 \) gives \( y=40 \), but then \( 3(0)+2(40)=80>60 \), so (0,40) not feasible. So feasible vertices: (0,0), (20,0), (0,30) and (intersection of lines not boundary? Actually we need to find all vertices: (0,0), (20,0), (0,30), and intersection of the two lines gave (20,0) again. So feasible region is triangle with vertices (0,0), (20,0), (0,30). Evaluate: (0,0):0, (20,0):100, (0,30):90. Max at (20,0) with P=100.
But wait, check (10,10)? That is inside. So max is 100 at x=20,y=0.
Answer: 20 cakes, 0 cookies.
Question 1 MC
Which point is in the feasible region defined by \( x \ge 0, y \ge 0, x+y \le 4, 2x+y \le 5 \)?
A. \( (1,3) \) B. \( (2,2) \) C. \( (3,1) \) D. \( (4,0) \)
Question 2 MC
Maximize \( P = 2x + y \) subject to \( x \ge 0, y \ge 0, x+y \le 6, x+2y \le 8 \). The maximum value is:
A. \( 8 \) B. \( 10 \) C. \( 12 \) D. \( 14 \)
Question 3 Short Answer
Find the vertices of the feasible region defined by \( x \ge 0, y \ge 0, 2x+3y \le 12, x+y \le 5 \).
Question 4 Short Answer
Maximize \( P = 4x + 5y \) subject to \( x \ge 0, y \ge 0, x+2y \le 8, 2x+y \le 10 \).
Question 5 MC
If \( x, y \) must be integers, what is the maximum of \( P = 3x + 4y \) subject to \( x \ge 0, y \ge 0, x+y \le 5, x+2y \le 7 \)?
A. \( 15 \) B. \( 16 \) C. \( 17 \) D. \( 18 \)
Click the following link to have
An Exercise on Linear Programming | Feasible Region & Objective Function