Math — Mechina
Linear programming
Summary
In linear programming we look for the largest (or smallest) value of a linear expression when the variables satisfy several linear inequalities. The inequalities make a region — a polygon in the plane — and the extreme value is always reached at one of its vertices.
Symbols in the formulas
- The objective function — what we want to increase (profit) or decrease (cost)
- The variables — for example how many units of each product
- A constraint — a limit (machine hours, material, budget)
Where it comes from: the lines for different are parallel. Move the line in the direction in which grows; the last point still touching the region is a vertex (or a whole edge, and then the value is the same at both of its vertices).
- Draw each constraint as a line and mark the side that satisfies it (test with the point ).
- Vertices = intersections of pairs of lines that satisfy all the constraints.
- Substitute each vertex into the objective function and choose the right one.
- In a practical problem — check that the answer is in whole numbers and fits the story.
Question types
Maximum on a region
Constraints and an objective function are given, or a practical problem (a factory, a diet) to translate.
Worked example
, , . What is the largest value of ?
Solution
- Vertices on the axes: , (from ), (from ).
- Intersection of the two lines: and give , i.e. .
- Substitute: , , , .
- The maximum: at .
A practical problem
Profit from several products with limited resources.
Worked example
Product A: profit , machine hours and one work hour. B: profit , one machine hour and one work hour. There are machine hours and work hours. How many of each to produce?
Solution
- Vertices: , , .
- Intersection: and give , .
- Substitute: , , .
- Produce of A and of B, profit .
Practice · 13
Test yourself with problems and full solutions.