Linear Programming
Interactive curriculum lessons, worked examples, and geometric problem-solving techniques designed to help Kenyan students master CBC, KPSEA, KCSE, and IGCSE mathematics.
First Principles
Objective
Formulate and solve linear programming problems using graphical methods to optimize (maximize or minimize) an objective function under given constraints.
Concrete Scenario: A furniture workshop in Nairobi makes desks (\( x \)) and chairs (\( y \)). Each desk needs 2 units of timber and 1 hour of labor; each chair needs 1 unit of timber and 2 hours of labor. With 8 units of timber and 8 hours of labor available daily, how many of each should be produced to maximize profit \( Z = 3000x + 4000y \)?
Linear Programming Insights:
- Constraints & Feasible Region: Inequalities form straight line boundaries on a Cartesian plane. The shaded area where all inequalities overlap is the feasible region.
- Corner Point (Vertex) Theorem: The optimal value (maximum or minimum) of a linear objective function \( Z = ax + by \) always occurs at one of the vertices (corners) of the feasible region.
- Non-Negativity: Since physical quantities cannot be negative, \( x \ge 0 \) and \( y \ge 0 \) always restrict the region to the first quadrant.
Feasible Region & Optimal Vertex
Key Formulas
Worked Examples
Problem: Maximise \( Z = 2x + 3y \) subject to \( x + y \le 4 \), \( x \ge 0 \), \( y \ge 0 \).
- Identify vertices of the triangular feasible region: \( (0,0) \), \( (4,0) \), and \( (0,4) \).
- Evaluate \( Z \) at each vertex:
- At \( (0,0) \): \( Z = 2(0) + 3(0) = 0 \)
- At \( (4,0) \): \( Z = 2(4) + 3(0) = 8 \)
- At \( (0,4) \): \( Z = 2(0) + 3(4) = 12 \)
- Select maximum: \( Z_{\max} = 12 \) at \( (0,4) \).
Problem: Maximise profit \( Z = 3x + 4y \) subject to timber constraint \( 2x + y \le 8 \) and labor constraint \( x + 2y \le 8 \) (where \( x, y \ge 0 \)).
- Find line intersections: \( 2x + y = 8 \) and \( x + 2y = 8 \).
- Subtracting equations gives \( x = 2.67 \) (or \( \frac{8}{3} \)) and \( y = 2.67 \) (or \( \frac{8}{3} \)).
- List vertices: \( (0,0) \), \( (4,0) \), \( (0,4) \), and \( (\frac{8}{3}, \frac{8}{3}) \).
- Evaluate \( Z \):
- \( Z(4,0) = 12 \)
- \( Z(0,4) = 16 \)
- \( Z(\frac{8}{3}, \frac{8}{3}) = 3(\frac{8}{3}) + 4(\frac{8}{3}) = 8 + 10.67 = 18.67 \)
- Maximum profit is 18.67 (KSh 18,667).
Problem: Minimise cost \( C = 12x + 10y \) subject to protein constraint \( 5x + 3y \ge 30 \) and fiber constraint \( 2x + 4y \ge 20 \) (where \( x, y \ge 0 \)).
- Find intersection of boundary lines: \( 5x + 3y = 30 \) and \( 2x + 4y = 20 \).
- Solve simultaneously: multiply 1st by 2 (\( 10x + 6y = 60 \)) and 2nd by 5 (\( 10x + 20y = 100 \)).
- Subtracting gives \( 14y = 40 \implies y = 2.86 \), then \( x = 4.29 \).
- Feasible region vertices (unbounded above): \( (0, 10) \), \( (4.29, 2.86) \), \( (10, 0) \).
- Evaluate cost \( C \):
- \( C(0,10) = 12(0) + 10(10) = 100 \)
- \( C(4.29, 2.86) = 12(4.29) + 10(2.86) = 51.48 + 28.60 = 80.08 \approx 80 \)
- \( C(10,0) = 12(10) + 10(0) = 120 \)
- Minimum cost = Ksh 80.
Common Mistakes
Real World
Practice