Linear Programming Examples: 47 Problems with Answers
Worked examples of Linear Programming to try before you open each solution, then practice problems with answers.
Worked Examples
Example 1
mediumShow solution
Answer
First step
See the full worked solution + why-it-works coaching
SetupKey insightWhy it worksCommon pitfallConnection
Example 2
hardExample 3
mediumExample 4
mediumExample 5
hardExample 6
hardPractice Problems
Try each one, then open the solution to compare your method.
Example 1
easyExample 2
mediumExample 3
easyExample 4
easyExample 5
easyExample 6
easyExample 7
easyExample 8
easyExample 9
easyExample 10
easyExample 11
mediumExample 12
mediumExample 13
mediumExample 14
mediumExample 15
mediumExample 16
mediumExample 17
mediumExample 18
mediumExample 19
challengeExample 20
challengeExample 21
challengeExample 22
mediumExample 23
easyExample 24
easyExample 25
easyExample 26
easyExample 27
easyExample 28
mediumExample 29
mediumExample 30
mediumExample 31
mediumExample 32
mediumExample 33
mediumExample 34
mediumExample 35
mediumExample 36
mediumExample 37
hardExample 38
hardExample 39
hardExample 40
challengeExample 41
challengeWhat to focus on
Core idea: Linear programming maximizes or minimizes a linear objective over a region cut out by linear constraints, and the optimum always sits at a corner of that region.
Common stuck point: The procedure for linear programming is the easy part; the trap is searching the interior for the best value. Asking "Am I optimizing a linear objective over a region bounded by linear inequalities, with the answer expected at a corner?" first is what keeps a correct-looking calculation from being attached to the wrong concept.
Ask yourself: Am I optimizing a linear objective over a region bounded by linear inequalities, with the answer expected at a corner?
Concept recap
Linear programming optimizes a linear objective subject to linear inequality or equality constraints.
Finding the optimum is like pushing a ruler across a polygon cut from paper, keeping it parallel to the profit line. The last bit of paper the ruler touches before it leaves is a corner, because the ruler and the polygon's edges are all straight. If the profit rule were curved, the last point touched could be in the middle of a side.
Read the full lesson on Linear ProgrammingRelated concepts
Background knowledge
These ideas may be useful before you work through the harder examples.