Linear programming finds the largest or smallest value of a linear function (the objective function, e.g. F = 3x + 2y) when x and y must satisfy a set of linear inequalities (the constraints).
Steps
- The boundary of ax + by ≤ c or ax + by ≥ c is the line ax + by = c. Find two points on it and draw it.
- Pick a test point not on the line (usually (0, 0)). If it satisfies the inequality, shade its side; otherwise shade the other side.
- The region satisfying every constraint is the feasible region (solution set).
- Find its corner points (vertices) and put each into the objective function. The largest value is the maximum, the smallest the minimum.
Common half-planes
| Inequality | Region |
|---|---|
| x ≥ 0 | on and right of the y-axis |
| x ≤ 0 | on and left of the y-axis |
| y ≥ 0 | on and above the x-axis |
| y ≤ 0 | on and below the x-axis |
| x ≥ 2 | on and right of the line x = 2 |
| y ≤ 2 | on and below the line y = 2 |
Worked example
Maximise F = 3x + 2y subject to x + y ≤ 4, x ≥ 0, y ≥ 0.
- Vertices: (0, 0), (4, 0), (0, 4)
- F = 0, 12, 8. Maximum F = 12 at (4, 0)