What is Linear Programming?
Linear programming is a powerful mathematical method used to find the best possible outcome in a situation where there are limitations or restrictions. The word linear tells us that all the relationships involved are straight lines when drawn on a graph, and programming here means planning or optimising , not computer coding!
Linear Programming: A mathematical technique used to find the maximum or minimum value of a quantity (called the objective function) subject to a set of restrictions called constraints, all expressed as linear inequalities.
Linear programming is used extensively in the real world to solve problems like:
- A factory deciding how many of two products to make in order to maximise profit
- A dietitian planning meals to minimise cost while meeting nutritional needs
- An airline scheduling crew to minimise expenses while satisfying regulations
- A farmer deciding how much of each crop to plant to maximise yield
Imagine you are running a small bakery. You can bake cakes or cookies, but you only have a limited amount of flour, butter, and time. Linear programming helps you figure out exactly how many of each to bake so that you make the most money possible , without breaking those resource limits.
In MYP Sciences, linear programming connects the Thinking with Models unit beautifully , the graphical model we build (a shaded feasible region on a coordinate plane) represents all the possible solutions, and we then identify the optimal one.
Reviewing Inequalities
Before tackling linear programming, you need to be confident with inequalities , mathematical statements that compare two expressions using symbols other than equals.
Inequality: A mathematical statement that shows the relationship between two expressions that are not necessarily equal, using the symbols , , , or .
The four inequality symbols and their meanings:
| Symbol | Meaning | Example |
|---|---|---|
| strictly less than | ||
| strictly greater than | ||
| less than or equal to | ||
| greater than or equal to |
In most real-life linear programming problems, we use or rather than strict inequalities, because a constraint like "you have at most 100 kg of flour" includes using exactly 100 kg as a valid option.
Solving a simple inequality works almost exactly like solving an equation, with one critical rule:
Flip the inequality sign whenever you multiply or divide both sides by a negative number.
For example: → divide both sides by → (sign flips!)
Solve:
Step 1: Subtract 4 from both sides:
Step 2: Divide both sides by 3:
Interpretation: Any value of that is 5 or less satisfies this inequality.
12 more sections in this topic
Pick this up in your Library: it holds the whole topic, notes, cheatsheet and questions.