Linear programming was initially developed independently by George B.
Dantzig and Leonid Kantorovich in the first half of the 20th century for
solving resource planning problems. Even though linear programming is
insufficient for many modern-day applications in operations research, it
was useful in many economic and military contexts in the early days.
Graphical example
To motivate the subject of linear programming (LP), we begin
with a planning problem that can be solved graphically.
Problem.
Say you are a vendor of lemonade and lemon juice.
Each unit of lemonade requires 1 lemon and 2 litres of water.
Each unit of lemon juice requires 3 lemons and 1 litre of water.
Each unit of lemonade gives a profit of .
Each unit of lemon juice gives a profit of .
You have 6 lemons and 4 litres of water available.
How many units of lemonade and lemon juice should you
make to maximize profit?
If we let denote the number of units of lemonade to be made
and let denote the number of units of lemon juice to be made,
then the profit is given by dollars.
We call the objective function.
Note that there are a number of
constraints that and must satisfied.
First of all, and should be nonnegative.
The number of lemons needed to make units of lemonade
and units of lemon juice is and cannot exceed 6.
The number of litres of water needed to make units of lemonade
and units of lemon juice is and cannot exceed 4.
Hence, to determine the maximum profit, we need to
maximize subject to and satisfying
the constraints
,
,
, and
A more compact way to write the problem is as follows:
We can solve this maximizationproblem graphically as follows.
We first sketch the set of
satisfying the constraints, called the feasible region,
on the -plane.
We then take the objective function and turn it into
an equation of a line where is a parameter.
Note that as the value of increases,
the line defined by the equation
moves in the direction of the normal vector
. We call this direction
the direction of improvement.
Determining the maximum value of the objective function, called
the optimal value, subject
to the contraints amounts to finding the maximum value of
so that the line defined by the equation
still intersects the feasible region.
In the figure above, the lines
with at 0, 4 and 6.8 have been drawn.
From the picture,
we can see that if is greater than 6.8, the
line defined by will not intersect the feasible region.
Hence, the profit cannot exceed .
As the line does intersect the feasible region,
is the maximum value for the objective function.
Note that there is only one point in the feasible region that
intersects the line , namely
In other words, to maximize profit,
we want to make 1.2 units of lemonade and 1.6 units of lemon juice.
The above solution method can hardly be regarded as rigorous because we
relied on a picture to conclude that for all
satisfying the constraints.
But we can actually show this algebraically.
Note that multiplying both sides of the constraint gives
, and
multiplying both sides of the constraint gives
.
Hence, any that satisfies both
and must also satisfy
, which simplifies
to as desired! (Here, we used the fact that
if and , then .)
Now, one might ask if it is always possible to find an algebraic proof like
the one above for similar problems.
If the answer is “yes”, how does one find such a proof?
We will see answers to this question later on.
Before we end, let us consider the following problem:
Note that for any ,
satisfies all the constraints.
The value of the objective function at
is .
As , the value of
the objective function tends to .
Therefore, there is no minimum value for the objective function.
The problem is said to be unbounded.
Later on, we will see how to detect
unboundedness algorithmically.
Until then, we rely on inspection to identifying such a family of solutions
whenever possible.
Exercise.
Check that unboundedness can also be established by using
for .
Worked examples
Show that the problem
is unbounded.
We could glean some insight by first making a sketch
on the -plane.
The line defined by has -intercept .
Note that for ,
satisfies both inequalities
and the value of the objective function at
is .
Hence, there is no lower bound on the value of objective function.
Suppose that you are shopping for dietary supplements to satisfy your
required daily intake of 0.40mg of nutrient and
0.30mg of nutrient .
There are three popular products on the market. The costs and the amounts
of the two nutrients are given in the following table:
Product 1
Product 2
Product 3
Cost
$27
$31
$24
Amount of per daily serving
0.16 mg
0.21 mg
0.11 mg
Amount of per daily serving
0.19 mg
0.13 mg
0.15 mg
You want to determine how much of each product you should
buy so that the daily intake
requirements of the two nutrients are satisfied at minimum cost.
Formulate your problem as a linear programming problem,
assuming that you can buy a fractional number of each product.
Let denote the amount of Product to buy for .
Then, the problem can be formulated as
Remark.
If one cannot buy fractional amounts of the products, the problem
can be formulated as