No history yet

Introduction to Linear Programming

Making the Best Choice

Imagine you run a small bakery. You can make two things: delicious chocolate cakes and classic vanilla cakes. You make more profit on chocolate cakes, but they take longer to bake and use more expensive ingredients. You only have so much oven time, flour, and sugar each day. How do you decide how many of each cake to bake to make the most money?

This is an optimization problem. You have a goal (maximize profit) and a set of limitations (ingredients, time). Linear programming is a mathematical tool for solving exactly this kind of puzzle.

Linear programming helps you find the best possible outcome from a set of options, given a list of rules you have to follow.

It's called "linear" because the relationships between the different factors are represented by straight lines. There are no curves or exponents involved. Let's break down the key parts of any linear programming problem.

The Building Blocks

Every linear programming model has three core components: an objective function, decision variables, and constraints.

Objective Function

noun

The goal you are trying to achieve, expressed as a mathematical equation. It's the quantity you want to maximize (like profit) or minimize (like cost).

In our bakery example, let's say we make $10 profit for each chocolate cake and $8 for each vanilla cake. If xx is the number of chocolate cakes and yy is the number of vanilla cakes, our objective is to maximize our total profit, PP. The objective function would look like this:

P=10x+8yP = 10x + 8y

Next, we have our limitations, or constraints.

Constraints

noun

The rules or limitations you must operate within, expressed as linear inequalities. These could be limits on resources, time, or budget.

Let's say you only have enough flour for 30 cakes in total. And your oven can only run for 8 hours (480 minutes). A chocolate cake takes 20 minutes to bake, while a vanilla cake takes 15 minutes.

These limitations become our constraints:

x+y3020x+15y480x0y0\begin{aligned} x + y &\le 30 \\ 20x + 15y &\le 480 \\ x &\ge 0 \\ y &\ge 0 \end{aligned}

Finding the Sweet Spot

So now we have a goal and a set of rules. How do we find the best answer? We can visualize the problem by graphing the constraints.

Each inequality represents a region on a graph. The area where all these regions overlap is called the feasible region. It contains every possible combination of chocolate and vanilla cakes we could bake without breaking any of our rules.

A key theorem in linear programming states that the optimal solution—the combination that maximizes profit—will always be at one of the corners (or vertices) of the feasible region. To solve the problem, you just need to test the objective function at each corner point.

For our bakery, the corners are (0,0), (24,0), (0,30), and (18,12). Let's plug them into our profit equation P=10x+8yP = 10x + 8y:

  • (0,0): 10(0)+8(0)=$010(0) + 8(0) = \text{\textdollar}0
  • (24,0): 10(24)+8(0)=$24010(24) + 8(0) = \text{\textdollar}240
  • (0,30): 10(0)+8(30)=$24010(0) + 8(30) = \text{\textdollar}240
  • (18,12): 10(18)+8(12)=180+96=$27610(18) + 8(12) = 180 + 96 = \text{\textdollar}276

The best choice is to bake 18 chocolate cakes and 12 vanilla cakes, which gives the maximum profit of $276.

Real-World Puzzles

This simple bakery example shows the power of linear programming. But this method is used to solve much more complex problems in many different fields.

FieldApplication
LogisticsDetermining the most efficient routes for delivery trucks to save time and fuel.
ManufacturingDeciding how many units of different products to make to maximize profit, given production capacity.
FinanceCreating an investment portfolio that maximizes returns while minimizing risk.
TelecommunicationsOptimizing network flow to ensure signals travel as quickly and reliably as possible.
NutritionDesigning a diet plan that meets all nutritional requirements at the lowest possible cost.

Quantitative methods like linear programming help managers allocate scarce resources in an optimum manner while solving the problems involved in scheduling, product mix determination, and so on.

Now that you understand the basic building blocks, let's review the key terms.

Time to check your understanding.

Quiz Questions 1/6

What is the primary goal of linear programming?

Quiz Questions 2/6

In the bakery example, the equation P=10x+8yP = 10x + 8y represents which component of the linear programming problem?

By defining a goal, setting clear limits, and analyzing the possibilities, linear programming provides a powerful framework for making optimal decisions.