Constraints, objective function and optimisation
An LPP has an objective function to optimise and constraints that limit the variables. Optimisation means finding the maximum or minimum value of Z.
The parts of an LPP
| Term | Meaning | In the tailor example |
|---|---|---|
| Decision variables | Quantities we choose | x shirts, y kurtas |
| Objective function | Linear function to maximise or minimise | Z = 40x + 60y (maximise) |
| Constraints | Linear conditions from limited resources | 2x + y ≤ 12, x + 2y ≤ 12 |
| Non-negative restrictions | Variables cannot be negative | x ≥ 0, y ≥ 0 |
| Optimal value | The best (maximum or minimum) value of Z | ₹ 400 |
| Optimal solution | The point that gives the optimal value | (4, 4): 4 shirts and 4 kurtas |
Turning words into inequalities
| Words in the question | Inequality |
|---|---|
| at most 40, not more than 40, up to 40 | ≤ 40 |
| at least 40, not less than 40, a minimum of 40 | ≥ 40 |
| exactly 40 | = 40 |
| x is at least twice y | x ≥ 2y |
| y exceeds x by at least 5 | y − x ≥ 5 |
Objective function vs constraint
The syllabus limits problems to three non-trivial constraints (constraints other than x ≥ 0, y ≥ 0).
Example 1: name the parts and test points
For: Minimise Z = 4x + 6y subject to x + 2y ≥ 8, 3x + y ≥ 9, x ≥ 0, y ≥ 0, name the objective function and the non-trivial constraints. Is (2, 3) allowed? Is (1, 5)?
- Objective function: Z = 4x + 6y (to be minimised).
- Non-trivial constraints: x + 2y ≥ 8 and 3x + y ≥ 9.
- (2, 3): 2 + 6 = 8 ≥ 8 is true; 6 + 3 = 9 ≥ 9 is true. Allowed, and Z = 8 + 18 = 26.
- (1, 5): 1 + 10 = 11 ≥ 8 is true; 3 + 5 = 8 ≥ 9 is false. Not allowed.
(2, 3) satisfies every constraint (Z = 26); (1, 5) breaks 3x + y ≥ 9.
Example 2: write the constraints
A shop sells x tables and y chairs. The number of chairs must be at least three times the number of tables, and the shop can hold at most 40 pieces. Write the constraints.
- 'Chairs at least three times tables': y ≥ 3x
- 'At most 40 pieces': x + y ≤ 40
- Counts cannot be negative: x ≥ 0, y ≥ 0
y ≥ 3x (that is, 3x − y ≤ 0), x + y ≤ 40, x ≥ 0, y ≥ 0.
A dietitian planning a hospital meal minimises cost (the objective function) while meeting the minimum energy and protein each patient needs (the constraints).
1 marks: “In 'Maximise Z = 3x + 2y subject to x + y ≤ 4, x ≥ 0, y ≥ 0', name the objective function and the non-trivial constraint.” Objective function Z = 3x + 2y; non-trivial constraint x + y ≤ 4.
1 marks: “Write as an inequality: the number of cups y is at least twice the number of plates x.” y ≥ 2x.
2 marks: “Is (3, 2) a feasible point for 2x + y ≤ 10, x + 3y ≤ 15, x ≥ 0, y ≥ 0? Find Z = 4x + 5y there.” 2(3) + 2 = 8 ≤ 10 and 3 + 6 = 9 ≤ 15, and both values are non-negative, so yes. Z = 12 + 10 = 22.
Z is the goal; the constraints are the rules.