More constraints, more dimensions, and the limits of brute force
The one-constraint picture was easy because you could draw it and count three corners. Real problems add more. Suppose the factory also has at most 5 kg of sugar. Drawing that second constraint carves the feasible region into a new shape with an extra vertex. Add a limit on chocolate and you get yet another vertex. In general, the more constraints you have, the more corners the feasible shape can have.
Adding more products raises the number of dimensions instead. With three mixes, cookie, donut, and brownie, revenue has three variables, so the picture needs three axes and becomes a solid shape. You could still check every vertex of that solid and keep the best. But with more than three mixes you can no longer draw the shape at all, and with several constraints the shape you cannot see can be very complicated.
In theory you could still brute force it: solve for every vertex and compute the revenue at each. In practice, for a complicated shape in high dimensions, that takes far too long. This is exactly the gap that linear programming fills with efficient algorithms. One of the best known is the simplex algorithm.
Related cards
Video Content
Tasks
Card Info
- Topic: Linear programming, StatQuest
- Difficulty: Beginner
- Completed: 0 users