3.2a. Solving Linear Programming Problems Graphically Finite Math
3.2a. Solving Linear Programming Problems Graphically Finite Math
https://courses.lumenlearning.com/sanjacinto-finitemath1/chapter/reading-meeting-demands-with-linear-programming/
Menu
Wouldn’t it be nice if we could simply produce and sell infinitely many units of a
product and thus make a never-ending amount of money? In business (and in
day-to-day living) we know that we cannot simply choose to do something
because it would make sense that it would (unreasonably) accomplish our goal.
Instead, our hope is to maximize or minimize some quantity, given a set of
constraints.
Think about this: you are traveling from Chandler, AZ, to San Diego, CA. Your
hope is to get there in as little time as possible, hence aiming to minimize travel
time. At the same time, you will be facing more or less traffic on certain stretches
of the trip, you will need to stop for gas at least once (unless you are driving a
hybrid vehicle), and, if you have kids, you’ll definitely need to stop for a restroom
break. While we have only mentioned a few, these are all
constraints—things that limit you in your goal to get to your destination in as little
time as possible.
Inequality constraints
An objective function, that is, a function whose value we either want to
be as large as possible (want to maximize it) or as small as possible
(want to minimize it).
Example 1
An airline offers coach and first-class tickets. For the airline to be profitable, it
must sell a minimum of 25 first-class tickets and a minimum of 40 coach tickets.
The company makes a profit of $225 for each coach ticket and $200 for each
first-class ticket. At most, the plane has a capacity of 150 travelers. How many of
each ticket should be sold in order to maximize profits?
Solution
The first step is to identify the unknown quantities. We are asked to find the
number of each ticket that should be sold. Since there are coach and first-class
tickets, we identify those as the unknowns. Let,
x = # of coach tickets
y = # of first-class tickets
Next, we need to identify the objective function. The question often helps us
identify the objective function. Since the goal is the maximize profits, our
objective is identified.
P = 225x + 200y
≥
The sum of first-class and coach tickets should be 150 or fewer. That is
x+y
150 ≤
≤
Thus, the objective function along with the three mathematical constraints is:
We will work to think about these constraints graphically and return to the
objective function afterwards. We will thus deal with the following graph:
Note that we are only interested in the first quadrant, since we cannot have
negative tickets.
We will first plot each of the inequalities as equations, and then worry about the
inequality signs. That is, first plot,
x= 25
y = 40
x + y = 150
The first two equations are horizontal and vertical lines, respectively. To plot x +
y= 150, it is preferable to find the horizontal and vertical intercepts.
≥
We first ask, when is y ≥
25? Since this is a horizontal line running through a y-value of 25, anything above
this line represents a value greater than 25. We denote this by shading above the
line:
This tells us that any point in the green shaded region satisfies the constraint
that
y
≥25.
≥
Next, we deal with
x
≥40. We ask, when is the x-value larger than 40? Values to the left are smaller
than 40, so we must shade to the right to get values larger than 40:
≥
The blue area satisfies the second constraint, but since we must satisfy
all constraints, only the region that is green and blue will suffice.
We have one more constraint to consider:
x+ y
≥150. We have two options, either shade below or shade above. To help us better
see that we will, in fact, need to shade below the line, let us consider an ordered
≥pair in both regions. Selecting an ordered pair above the line, such as (64, 130)
gives:
64 + 130≥ 150
Which is a false statement since 64 + 130 = 194, a value larger than 150.
According to the graph, the point (64, 65) is one that falls below the graph.
Putting this pair in yields the statement:
64 + 65≥ 150
Which is a true statement since 64+65 is 129, a value smaller than 150.
64≥40 TRUE
65≥ 25 TRUE
This gets us to a great point, but still does not answer the question:
which point maximizes profit? Fortunately, there is a theorem discovered by
mathematicians that allows us to answer this question.
First off, we define a new term: a corner point is a point that falls along the
corner of a feasible region. In our situation, we have three corner points, shown
on the graph as the solid black dots:
The objective function along with the three corner points above forms a bounded
linear programming problem. That is, imagine you are looking at three fence
posts connected by fencing (black point and lines, respectively). If you were to
put your dog in the middle, you could be sure it would not escape (assuming the
fence is tall enough). If this is the case, then you have a bounded linear
programming problem. If the dog could walk infinitely in any one direction, then
the problem is unbounded.
This means we have to choose among three corner points. To verify the “winner,”
we must see which of these three points maximizes the objective function. To
find the corner points as ordered pairs, we must solve three systems of two
equations each:
System 1
x = 40
x + y = 150
System 2
x = 40
y= 25
System 3
y = 25
x+ y = 150
We could decide to solve by using matrix equations, but these equations are all
simple enough to solve by hand:
System 1
(40) + y = 150
y = 110
Point:(40,110)
System 2
Point: (40,25)
System 3
x + 25 = 150
x = 125
Point: (125,25)
Point Profit
The third point, (125,25) maximizes profit. Therefore, we conclude that the airline
should sell 125 coach tickets and 25 first-class tickets in order to maximize
profits.
The above example was rather long and had many steps to complete. We will
summarize the procedure below:
b) A horizontal line
≤, shade below
≤
≥, shade above
≥
7. Test all corner points in the objective function. The “winning” point is
the point that optimizes the objective function (biggest if maximizing,
smallest if minimizing)
There is one instance in which we must take great caution. First, consider the
(true) inequality,
5>3
Suppose we were to divide both sides by –1. Would it still be true to say the
following?
5 3
−1 −1
>
5−1>3−1
−5 > −3
−5>−3
Clearly, –5 is not larger than –3! To keep the statement true, we should change
the direction of the inequality sign so that,
–5 < –3
We can see by the number line below, that the two sets of numbers are
symmetric about 0, except that the way in which we describe size is opposite.
This justifies that we should also use the opposite sign when we reflect values to
the other side of 0.
Example 2
Solution
For apricots, there are 3 servings in one pound. This means that the cost per
serving is $9.99/3 = $3.33. The cost for
x servings would thus be 3.33x.
For dates, there are 4 servings per pound. This means that the cost per serving is
$7.99/4
$2.00. The cost for y servings would thus be 2.00y.
C = 3.33x + 2.00y
≥ ≥
We have two major constraints (in addition to the constraints that 0
x ≥ and y ≥ 0,
given that negative servings cannot be used):
Mathematically,
Thus we have,
Subject To Constraints:
≥
407x + 271y ≥ 4700
≤
407x + 271y ≤ 9400
≥
x ≥
0
y
≥
≥0
≥
, we must shade above and, since the second inequality has, we must shade ≤
below (This idea can be confirmed by selecting points above and below each
line in order to verify.): ≤
The feasible region is the green and blue shaded section between the two lines.
We see that there are four corner points that form an upside-down trapezoid, as
shown in the graph below:
We must solve the following systems to find the corner points (bottom-to-top,
left-to-right)
System 1
x=0
Solution:
0 + 271
y = 4700
y ≈ 17.3
Point: (0,17.3)
System 2
x=0
Solution:
0 + 271y = 9400
y ≈ 34.7
Point: (0,34.7)
System 3
y=0
Solution:
407x + 0 = 4700
x ≈ 11.5
Point: (11.5,0)
System 4
y=0
Solution:
407x + 0 = 9400
x ≈ 23.1
Point: (23.1,0)
Again, we could solve by using matrix equations, but the systems are
straightforward to solve by substitution. Since the problem is bounded, we now
check to see which one minimizes cost:
Point Cost
The cheapest route for the company will be to create bars that contain no dried
apricots and 17.3 servings of dried dates.
Why are we seeing what we’re seeing? This is truly a case of real-world product
creation! Of course, it doesn’t make sense to increase the daily intake for the box,
since this would mean increasing the amount of dried fruit, hence increasing
cost. Since the cost of dried dates is cheaper ($2.00 per serving) and since for
the price of one serving of apricots ($3.33 per serving) we can pay:
$ 3.33
407mg$3.33≈122.2
and
$ 2.00
271mg$2.00≈135.5
It makes complete sense to buy dates, since the same dollar amount yields a
higher content of potassium.
The question still remains: is it desirable to require a larger quantity of dates for a
smaller price, or is it more desirable to require a smaller quantity of apricots for a
larger price? This indeed depends on the constraints. The company might want
to consider the amount of packaging/processing/etc. required in both instances.
Perhaps the manufacturing and packaging costs could add constraints that alter
the decision-making process. A similar problem will be left as a homework
exercise for the reader to think about.
There are two terms we should be familiar with when dealing with
inequalities: bounded and unbounded. A feasible region is said to be bounded if
the constraints enclose the feasible region.
That is, if the shading does not continue to cover the entire plane, we are dealing
with a bounded linear programming problem.
Both examples thus far have been examples of bounded linear programming
problems, since the first feasible region was in the shape of a triangle and the
second in the shape of a trapezoid.
If the feasible region cannot be enclosed among the lines formed by constraints,
it is said to be unbounded. An example of an unbounded linear programming
problem would be:
Example 3
Solution
The college would like to minimize its total expenditures, so the objective
function must include the total amount of money outflows. Since the new
secretaries will require a total budget of
$28,000 × 8 = $224,000 and the faculty a total budget of $40,000 × 7 = $280,000,
the total cost will be the raise percentage for each group, multiplied by the total
salaries:
C = 224x + 280y
There is one constraint given, which is that the total raises must be $5,000 or
less. That is,
≤
224x + 280y ≤ 5
≥ ≥
Of course, the college does not want to reduce the salaries, so
x ≥ 0 and y ≥ 0.
Horizontal Intercept:
224(0) + 280
y=5
y ≈ .018
Vertical Intercept
224x + 280(0) = 5
x ≈ .022
We then plot the points and connect them with a straight line:
≤
Since the inequality sign is ≤, we shade below the line:
This gives us three corner points, as shown above. We test each to verify which
of the pairs of percentages gives the minimum cost:
Point Cost
Clearly, the first option gives the smallest cost; however, this combination of tells
us to give a 0% raise to both groups, which, of course, is not practical, since the
company’s goal was to give a raise to each group.
Why did this happen, and what should we do to fix it? Well, when we think about
the constraint of spending $5,000 or less and hoping to make expenditures as
small as possible, wouldn’t it make sense to say, “don’t spend anything!”? This
outcome will occur anytime we are minimizing, have constraints with the
le inequality sign, and when the origin is included in the feasible region. To fix the
problem, the company should make additional specifications, such as, what is
the minimum percentage raise to give to each group? Is it desirable for one of the
raises to be larger than the other? These are questions the analyst should
discuss with human resources and administration.
Practice Problems
a) Maximize R = 2x + 3y
Subject to
–2x – y
≥
≥
–10
x + 3y
≥
≥
6
≥
x ≥
0
y
≥
≥
0
B) Minimize T = 3x + y
Subject to
x + 2y
≥
≥
4
x + 3y
≥
≥
6
≥
x ≥
0
y
≥
≥
0
2) A local school governing board approves a new math education program that
is to be implemented at a series of elementary schools within the district. Money
for the program will come from two different budgets: public expenditures
budget and grade-school initiatives budget. The board is willing to pay at least
half of what comes out of the initiatives budget from its public expenditures
budget. Since this program is considered an initiative, the government mandates
that at least $2,000 comes from the local initiatives budget. Both budgets are
partially funded by federal emergency funding. For the public expenditures
budget, the percentage is 55% and 23% for the grade-school initiatives budget. In
order to properly use emergency funding, the district would like to minimize the
use of federal dollars. How much should come from each budget?
Minimize: C=0.55x+0.23y
(1/2)x≥y or {(1/2)x-y≥0}
y≥2000
x,y≥0
Maximize: R=1200000x+2000000y
Subject to:
x+y≥15
1100x+1600y≤50000
x≥3
y≥3
x,y≥0
(3,12) 27,600,000
(12,3) 20,400,000
(3,29.2) 62,000,000
(41.1,3) 55,320,000
Optimal Solution
(3,29.2) 62,000,000
Previous Next