Book Math - 250104 - 130051
Book Math - 250104 - 130051
1
MATRICES
2
A Victor : List of Numbers arranged in a row or
column
Matrix of consumption
c11 c12 c13 0 10 5
C= = 4 0 6
c21 c22 c23
3
Individual 1 consumes 0 of X, 10 of Y and 5 of Z
Individual 2 consumes 4 of X, 0 of Y and 6 of Z
NOTE
Row Vector is a matrix with only 1 row : A = [5 4 3] 1X3
matrix
5
Column Vector is a matrix with only 1 column : A = 4 3 X 1
3
matrix
Transposing Matrices
Then
a11 a21
a a
AT = 12 22
3X2 matrix
a 13 a23
4
Adding and Subtracting Matrices
Matrices must have same number of rows and columns, m
Xn
9 − 3 5 2 1 3 15 2
4 1 + − 1 6 + 3 − 2 = 6 5
9 − 3 5 2 4 − 5
4 1 − − 1 6 = 5 − 5
Multiplying Matrices
To multiply A and B,
Then A x B = C
(1x 3) (3x 2) = (1x 2)
5
b11 b12
a11 a12 a13 .b21 b22 = c11 c12
b31 b32
1 2
2 3 4 . 5 3 = 25 29
2 4
c11 = (2x1) + (3x5) + (4x2) = 25
c12 = (2x2) + (3x3) + (4x4) = 29
6
SCALAR MULTIPLICATION
a11 a12
If A = a21 a22
3 a11 3 a12
Then 3A = 3 a
21 3 a22
4 3 8 6
A = 2 1 then 2A = 4 2
12 9
And 3A = 6 3
Determinant of a Matrix
a11 a12 a b
=
If A = a 21
a22 c d
MATRIX INVERSION
Square matrix: no. rows = no. columns
Identity Matrix I: AI = A and IA = A
1 0
I = 0 1 (for 2 X 2 matrix)
TO INVERT 2 X 2 MATRIX……
a b
If A = c d
d − c
1) Get Cofactor Matrix: − b a
d − b
2) Transpose Cofactor Matrix: − c a
8
1 1 d − b
multiply matrix by | A | so
3) ad − bc − c a (i.e. divide
1 2
A = 3 4
1 4 − 2 − 2 1
A –1 = − 2 − 3 1 = 23 − 12
1 0
Check : A.A-1 = I = 0 1
9
Example….find the inverse of matrix B
2 4
B = 5 10
Y = Income
C = Consumption
I = Investment
G= Government expenditure
Y = C+I+G (1)
10
Solve the above equations directly, substituting expression for C
in eq. (2) into eq. (1)
Thus, Y = a + bY+I+G
Solve for Y as:
Y – bY = a + I + G
Y(1 – b) = a + I + G
a+ I +G
Y=
Thus, 1− b
Substitute this value for Y into eq. (2) and solve for C:
a + I + G ( I + G )b + a
C = a + b =
1− b 1− b
11
Method 2
Now solve the same problem using matrix algebra:
• Rewrite (1) and (2) with endogenous variables, C and Y, on
left hand side
From eq. 1: Y - C =I+G
From eq. 2: -bY + C = a
• Now write this in matrix notation:
1 − 1 Y I + G
− b 1 C = a
or A.X = B
1 − 1
A=
• In this case, where −
b 1
12
the determinant of A is :
|A| = 1.1 – [– 1.– b] = 1 – b
1 b
Cofactor Matrix: 1 1
1 1
Transpose Cofactor Matrix: b 1
The inverse is :
1 1
−11 1 1 1 − b 1 − b
A = =
1 − b b 1 b 1
1 − b 1 − b
• so X=A-1B
Y I + G
X = B = a
where and
C
13
1 1
Y 1 − b 1 − b I + G
X = =
b 1
C a
1 − b 1 − b
I +G+a
Y 1 − b
C = ( I + G )b + a
1− b
1 − 1
A=
− b 1
Y
X =
C
14
I + G
B=
a
I + G − 1
A1 =
a 1
| A1 | I + G + a
Y= =
|A| 1− b
• Replace column 2 of A with the elements of vector b
1 I + G
A2 =
− b a
15
• Calculate the determinant of this as:
|A2|=(1)(a) – (I+G)(– b) = a+b(I+G)
| A2 | a + b( I + G )
C= =
|A| 1− b
(just as we derived using the other 2 methods)
TO INVERT 3 X 3 MATRIX……
To find inverse of 3 X 3 matrix, First need to calculate determinant
16
Co-factor Cij = determinant of 2X2 matrix obtained by
deleting row i and column j of A, prefixed by + or –
according to following pattern…
+ − +
− + −
+ − +
17
e.g find all co-factors of matrix
2 4 1
4 3 7
A=
2 1 3
18
Other co-factors compute as
4 3
C13 = + 2 1 = +[4.1 – (3.6)] = -2
4 1
C21 = – 1 3 = – [4.3 – (1.1)] = –11
2 1
C22= + 2 3 = +[2.3 – (1.2)] = 4
2 4
C23= – 2 1 = – [2.1 – (4.2)] = 6
4 1
C31 = + 3 7 = +[4.7 – (1.3)] = 25
2 1
C32= – 4 7 = – [2.7 – (1.4)] = -10
2 4
C33= + 4 3 = +[2.3 – (4.4)] = -10
2 2 −2
− 11 4 6
Co-factor Matrix =
25 − 10 − 10
19
Now we can find the determinant……
Multiply elements in any one row or any one column by
corresponding co-factors, and sum…..
2 4 1
4 3 7
so the determinant of A=
2 1 3
20
C11 C12 C13 2 2 −2
C − 11 4
C 21 C 22 23 = 6
C31 C32 C33 25 − 10 − 10
1 − 10
11 5
5 2
15 2
5
− 1
So A-1 = − 1 3
− 1
5 5
21
Check : A.A-1 = I
Practice inverting various 2X2 and 3X3 matrices using examples from Jacques, or other similar text books.
22
Probability
24
Probability
Introduction
The probability of a specified event is the chance or likelihood that it will occur. There are
several ways of viewing probability. One would be experimental in nature, where we
repeatedly conduct an experiment. Suppose we flipped a coin over and over and over again
and it came up heads about half of the time; we would expect that in the future whenever we
flipped the coin it would turn up heads about half of the time. When a weather reporter says
“there is a 10% chance of rain tomorrow,” she is basing that on prior evidence; that out of all
days with similar weather patterns, it has rained on 1 out of 10 of those days.
Another view would be subjective in nature, in other words an educated guess. If someone
asked you the probability that the Seattle Mariners would win their next baseball game, it
would be impossible to conduct an experiment where the same two teams played each other
repeatedly, each time with the same starting lineup and starting pitchers, each starting at the
same time of day on the same field under the precisely the same conditions. Since there are
so many variables to take into account, someone familiar with baseball and with the two
teams involved might make an educated guess that there is a 75% chance they will win the
game; that is, if the same two teams were to play each other repeatedly under identical
conditions, the Mariners would win about three out of every four games. But this is just a
guess, with no way to verify its accuracy, and depending upon how educated the educated
guesser is, a subjective probability may not be worth very much.
We will return to the experimental and subjective probabilities from time to time, but in this
course we will mostly be concerned with theoretical probability, which is defined as
follows: Suppose there is a situation with n equally likely possible outcomes and that m of
those n outcomes correspond to a particular event; then the probability of that event is
m
defined as .
n
Basic Concepts
If you roll a die, pick a card from deck of playing cards, or randomly select a person and
observe their hair color, we are executing an experiment or procedure. In probability, we
look at the likelihood of different outcomes. We begin with some terminology.
Example 1
25
If we roll a standard 6-sided die, describe the sample space and some simple events.
The sample space is the set of all possible simple events: {1,2,3,4,5,6}
Basic Probability
Given that all outcomes are equally likely, we can compute the probability of an event
E using this formula:
Number of outcomes corresponding to the event E
P(E) =
Total number of equally-likely outcomes
Example 2
If we roll a 6-sided die, calculate
a) P(rolling a 1)
b) P(rolling a number bigger than 4)
Probabilities are essentially fractions, and can be reduced to lower terms like fractions.
Example 3
Let's say you have a bag with 20 cherries, 14 sweet and 6 sour. If you pick a cherry at
random, what is the probability that it will be sweet?
There are 20 possible cherries that could be picked, so the number of possible outcomes is
20. Of these 20 possible outcomes, 14 are favorable (sweet), so the probability that the cherry
14 7
will be sweet is = .
20 10
There is one potential complication to this example, however. It must be assumed that the
probability of picking any of the cherries is the same as the probability of picking any other.
26
This wouldn't be true if (let us imagine) the sweet cherries are smaller than the sour ones.
(The sour cherries would come to hand more readily when you sampled from the bag.) Let us
keep in mind, therefore, that when we assess probabilities in terms of the ratio of favorable to
all potential cases, we rely heavily on the assumption of equal probability for all outcomes.
Try it Now 1
At some random moment, you look at your clock and note the minutes reading.
a. What is probability the minutes reading is 15?
b. What is the probability the minutes reading is 15 or less?
Cards
A standard deck of 52 playing cards consists of four suits (hearts, spades, diamonds
and clubs). Spades and clubs are black while hearts and diamonds are red. Each suit
contains 13 cards, each of a different rank: an Ace (which in many games functions as
both a low card and a high card), cards numbered 2 through 10, a Jack, a Queen and a
King.
Example 4
Compute the probability of randomly drawing one card from a deck and getting an Ace.
4 1
There are 52 cards in the deck and 4 Aces so P ( Ace ) = = 0.0769
52 13
We can also think of probabilities as percents: There is a 7.69% chance that a randomly
selected card will be an Ace.
Notice that the smallest possible probability is 0 – if there are no outcomes that correspond
with the event. The largest possible probability is 1 – if all possible outcomes correspond
with the event.
In the course of this chapter, if you compute a probability and get an answer that is negative
or greater than 1, you have made a mistake and should check your work.
27
Working with Events
Complementary Events
Now let us examine the probability that an event does not happen. As in the previous section,
consider the situation of rolling a six-sided die and first compute the probability of rolling a
six: the answer is P(six) =1/6. Now consider the probability that we do not roll a six: there
5
are 5 outcomes that are not a six, so the answer is P(not a six) = . Notice that
6
1 5 6
P ( six ) + P ( not a six ) = + = = 1
6 6 6
This is not a coincidence. Consider a generic situation with n possible outcomes and an
event E that corresponds to m of these outcomes. Then the remaining n - m outcomes
correspond to E not happening, thus
n−m n m m
P ( not E ) = = − = 1− = 1− P ( E )
n n n n
Complement of an Event
The complement of an event is the event “E doesn’t happen”
The notation E is used for the complement of event E.
We can compute the probability of the complement using P ( E ) = 1 − P ( E )
Notice also that P ( E ) = 1 − P ( E )
Example 5
If you pull a random card from a deck of playing cards, what is the probability it is not a
heart?
13 1
There are 13 hearts in the deck, so P ( heart ) = = .
52 4
The probability of not drawing a heart is the complement:
1 3
P ( not heart ) = 1 − P ( heart ) = 1 − =
4 4
Example 6
Suppose we flipped a coin and rolled a die, and wanted to know the probability of getting a
head on the coin and a 6 on the die.
28
Notice there are 2 · 6 = 12 total outcomes. Out of these, only 1 is the desired outcome, so the
1
probability is .
12
Independent Events
Events A and B are independent events if the probability of Event B occurring is the
same whether or not Event A occurs.
Example 7
Are these events independent?
a) A fair coin is tossed two times. The two events are (1) first toss is a head and (2) second
toss is a head.
b) The two events (1) "It will rain tomorrow in Houston" and (2) "It will rain tomorrow in
Galveston” (a city near Houston).
c) You draw a card from a deck, then draw a second card without replacing the first.
a) The probability that a head comes up on the second toss is 1/2 regardless of whether or not
a head came up on the first toss, so these events are independent.
b) These events are not independent because it is more likely that it will rain in Galveston on
days it rains in Houston than on days it does not.
c) The probability of the second card being red depends on whether the first card is red or
not, so these events are not independent.
When two events are independent, the probability of both occurring is the product of the
probabilities of the individual events.
where P(A and B) is the probability of events A and B both occurring, P(A) is the
probability of event A occurring, and P(B) is the probability of event B occurring
29
If you look back at the coin and die example from earlier, you can see how the number of
outcomes of the first event multiplied by the number of outcomes in the second event
multiplied to equal the total number of possible outcomes in the combined event.
Example 8
In your drawer you have 10 pairs of socks, 6 of which are white, and 7 tee shirts, 3 of which
are white. If you randomly reach in and pull out a pair of socks and a tee shirt, what is the
probability both are white?
6
The probability of choosing a white pair of socks is .
10
3
The probability of choosing a white tee shirt is
.
7
6 3 18 9
The probability of both being white is = =
10 7 70 35
Try it Now 2
A card is pulled a deck of cards and noted. The card is then replaced, the deck is shuffled,
and a second card is removed and noted. What is the probability that both cards are Aces?
The previous examples looked at the probability of both events occurring. Now we will look
at the probability of either event occurring.
Example 9
Suppose we flipped a coin and rolled a die, and wanted to know the probability of getting a
head on the coin or a 6 on the die.
By simply counting, we can see that 7 of the outcomes have a head on the coin or a 6 on the
die or both – we use or inclusively here (these 7 outcomes are H1, H2, H3, H4, H5, H6, T6),
7
so the probability is . How could we have found this from the individual probabilities?
12
1 1
As we would expect, of these outcomes have a head, and of these outcomes have a 6
2 6
1 1 6 2 8
on the die. If we add these, + = + = , which is not the correct probability.
2 6 12 12 12
Looking at the outcomes we can see why: the outcome H6 would have been counted twice,
1
since it contains both a head and a 6; the probability of both a head and rolling a 6 is .
12
30
8 1 7
If we subtract out this double count, we have the correct probability: − = .
12 12 12
P(A or B)
The probability of either A or B occurring (or both) is
Example 10
Suppose we draw one card from a standard deck. What is the probability that we get a Queen
or a King?
There are 4 Queens and 4 Kings in the deck, hence 8 outcomes corresponding to a Queen or
King out of 52 possible outcomes. Thus the probability of drawing a Queen or a King is:
8
P ( King or Queen ) =
52
Note that in this case, there are no cards that are both a Queen and a King, so
P ( King and Queen ) = 0 . Using our probability rule, we could have said:
4 4 8
P ( King or Queen ) = P ( King ) + P ( Queen ) − P ( King and Queen ) = + −0 =
52 52 52
In the last example, the events were mutually exclusive, so P(A or B) = P(A) + P(B).
Example 11
Suppose we draw one card from a standard deck. What is the probability that we get a red
card or a King?
26
Half the cards are red, so P ( red ) =
52
4
There are four kings, so P ( King ) =
52
2
There are two red kings, so P ( Red and King ) =
52
We can then calculate
26 4 2 28
P ( Red or King ) = P ( Red ) + P ( King ) − P ( Red and King ) = + − =
52 52 52 52
Try it Now 3
31
In your drawer you have 10 pairs of socks, 6 of which are white, and 7 tee shirts, 3 of which
are white. If you reach in and randomly grab a pair of socks and a tee shirt, what the
probability at least one is white?
Example 12
The table below shows the number of survey subjects who have received and not received a
speeding ticket in the last year, and the color of their car. Find the probability that a
randomly chosen person:
a) Has a red car and got a speeding ticket
b) Has a red car or got a speeding ticket.
Speeding No speeding Total
ticket ticket
Red car 15 135 150
Not red car 45 470 515
Total 60 605 665
We can see that 15 people of the 665 surveyed had both a red car and got a speeding ticket,
15
so the probability is 0.0226 .
665
Notice that having a red car and getting a speeding ticket are not independent events, so the
probability of both of them occurring is not simply the product of probabilities of each one
occurring.
We could answer this question by simply adding up the numbers: 15 people with red cars
and speeding tickets + 135 with red cars but no ticket + 45 with a ticket but no red car = 195
195
people. So the probability is 0.2932 .
665
Conditional Probability
Often it is required to compute the probability of an event given that another event has
occurred.
Example 13
What is the probability that two cards drawn at random from a deck of playing cards will
both be aces?
32
It might seem that you could use the formula for the probability of two independent events
4 4 1
and simply multiply = . This would be incorrect, however, because the two
52 52 169
events are not independent. If the first card drawn is an ace, then the probability that the
second card is also an ace would be lower because there would only be three aces left in the
deck.
Once the first card chosen is an ace, the probability that the second card chosen is also an ace
is called the conditional probability of drawing an ace. In this case the "condition" is that
the first card is an ace. Symbolically, we write this as:
P(ace on second draw | an ace on the first draw).
The vertical bar "|" is read as "given," so the above expression is short for "The probability
that an ace is drawn on the second draw given that an ace was drawn on the first draw." What
is this probability? After an ace is drawn on the first draw, there are 3 aces out of 51 total
cards left. This means that the conditional probability of drawing an ace after one ace has
3 1
already been drawn is = .
51 17
4 3 12 1
Thus, the probability of both cards being aces is = = .
52 51 2652 221
Conditional Probability
The probability the event B occurs, given that event A has happened, is represented as
P(B | A)
This is read as “the probability of B given A”
Example 14
Find the probability that a die rolled shows a 6, given that a flipped coin shows a head.
1
These are two independent events, so the probability of the die rolling a 6 is , regardless of
6
the result of the coin flip.
Example 15
The table below shows the number of survey subjects who have received and not received a
speeding ticket in the last year, and the color of their car. Find the probability that a
randomly chosen person:
a) Has a speeding ticket given they have a red car
b) Has a red car given they have a speeding ticket
33
Speeding No speeding Total
ticket ticket
Red car 15 135 150
Not red car 45 470 515
Total 60 605 665
a) Since we know the person has a red car, we are only considering the 150 people in the first
row of the table. Of those, 15 have a speeding ticket, so
15 1
P(ticket | red car) = = = 0.1
150 10
b) Since we know the person has a speeding ticket, we are only considering the 60 people in
the first column of the table. Of those, 15 have a red car, so
15 1
P(red car | ticket) = = = 0.25 .
60 4
Notice from the last example that P(B | A) is not equal to P(A | B).
These kinds of conditional probabilities are what insurance companies use to determine your
insurance rates. They look at the conditional probability of you having accident, given your
age, your car, your car color, your driving history, etc., and price your policy based on that
likelihood.
Example 16
If you pull 2 cards out of a deck, what is the probability that both are spades?
13
The probability that the first card is a spade is .
52
12
The probability that the second card is a spade, given the first was a spade, is , since there
51
is one less spade in the deck, and one less total cards.
13 12 156
The probability that both cards are spades is = 0.0588
52 51 2652
Example 17
If you draw two cards from a deck, what is the probability that you will get the Ace of
Diamonds and a black card?
34
You can satisfy this condition by having Case A or Case B, as follows:
Case A) you can get the Ace of Diamonds first and then a black card or
Case B) you can get a black card first and then the Ace of Diamonds.
Let's calculate the probability of Case A. The probability that the first card is the Ace of
1
Diamonds is . The probability that the second card is black given that the first card is the
52
26
Ace of Diamonds is because 26 of the remaining 51 cards are black. The probability is
51
1 26 1
therefore = .
52 51 102
26 1
Now for Case B: the probability that the first card is black is = . The probability that the
52 2
1
second card is the Ace of Diamonds given that the first card is black is . The probability
51
1 1 1
of Case B is therefore = , the same as the probability of Case 1.
2 51 102
Recall that the probability of A or B is P(A) + P(B) - P(A and B). In this problem, P(A and
B) = 0 since the first card cannot be the Ace of Diamonds and be a black card. Therefore, the
1 1 2 1
probability of Case A or Case B is + = = . The probability that you will get
102 102 102 51
1
the Ace of Diamonds and a black card when drawing two cards from a deck is .
51
Try it Now 4
In your drawer you have 10 pairs of socks, 6 of which are white. If you reach in and
randomly grab two pairs of socks, what is the probability that both are white?
Example 18
A home pregnancy test was given to women, then pregnancy was verified through blood
tests. The following table shows the home pregnancy test results. Find
a) P(not pregnant | positive test result)
b) P(positive test result | not pregnant)
Positive Negative test Total
test
Pregnant 70 4 74
Not Pregnant 5 14 19
Total 75 18 93
35
a) Since we know the test result was positive, we’re limited to the 75 women in the first
5
column, of which 5 were not pregnant. P(not pregnant | positive test result) = 0.067 .
75
b) Since we know the woman is not pregnant, we are limited to the 19 women in the second
5
row, of which 5 had a positive test. P(positive test result | not pregnant) = 0.263
19
The second result is what is usually called a false positive: A positive result when the
woman is not actually pregnant.
Bayes Theorem
In this section we concentrate on the more complex conditional probability problems we
began looking at in the last section.
Example 19
Suppose a certain disease has an incidence rate of 0.1% (that is, it afflicts 0.1% of the
population). A test has been devised to detect this disease. The test does not produce false
negatives (that is, anyone who has the disease will test positive for it), but the false positive
rate is 5% (that is, about 5% of people who take the test will test positive, even though they
do not have the disease). Suppose a randomly selected person takes the test and tests
positive. What is the probability that this person actually has the disease?
There are two ways to approach the solution to this problem. One involves an important
result in probability theory called Bayes' theorem. We will discuss this theorem a bit later,
but for now we will use an alternative and, we hope, much more intuitive approach.
Suppose a certain disease has an incidence rate of 0.1% (that is, it afflicts 0.1% of the
population). The percentage 0.1% can be converted to a decimal number by moving the
decimal place two places to the left, to get 0.001. In turn, 0.001 can be rewritten as a
fraction: 1/1000. This tells us that about 1 in every 1000 people has the disease. (If we
wanted we could write P(disease)=0.001.)
A test has been devised to detect this disease. The test does not produce false negatives (that
is, anyone who has the disease will test positive for it). This part is fairly straightforward:
everyone who has the disease will test positive, or alternatively everyone who tests negative
does not have the disease. (We could also say P(positive | disease)=1.)
The false positive rate is 5% (that is, about 5% of people who take the test will test positive,
even though they do not have the disease). This is even more straightforward. Another way
of looking at it is that of every 100 people who are tested and do not have the disease, 5 will
36
test positive even though they do not have the disease. (We could also say that P(positive |
no disease)=0.05.)
Suppose a randomly selected person takes the test and tests positive. What is the probability
that this person actually has the disease? Here we want to compute P(disease positive). We
already know that P(positive disease)=1 but remember that conditional probabilities are not
equal if the conditions are switched.
Rather than thinking in terms of all these probabilities we have developed, let's create a
hypothetical situation and apply the facts as set out above. First, suppose we randomly select
1000 people and administer the test. How many do we expect to have the disease? Since
about 1/1000 of all people are afflicted with the disease, 1/1000 of 1000 people is 1. (Now
you know why we chose 1000.) Only 1 of 1000 test subjects actually has the disease; the
other 999 do not.
We also know that 5% of all people who do not have the disease will test positive. There are
999 disease-free people, so we would expect (0.05)(999)=49.95 (so, about 50) people to test
positive who do not have the disease.
Now back to the original question, computing P(disease positive). There are 51 people who
test positive in our example (the one unfortunate person who actually has the disease, plus
the 50 people who tested positive but don't). Only one of these people has the disease, so
1
P(disease | positive) 0.0196
51
or less than 2%. Does this surprise you? This means that of all people who test positive,
over 98% do not have the disease.
The answer we got was slightly approximate, since we rounded 49.95 to 50. We could redo
the problem with 100,000 test subjects, 100 of whom would have the disease and
(0.05)(99,900)=4995 test positive but do not have the disease, so the exact probability of
having the disease if you test positive is
100
P(disease | positive) 0.0196
5095
which is pretty much the same answer.
But back to the surprising result. Of all people who test positive, over 98% do not have the
disease. If your guess for the probability a person who tests positive has the disease was
wildly different from the right answer (2%), don't feel bad. The exact same problem was
posed to doctors and medical students at the Harvard Medical School 25 years ago and the
results revealed in a 1978 New England Journal of Medicine article. Only about 18% of the
participants got the right answer. Most of the rest thought the answer was closer to 95%
(perhaps they were misled by the false positive rate of 5%).
So at least you should feel a little better that a bunch of doctors didn't get the right answer
either (assuming you thought the answer was much higher). But the significance of this
finding and similar results from other studies in the intervening years lies not in making math
37
students feel better but in the possibly catastrophic consequences it might have for patient
care. If a doctor thinks the chances that a positive test result nearly guarantees that a patient
has a disease, they might begin an unnecessary and possibly harmful treatment regimen on a
healthy patient. Or worse, as in the early days of the AIDS crisis when being HIV-positive
was often equated with a death sentence, the patient might take a drastic action and commit
suicide.
As we have seen in this hypothetical example, the most responsible course of action for
treating a patient who tests positive would be to counsel the patient that they most likely do
not have the disease and to order further, more reliable, tests to verify the diagnosis.
One of the reasons that the doctors and medical students in the study did so poorly is that
such problems, when presented in the types of statistics courses that medical students often
take, are solved by use of Bayes' theorem, which is stated as follows:
Bayes’ Theorem
P ( A ) P ( B | A)
P( A | B) =
P ( A ) P ( B | A) + P ( A ) P( B | A)
The problem is that you (or the typical medical student, or even the typical math professor)
are much more likely to be able to remember the original solution than to remember Bayes'
theorem. Psychologists, such as Gerd Gigerenzer, author of Calculated Risks: How to Know
When Numbers Deceive You, have advocated that the method involved in the original
solution (which Gigerenzer calls the method of "natural frequencies") be employed in place
of Bayes' Theorem. Gigerenzer performed a study and found that those educated in the
natural frequency method were able to recall it far longer than those who were taught Bayes'
theorem. When one considers the possible life-and-death consequences associated with such
calculations it seems wise to heed his advice.
Example 20
A certain disease has an incidence rate of 2%. If the false negative rate is 10% and the false
positive rate is 1%, compute the probability that a person who tests positive actually has the
disease.
38
Imagine 10,000 people who are tested. Of these 10,000, 200 will have the disease; 10% of
them, or 20, will test negative and the remaining 180 will test positive. Of the 9800 who do
not have the disease, 98 will test positive. So of the 278 total people who test positive, 180
will have the disease. Thus
180
P(disease | positive) = 0.647
278
so about 65% of the people who test positive will have the disease.
Try it Now 5
A certain disease has an incidence rate of 0.5%. If there are no false negatives and if the false
positive rate is 3%, compute the probability that a person who tests positive actually has the
disease.
Counting
Counting? You already know how to count or you wouldn't be taking a college-level math
class, right? Well yes, but what we'll really be investigating here are ways of counting
efficiently. When we get to the probability situations a bit later in this chapter we will need
to count some very large numbers, like the number of possible winning lottery tickets. One
way to do this would be to write down every possible set of numbers that might show up on a
lottery ticket, but believe me: you don't want to do this.
Basic Counting
We will start, however, with some more reasonable sorts of counting problems in order to
develop the ideas that we will soon need.
Example 21
Suppose at a particular restaurant you have three choices for an appetizer (soup, salad or
breadsticks) and five choices for a main course (hamburger, sandwich, quiche, fajita or
pizza). If you are allowed to choose exactly one item from each category for your meal, how
many different meal options do you have?
Solution 1: One way to solve this problem would be to systematically list each possible
meal:
soup + hamburger soup + sandwich soup + quiche
soup + fajita soup + pizza salad + hamburger
salad + sandwich salad + quiche salad + fajita
salad + pizza breadsticks + hamburger breadsticks + sandwich
breadsticks + quiche breadsticks + fajita breadsticks + pizza
39
Assuming that we did this systematically and that we neither missed any possibilities nor
listed any possibility more than once, the answer would be 15. Thus you could go to the
restaurant 15 nights in a row and have a different meal each night.
Solution 2: Another way to solve this problem would be to list all the possibilities in a table:
hamburger sandwich quiche fajita pizza
soup soup+burger
salad salad+burger
bread etc.
In each of the cells in the table we could list the corresponding meal: soup + hamburger in
the upper left corner, salad + hamburger below it, etc. But if we didn't really care what the
possible meals are, only how many possible meals there are, we could just count the number
of cells and arrive at an answer of 15, which matches our answer from the first solution. (It's
always good when you solve a problem two different ways and get the same answer!)
Solution 3: We already have two perfectly good solutions. Why do we need a third? The
first method was not very systematic, and we might easily have made an omission. The
second method was better, but suppose that in addition to the appetizer and the main course
we further complicated the problem by adding desserts to the menu: we've used the rows of
the table for the appetizers and the columns for the main courses—where will the desserts
go? We would need a third dimension, and since drawing 3-D tables on a 2-D page or
computer screen isn't terribly easy, we need a better way in case we have three categories to
choose form instead of just two.
So, back to the problem in the example. What else can we do? Let's draw a tree diagram:
40
This is called a "tree" diagram because at each stage we branch out, like the branches on a
tree. In this case, we first drew five branches (one for each main course) and then for each of
those branches we drew three more branches (one for each appetizer). We count the number
of branches at the final level and get (surprise, surprise!) 15.
If we wanted, we could instead draw three branches at the first stage for the three appetizers
and then five branches (one for each main course) branching out of each of those three
branches.
OK, so now we know how to count possibilities using tables and tree diagrams. These
methods will continue to be useful in certain cases, but imagine a game where you have two
decks of cards (with 52 cards in each deck) and you select one card from each deck. Would
you really want to draw a table or tree diagram to determine the number of outcomes of this
game?
Let's go back to the previous example that involved selecting a meal from three appetizers
and five main courses, and look at the second solution that used a table. Notice that one way
to count the number of possible meals is simply to number each of the appropriate cells in the
table, as we have done above. But another way to count the number of cells in the table
would be multiply the number of rows (3) by the number of columns (5) to get 15. Notice
that we could have arrived at the same result without making a table at all by simply
multiplying the number of choices for the appetizer (3) by the number of choices for the main
course (5). We generalize this technique as the basic counting rule:
Example 22
There are 21 novels and 18 volumes of poetry on a reading list for a college English course.
How many different ways can a student select one novel and one volume of poetry to read
during the quarter?
There are 21 choices from the first category and 18 for the second, so there are 21 · 18 = 378
possibilities.
The Basic Counting Rule can be extended when there are more than two categories by
applying it repeatedly, as we see in the next example.
Example 23
41
Suppose at a particular restaurant you have three choices for an appetizer (soup, salad or
breadsticks), five choices for a main course (hamburger, sandwich, quiche, fajita or pasta)
and two choices for dessert (pie or ice cream). If you are allowed to choose exactly one item
from each category for your meal, how many different meal options do you have?
There are 3 choices for an appetizer, 5 for the main course and 2 for dessert, so there are
3 · 5 · 2 = 30 possibilities.
Example 24
A quiz consists of 3 true-or-false questions. In how many ways can a student answer the
quiz?
There are 3 questions. Each question has 2 possible answers (true or false), so the quiz may
be answered in 2 · 2 · 2 = 8 different ways. Recall that another way to write 2 · 2 · 2 is 23,
which is much more compact.
Try it Now 6
Suppose at a particular restaurant you have eight choices for an appetizer, eleven choices for
a main course and five choices for dessert. If you are allowed to choose exactly one item
from each category for your meal, how many different meal options do you have?
Permutations
In this section we will develop an even faster way to solve some of the problems we have
already learned to solve by other means. Let's start with a couple examples.
Example 25
How many different ways can the letters of the word MATH be rearranged to form a four-
letter code word?
This problem is a bit different. Instead of choosing one item from each of several different
categories, we are repeatedly choosing items from the same category (the category is: the
letters of the word MATH) and each time we choose an item we do not replace it, so there is
one fewer choice at the next stage: we have 4 choices for the first letter (say we choose A),
then 3 choices for the second (M, T and H; say we choose H), then 2 choices for the next
letter (M and T; say we choose M) and only one choice at the last stage (T). Thus there are 4
· 3 · 2 · 1 = 24 ways to spell a code worth with the letters MATH.
Factorial
n! = n · (n – 1) · (n – 2) ··· 3 · 2 · 1
42
Example 26
How many ways can five different door prizes be distributed among five people?
There are 5 choices of prize for the first person, 4 choices for the second, and so on. The
number of ways the prizes can be distributed will be 5! = 5 · 4 · 3 · 2 · 1 = 120 ways.
Example 27
A charity benefit is attended by 25 people and three gift certificates are given away as door
prizes: one gift certificate is in the amount of $100, the second is worth $25 and the third is
worth $10. Assuming that no person receives more than one prize, how many different ways
can the three gift certificates be awarded?
Using the Basic Counting Rule, there are 25 choices for the person who receives the $100
certificate, 24 remaining choices for the $25 certificate and 23 choices for the $10 certificate,
so there are 25 · 24 · 23 = 13,800 ways in which the prizes can be awarded.
Example 28
Eight sprinters have made it to the Olympic finals in the 100-meter race. In how many
different ways can the gold, silver and bronze medals be awarded?
Using the Basic Counting Rule, there are 8 choices for the gold medal winner, 7 remaining
choices for the silver, and 6 for the bronze, so there are 8 · 7 · 6 = 336 ways the three medals
can be awarded to the 8 runners.
Note that in these preceding examples, the gift certificates and the Olympic medals were
awarded without replacement; that is, once we have chosen a winner of the first door prize or
the gold medal, they are not eligible for the other prizes. Thus, at each succeeding stage of
the solution there is one fewer choice (25, then 24, then 23 in the first example; 8, then 7,
then 6 in the second). Contrast this with the situation of a multiple choice test, where there
might be five possible answers — A, B, C, D or E — for each question on the test.
Note also that the order of selection was important in each example: for the three door prizes,
being chosen first means that you receive substantially more money; in the Olympics
example, coming in first means that you get the gold medal instead of the silver or bronze. In
each case, if we had chosen the same three people in a different order there might have been
a different person who received the $100 prize, or a different goldmedalist. (Contrast this
with the situation where we might draw three names out of a hat to each receive a $10 gift
certificate; in this case the order of selection is not important since each of the three people
receive the same prize. Situations where the order is not important will be discussed in the
next section.)
43
We can generalize the situation in the two examples above to any problem without
replacement where the order of selection is important. If we are arranging in order r items
out of n possibilities (instead of 3 out of 25 or 3 out of 8 as in the previous examples), the
number of possible arrangements will be given by
n · (n – 1) · (n – 2) ··· (n – r + 1)
If you don't see why (n — r + 1) is the right number to use for the last factor, just think back
to the first example in this section, where we calculated 25 · 24 · 23 to get 13,800. In this
case n = 25 and r = 3, so n — r + 1 = 25 — 3 + 1 = 23, which is exactly the right number for
the final factor.
Now, why would we want to use this complicated formula when it's actually easier to use the
Basic Counting Rule, as we did in the first two examples? Well, we won't actually use this
formula all that often, we only developed it so that we could attach a special notation and a
special definition to this situation where we are choosing r items out of n possibilities without
replacement and where the order of selection is important. In this situation we write:
Permutations
nPr = n · (n – 1) · (n – 2) ··· (n – r + 1)
We say that there are nPr permutations of size r that may be selected from among n
choices without replacement when order matters.
It turns out that we can express this result more simply using factorials.
n!
Pr =
n
( n − r )!
Example 29
I have nine paintings and have room to display only four of them at a time on my wall. How
many different ways could I do this?
Since we are choosing 4 paintings out of 9 without replacement where the order of selection
is important there are 9P4 = 9 · 8 · 7 · 6 = 3,024 permutations.
Example 30
How many ways can a four-person executive committee (president, vice-president, secretary,
treasurer) be selected from a 16-member board of directors of a non-profit organization?
44
We want to choose 4 people out of 16 without replacement and where the order of selection
is important. So the answer is 16P4 = 16 · 15 · 14 · 13 = 43,680.
Try it Now 7
How many 5-character passwords can be made using the letters A through Z
a. if repeats are allowed.
b. if no repeats are allowed.
Combinations
In the previous section we considered the situation where we chose r items out of n
possibilities without replacement and where the order of selection was important. We now
consider a similar situation in which the order of selection is not important.
Example 31
A charity benefit is attended by 25 people at which three $50 gift certificates are given away
as door prizes. Assuming no person receives more than one prize, how many different ways
can the gift certificates be awarded?
Using the Basic Counting Rule, there are 25 choices for the first person, 24 remaining
choices for the second person and 23 for the third, so there are 25 · 24 · 23 = 13,800 ways to
choose three people. Suppose for a moment that Abe is chosen first, Bea second and Cindy
third; this is one of the 13,800 possible outcomes. Another way to award the prizes would be
to choose Abe first, Cindy second and Bea third; this is another of the 13,800 possible
outcomes. But either way Abe, Bea and Cindy each get $50, so it doesn't really matter the
order in which we select them. In how many different orders can Abe, Bea and Cindy be
selected? It turns out there are 6:
How can we be sure that we have counted them all? We are really just choosing 3 people out
of 3, so there are 3 · 2 · 1 = 6 ways to do this; we didn't really need to list them all, we can
just use permutations!
So, out of the 13,800 ways to select 3 people out of 25, six of them involve Abe, Bea and
Cindy. The same argument works for any other group of three people (say Abe, Bea and
David or Frank, Gloria and Hildy) so each three-person group is counted six times. Thus the
13,800 figure is six times too big. The number of distinct three-person groups will be
13,800/6 = 2300.
45
We can generalize the situation in this example above to any problem of choosing a
collection of items without replacement where the order of selection is not important. If we
are choosing r items out of n possibilities (instead of 3 out of 25 as in the previous
P
examples), the number of possible choices will be given by n r , and we could use this
r Pr
formula for computation. However this situation arises so frequently that we attach a special
notation and a special definition to this situation where we are choosing r items out of n
possibilities without replacement where the order of selection is not important.
Combinations
n Pr
n Cr =
r Pr
We say that there are nCr combinations of size r that may be selected from among n
choices without replacement where order doesn’t matter.
Since we are choosing 4 people out of 35 without replacement where the order of selection is
35 34 33 32
not important there are 35 C4 = = 52,360 combinations.
4 3 2 1
Try it Now 8
The United States Senate Appropriations Committee consists of 29 members; the Defense
Subcommittee of the Appropriations Committee consists of 19 members. Disregarding party
affiliation or any special seats on the Subcommittee, how many different 19-member
subcommittees may be chosen from among the 29 Senators on the Appropriations
Committee?
In the preceding Try it Now problem we assumed that the 19 members of the Defense
Subcommittee were chosen without regard to party affiliation. In reality this would never
happen: if Republicans are in the majority they would never let a majority of Democrats sit
on (and thus control) any subcommittee. (The same of course would be true if the Democrats
were in control.) So let's consider the problem again, in a slightly more complicated form:
Example 33
46
The United States Senate Appropriations Committee consists of 29 members, 15 Republicans
and 14 Democrats. The Defense Subcommittee consists of 19 members, 10 Republicans and
9 Democrats. How many different ways can the members of the Defense Subcommittee be
chosen from among the 29 Senators on the Appropriations Committee?
In this case we need to choose 10 of the 15 Republicans and 9 of the 14 Democrats. There
are 15C10 = 3003 ways to choose the 10 Republicans and 14C9 = 2002 ways to choose the 9
Democrats. But now what? How do we finish the problem?
Suppose we listed all of the possible 10-member Republican groups on 3003 slips of red
paper and all of the possible 9-member Democratic groups on 2002 slips of blue
paper. How many ways can we choose one red slip and one blue slip? This is a job for the
Basic Counting Rule! We are simply making one choice from the first category and one
choice from the second category, just like in the restaurant menu problems from earlier.
There must be 3003 · 2002 = 6,012,006 possible ways of selecting the members of the
Defense Subcommittee.
Example 34
A 4 digit PIN number is selected. What is the probability that there are no repeated digits?
There are 10 possible values for each digit of the PIN (namely: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9), so
there are 10 · 10 · 10 · 10 = 104 = 10000 total possible PIN numbers.
To have no repeated digits, all four digits would have to be different, which is selecting
without replacement. We could either compute 10 · 9 · 8 · 7, or notice that this is the same
as the permutation 10P4 = 5040.
The probability of no repeated digits is the number of 4 digit PIN numbers with no repeated
digits divided by the total number of 4 digit PIN numbers. This probability is
10 P4 5040
4
= = 0.504
10 10000
Example 35
In a certain state's lottery, 48 balls numbered 1 through 48 are placed in a machine and six of
them are drawn at random. If the six numbers drawn match the numbers that a player had
chosen, the player wins $1,000,000. In this lottery, the order the numbers are drawn in
47
doesn’t matter. Compute the probability that you win the million-dollar prize if you purchase
a single lottery ticket.
In order to compute the probability, we need to count the total number of ways six numbers
can be drawn, and the number of ways the six numbers on the player’s ticket could match the
six numbers drawn from the machine. Since there is no stipulation that the numbers be in any
particular order, the number of possible outcomes of the lottery drawing is 48C6 =
12,271,512. Of these possible outcomes, only one would match all six numbers on the
player’s ticket, so the probability of winning the grand prize is:
6 C6 1
= 0.0000000815
48 C6 12271512
Example 36
In the state lottery from the previous example, if five of the six numbers drawn match the
numbers that a player has chosen, the player wins a second prize of $1,000. Compute the
probability that you win the second prize if you purchase a single lottery ticket.
As above, the number of possible outcomes of the lottery drawing is 48C6 = 12,271,512. In
order to win the second prize, five of the six numbers on the ticket must match five of the six
winning numbers; in other words, we must have chosen five of the six winning numbers and
one of the 42 losing numbers. The number of ways to choose 5 out of the 6 winning numbers
is given by 6C5 = 6 and the number of ways to choose 1 out of the 42 losing numbers is given
by 42C1 = 42. Thus the number of favorable outcomes is then given by the Basic Counting
Rule: 6C5 · 42C1 = 6 · 42 = 252. So the probability of winning the second prize is.
( 6 C5 )( 42 C1 )= 252
0.0000205
48 C6 12271512
Try it Now 9
A multiple-choice question on an economics quiz contains 10 questions with five possible
answers each. Compute the probability of randomly guessing the answers and getting 9
questions correct.
Example 37
Compute the probability of randomly drawing five cards from a deck and getting exactly one
Ace.
In many card games (such as poker) the order in which the cards are drawn is not important
(since the player may rearrange the cards in his hand any way he chooses); in the problems
that follow, we will assume that this is the case unless otherwise stated. Thus we use
combinations to compute the possible number of 5-card hands, 52C5. This number will go in
the denominator of our probability formula, since it is the number of possible outcomes.
48
For the numerator, we need the number of ways to draw one Ace and four other cards (none
of them Aces) from the deck. Since there are four Aces and we want exactly one of them,
there will be 4C1 ways to select one Ace; since there are 48 non-Aces and we want 4 of them,
there will be 48C4 ways to select the four non-Aces. Now we use the Basic Counting Rule to
calculate that there will be 4C1 · 48C4 ways to choose one ace and four non-Aces.
P ( one Ace ) =
( 4 C1 )( 48 C4 ) = 778320 0.299
52 C5 2598960
Example 38
Compute the probability of randomly drawing five cards from a deck and getting exactly two
Aces.
The solution is similar to the previous example, except now we are choosing 2 Aces out of 4
and 3 non-Aces out of 48; the denominator remains the same:
P ( two Aces ) =
( 4 C2 )( 48 C3 ) = 103776 0.0399
52 C5 2598960
It is useful to note that these card problems are remarkably similar to the lottery problems
discussed earlier.
Try it Now 10
Compute the probability of randomly drawing five cards from a deck of cards and getting
three Aces and two Kings.
Birthday Problem
Let's take a pause to consider a famous problem in probability theory:
Suppose you have a room full of 30 people. What is the probability that there is at
least one shared birthday?
Take a guess at the answer to the above problem. Was your guess fairly low, like around
10%? That seems to be the intuitive answer (30/365, perhaps?). Let's see if we should listen
to our intuition. Let's start with a simpler problem, however.
Example 39
Suppose three people are in a room. What is the probability that there is at least one shared
birthday among these three people?
49
There are a lot of ways there could be at least one shared birthday. Fortunately there is an
easier way. We ask ourselves “What is the alternative to having at least one shared
birthday?” In this case, the alternative is that there are no shared birthdays. In other words,
the alternative to “at least one” is having none. In other words, since this is a complementary
event,
We will start, then, by computing the probability that there is no shared birthday. Let's
imagine that you are one of these three people. Your birthday can be anything without
conflict, so there are 365 choices out of 365 for your birthday. What is the probability that
the second person does not share your birthday? There are 365 days in the year (let's ignore
leap years) and removing your birthday from contention, there are 364 choices that will
guarantee that you do not share a birthday with this person, so the probability that the second
person does not share your birthday is 364/365. Now we move to the third person. What is
the probability that this third person does not have the same birthday as either you or the
second person? There are 363 days that will not duplicate your birthday or the second
person's, so the probability that the third person does not share a birthday with the first two is
363/365.
We want the second person not to share a birthday with you and the third person not to share
a birthday with the first two people, so we use the multiplication rule:
365 364 363
P ( no shared birthday ) = 0.9918
365 365 365
This is a pretty small number, so maybe it makes sense that the answer to our original
problem will be small. Let's make our group a bit bigger.
Example 40
Suppose five people are in a room. What is the probability that there is at least one shared
birthday among these five people?
50
which makes it a bit easier to type into a calculator or computer, and which suggests a nice
formula as we continue to expand the population of our group.
Example 41
Suppose 30 people are in a room. What is the probability that there is at least one shared
birthday among these 30 people?
which gives us the surprising result that when you are in a room with 30 people there is a
70% chance that there will be at least one shared birthday!
If you like to bet, and if you can convince 30 people to reveal their birthdays, you might be
able to win some money by betting a friend that there will be at least two people with the
same birthday in the room anytime you are in a room of 30 or more people. (Of course, you
would need to make sure your friend hasn't studied probability!) You wouldn't be guaranteed
to win, but you should win more than half the time.
This is one of many results in probability theory that is counterintuitive; that is, it goes
against our gut instincts. If you still don't believe the math, you can carry out a
simulation. Just so you won't have to go around rounding up groups of 30 people, someone
has kindly developed a Java applet so that you can conduct a computer simulation. Go to this
web page: http://statweb.stanford.edu/~susan/surprise/Birthday.html, and once the applet has
loaded, select 30 birthdays and then keep clicking Start and Reset. If you keep track of the
number of times that there is a repeated birthday, you should get a repeated birthday about 7
out of every 10 times you run the simulation.
Try it Now 11
Suppose 10 people are in a room. What is the probability that there is at least one shared
birthday among these 10 people?
Expected Value
Expected value is perhaps the most useful probability concept we will discuss. It has many
applications, from insurance policies to making financial decisions, and it's one thing that the
casinos and government agencies that run gambling operations and lotteries hope most
people never learn about.
Example 42
51
1
In the casino game roulette, a wheel with 38 spaces (18 red, 18
black, and 2 green) is spun. In one possible bet, the player bets
$1 on a single number. If that number is spun on the wheel, then
they receive $36 (their original $1 + $35). Otherwise, they lose
their $1. On average, how much money should a player expect to
win or lose if they play this game repeatedly?
We call this average gain or loss the expected value of playing roulette. Notice that no one
ever loses exactly 5.3 cents: most people (in fact, about 37 out of every 38) lose $1 and a
very few people (about 1 person out of every 38) gain $35 (the $36 they win minus the $1
they spent to play the game).
There is another way to compute expected value without imagining what would happen if we
play every possible space. There are 38 possible outcomes when the wheel spins, so the
1 37
probability of winning is . The complement, the probability of losing, is .
38 38
Summarizing these along with the values, we get this table:
Outcome Probability of outcome
$35 1
38
-$1 37
38
Expected Value
Expected Value is the average gain or loss of an event if the procedure is repeated
many times.
We can compute the expected value by multiplying each outcome by the probability of
that outcome, then adding up the products.
Try it Now 12
1
Photo CC-BY-SA http://www.flickr.com/photos/stoneflower/
52
You purchase a raffle ticket to help out a charity. The raffle ticket costs $5. The charity is
selling 2000 tickets. One of them will be drawn and the person holding the ticket will be
given a prize worth $4000. Compute the expected value for this raffle.
Example 43
In a certain state's lottery, 48 balls numbered 1 through 48 are placed in a machine and six of
them are drawn at random. If the six numbers drawn match the numbers that a player had
chosen, the player wins $1,000,000. If they match 5 numbers, then win $1,000. It costs $1
to buy a ticket. Find the expected value.
Earlier, we calculated the probability of matching all 6 numbers and the probability of
matching 5 numbers:
6 C6 1
= 0.0000000815 for all 6 numbers,
48 C6 12271512
( 6 C5 )( 42 C1 )= 252
0.0000205 for 5 numbers.
48 C6 12271512
1 252 12271259
( $999,999 ) + ( $999 ) + ( −$1) −$0.898
12271512 12271512 12271512
On average, one can expect to lose about 90 cents on a lottery ticket. Of course, most players
will lose $1.
In general, if the expected value of a game is negative, it is not a good idea to play the game,
since on average you will lose money. It would be better to play a game with a positive
expected value (good luck trying to find one!), although keep in mind that even if the
average winnings are positive it could be the case that most people lose money and one very
53
fortunate individual wins a great deal of money. If the expected value of a game is 0, we call
it a fair game, since neither side has an advantage.
Not surprisingly, the expected value for casino games is negative for the player, which is
positive for the casino. It must be positive or they would go out of business. Players just
need to keep in mind that when they play a game repeatedly, their expected value is negative.
That is fine so long as you enjoy playing the game and think it is worth the cost. But it
would be wrong to expect to come out ahead.
Try it Now 13
A friend offers to play a game, in which you roll 3 standard 6-sided dice. If all the dice roll
different values, you give him $1. If any two dice match values, you get $2. What is the
expected value of this game? Would you play?
Expected value also has applications outside of gambling. Expected value is very common
in making insurance decisions.
Example 44
A 40-year-old man in the U.S. has a 0.242% risk of dying during the next year2. An
insurance company charges $275 for a life-insurance policy that pays a $100,000 death
benefit. What is the expected value for the person buying the insurance?
Not surprisingly, the expected value is negative; the insurance company can only afford to
offer policies if they, on average, make money on each policy. They can afford to pay out
the occasional benefit because they offer enough policies that those benefit payouts are
balanced by the rest of the insured people.
For people buying the insurance, there is a negative expected value, but there is a security
that comes from insurance that is worth that cost.
2
According to the estimator at http://www.numericalexample.com/index.php?view=article&id=91
54
Try it Now Answers
1 16
1. There are 60 possible readings, from 00 to 59. a. b. (counting 00 through 15)
60 60
2. Since the second draw is made after replacing the first card, these events are independent.
4 1
The probability of an ace on each draw is = , so the probability of an Ace on both
52 13
1 1 1
draws is =
13 13 169
6 5 30 1
4. a. = =
10 9 90 3
5. Out of 100,000 people, 500 would have the disease. Of those, all 500 would test positive.
Of the 99,500 without the disease, 2,985 would falsely test positive and the other 96,515
would test negative.
500 500
P(disease | positive) = = ≈ 14.3%
500 + 2985 3485
9. There are 510 = 9,765,625 different ways the exam can be answered. There are 10
possible locations for the one missed question, and in each of those locations there are 4
wrong answers, so there are 40 ways the test could be answered with one wrong answer.
40
P(9 answers correct) = 10 ≈ 0.0000041 chance
5
55
P
11. P ( shared birthday ) = 1 − ≈ 0.117
365 10
10
365
1 1999
12. ( $3,995 ) + ( −$5 ) ≈ -$3.00
2000 2000
5
13. Suppose you roll the first die. The probability the second will be different is . The
6
4
probability that the third roll is different than the previous two is , so the probability that
6
5 4 20
the three dice are different is = . The probability that two dice will match is the
6 6 36
20 16
complement, 1 − = .
36 36
16 20 12
The expected value is: ( $2 )
+ ( −$1) = ≈ $0.33. Yes, it is in your advantage to
36 36 36
play. On average, you’d win $0.33 per play.
56
Exercises
1. A ball is drawn randomly from a jar that contains 6 red balls, 2 white balls, and 5 yellow
balls. Find the probability of the given event.
a. A red ball is drawn
b. A white ball is drawn
2. Suppose you write each letter of the alphabet on a different slip of paper and put the slips
into a hat. What is the probability of drawing one slip of paper from the hat at random
and getting:
a. A consonant
b. A vowel
3. A group of people were asked if they had run a red light in the last year. 150 responded
"yes", and 185 responded "no". Find the probability that if a person is chosen at random,
they have run a red light in the last year.
4. In a survey, 205 people indicated they prefer cats, 160 indicated they prefer dots, and 40
indicated they don’t enjoy either pet. Find the probability that if a person is chosen at
random, they prefer cats.
5. Compute the probability of tossing a six-sided die (with sides numbered 1 through 6) and
getting a 5.
7. Giving a test to a group of students, the grades and gender are summarized below. If one
student was chosen at random, find the probability that the student was female.
A B C Total
Male 8 18 13 39
Female 10 4 12 26
Total 18 22 25 65
8. The table below shows the number of credit cards owned by a group of individuals. If
one person was chosen at random, find the probability that the person had no credit cards.
Zero One Two or more Total
Male 9 5 19 33
Female 18 10 20 48
Total 27 15 39 81
9. Compute the probability of tossing a six-sided die and getting an even number.
10. Compute the probability of tossing a six-sided die and getting a number less than 3.
11. If you pick one card at random from a standard deck of cards, what is the probability it
will be a King?
57
12. If you pick one card at random from a standard deck of cards, what is the probability it
will be a Diamond?
13. Compute the probability of rolling a 12-sided die and getting a number other than 8.
14. If you pick one card at random from a standard deck of cards, what is the probability it is
not the Ace of Spades?
15. Referring to the grade table from question #7, what is the probability that a student
chosen at random did NOT earn a C?
16. Referring to the credit card table from question #8, what is the probability that a person
chosen at random has at least one credit card?
17. A six-sided die is rolled twice. What is the probability of showing a 6 on both rolls?
18. A fair coin is flipped twice. What is the probability of showing heads on both flips?
19. A die is rolled twice. What is the probability of showing a 5 on the first roll and an even
number on the second roll?
20. Suppose that 21% of people own dogs. If you pick two people at random, what is the
probability that they both own a dog?
21. Suppose a jar contains 17 red marbles and 32 blue marbles. If you reach in the jar and
pull out 2 marbles at random, find the probability that both are red.
22. Suppose you write each letter of the alphabet on a different slip of paper and put the slips
into a hat. If you pull out two slips at random, find the probability that both are vowels.
23. Bert and Ernie each have a well-shuffled standard deck of 52 cards. They each draw one
card from their own deck. Compute the probability that:
a. Bert and Ernie both draw an Ace.
b. Bert draws an Ace but Ernie does not.
c. neither Bert nor Ernie draws an Ace.
d. Bert and Ernie both draw a heart.
e. Bert gets a card that is not a Jack and Ernie draws a card that is not a heart.
24. Bert has a well-shuffled standard deck of 52 cards, from which he draws one card; Ernie
has a 12-sided die, which he rolls at the same time Bert draws a card. Compute the
probability that:
a. Bert gets a Jack and Ernie rolls a five.
b. Bert gets a heart and Ernie rolls a number less than six.
c. Bert gets a face card (Jack, Queen or King) and Ernie rolls an even number.
d. Bert gets a red card and Ernie rolls a fifteen.
e. Bert gets a card that is not a Jack and Ernie rolls a number that is not twelve.
58
25. Compute the probability of drawing a King from a deck of cards and then drawing a
Queen.
26. Compute the probability of drawing two spades from a deck of cards.
27. A math class consists of 25 students, 14 female and 11 male. Two students are selected
at random to participate in a probability experiment. Compute the probability that
a. a male is selected, then a female.
b. a female is selected, then a male.
c. two males are selected.
d. two females are selected.
e. no males are selected.
28. A math class consists of 25 students, 14 female and 11 male. Three students are selected
at random to participate in a probability experiment. Compute the probability that
a. a male is selected, then two females.
b. a female is selected, then two males.
c. two females are selected, then one male.
d. three males are selected.
e. three females are selected.
29. Giving a test to a group of students, the grades and gender are summarized below. If one
student was chosen at random, find the probability that the student was female and earned
an A.
A B C Total
Male 8 18 13 39
Female 10 4 12 26
Total 18 22 25 65
30. The table below shows the number of credit cards owned by a group of individuals. If
one person was chosen at random, find the probability that the person was male and had
two or more credit cards.
Zero One Two or more Total
Male 9 5 19 33
Female 18 10 20 48
Total 27 15 39 81
31. A jar contains 6 red marbles numbered 1 to 6 and 8 blue marbles numbered 1 to 8. A
marble is drawn at random from the jar. Find the probability the marble is red or odd-
numbered.
32. A jar contains 4 red marbles numbered 1 to 4 and 10 blue marbles numbered 1 to 10. A
marble is drawn at random from the jar. Find the probability the marble is blue or even-
numbered.
33. Referring to the table from #29, find the probability that a student chosen at random is
female or earned a B.
59
34. Referring to the table from #30, find the probability that a person chosen at random is
male or has no credit cards.
35. Compute the probability of drawing the King of hearts or a Queen from a deck of cards.
36. Compute the probability of drawing a King or a heart from a deck of cards.
37. A jar contains 5 red marbles numbered 1 to 5 and 8 blue marbles numbered 1 to 8. A
marble is drawn at random from the jar. Find the probability the marble is
a. Even-numbered given that the marble is red.
b. Red given that the marble is even-numbered.
38. A jar contains 4 red marbles numbered 1 to 4 and 8 blue marbles numbered 1 to 8. A
marble is drawn at random from the jar. Find the probability the marble is
a. Odd-numbered given that the marble is blue.
b. Blue given that the marble is odd-numbered.
39. Compute the probability of flipping a coin and getting heads, given that the previous flip
was tails.
40. Find the probability of rolling a “1” on a fair die, given that the last 3 rolls were all ones.
41. Suppose a math class contains 25 students, 14 females (three of whom speak French) and
11 males (two of whom speak French). Compute the probability that a randomly selected
student speaks French, given that the student is female.
42. Suppose a math class contains 25 students, 14 females (three of whom speak French) and
11 males (two of whom speak French). Compute the probability that a randomly selected
student is male, given that the student speaks French.
43. A certain virus infects one in every 400 people. A test used to detect the virus in a person
is positive 90% of the time if the person has the virus and 10% of the time if the person
does not have the virus. Let A be the event "the person is infected" and B be the event
"the person tests positive".
a. Find the probability that a person has the virus given that they have tested
positive, i.e. find P(A | B).
b. Find the probability that a person does not have the virus given that they test
negative, i.e. find P(not A | not B).
44. A certain virus infects one in every 2000 people. A test used to detect the virus in a
person is positive 96% of the time if the person has the virus and 4% of the time if the
person does not have the virus. Let A be the event "the person is infected" and B be the
event "the person tests positive".
a. Find the probability that a person has the virus given that they have tested
positive, i.e. find P(A | B).
b. Find the probability that a person does not have the virus given that they test
negative, i.e. find P(not A | not B).
60
45. A certain disease has an incidence rate of 0.3%. If the false negative rate is 6% and the
false positive rate is 4%, compute the probability that a person who tests positive actually
has the disease.
46. A certain disease has an incidence rate of 0.1%. If the false negative rate is 8% and the
false positive rate is 3%, compute the probability that a person who tests positive actually
has the disease.
47. A certain group of symptom-free women between the ages of 40 and 50 are randomly
selected to participate in mammography screening. The incidence rate of breast cancer
among such women is 0.8%. The false negative rate for the mammogram is 10%. The
false positive rate is 7%. If a the mammogram results for a particular woman are positive
(indicating that she has breast cancer), what is the probability that she actually has breast
cancer?
48. About 0.01% of men with no known risk behavior are infected with HIV. The false
negative rate for the standard HIV test 0.01% and the false positive rate is also 0.01%. If
a randomly selected man with no known risk behavior tests positive for HIV, what is the
probability that he is actually infected with HIV?
49. A boy owns 2 pairs of pants, 3 shirts, 8 ties, and 2 jackets. How many different outfits
can he wear to school if he must wear one of each item?
50. At a restaurant you can choose from 3 appetizers, 8 entrees, and 2 desserts. How many
different three-course meals can you have?
51. How many three-letter "words" can be made from 4 letters "FGHI" if
a. repetition of letters is allowed
b. repetition of letters is not allowed
52. How many four-letter "words" can be made from 6 letters "AEBWDP" if
a. repetition of letters is allowed
b. repetition of letters is not allowed
53. All of the license plates in a particular state feature three letters followed by three digits
(e.g. ABC 123). How many different license plate numbers are available to the state's
Department of Motor Vehicles?
54. A computer password must be eight characters long. How many passwords are possible
if only the 26 letters of the alphabet are allowed?
55. A pianist plans to play 4 pieces at a recital. In how many ways can she arrange these
pieces in the program?
56. In how many ways can first, second, and third prizes be awarded in a contest with 210
contestants?
61
57. Seven Olympic sprinters are eligible to compete in the 4 x 100 m relay race for the USA
Olympic team. How many four-person relay teams can be selected from among the seven
athletes?
58. A computer user has downloaded 25 songs using an online file-sharing program and
wants to create a CD-R with ten songs to use in his portable CD player. If the order that
the songs are placed on the CD-R is important to him, how many different CD-Rs could
he make from the 25 songs available to him?
59. In western music, an octave is divided into 12 pitches. For the film Close Encounters of
the Third Kind, director Steven Spielberg asked composer John Williams to write a five-
note theme, which aliens would use to communicate with people on Earth. Disregarding
rhythm and octave changes, how many five-note themes are possible if no note is
repeated?
60. In the early twentieth century, proponents of the Second Viennese School of musical
composition (including Arnold Schönberg, Anton Webern and Alban Berg) devised the
twelve-tone technique, which utilized a tone row consisting of all 12 pitches from the
chromatic scale in any order, but with not pitches repeated in the row. Disregarding
rhythm and octave changes, how many tone rows are possible?
61. In how many ways can 4 pizza toppings be chosen from 12 available toppings?
62. At a baby shower 17 guests are in attendance and 5 of them are randomly selected to
receive a door prize. If all 5 prizes are identical, in how many ways can the prizes be
awarded?
63. In the 6/50 lottery game, a player picks six numbers from 1 to 50. How many different
choices does the player have if order doesn’t matter?
64. In a lottery daily game, a player picks three numbers from 0 to 9. How many different
choices does the player have if order doesn’t matter?
65. A jury pool consists of 27 people. How many different ways can 11 people be chosen to
serve on a jury and one additional person be chosen to serve as the jury foreman?
66. The United States Senate Committee on Commerce, Science, and Transportation consists
of 23 members, 12 Republicans and 11 Democrats. The Surface Transportation and
Merchant Marine Subcommittee consists of 8 Republicans and 7 Democrats. How many
ways can members of the Subcommittee be chosen from the Committee?
67. You own 16 CDs. You want to randomly arrange 5 of them in a CD rack. What is the
probability that the rack ends up in alphabetical order?
68. A jury pool consists of 27 people, 14 men and 13 women. Compute the probability that a
randomly selected jury of 12 people is all male.
62
69. In a lottery game, a player picks six numbers from 1 to 48. If 5 of the 6 numbers match
those drawn, they player wins second prize. What is the probability of winning this
prize?
70. In a lottery game, a player picks six numbers from 1 to 48. If 4 of the 6 numbers match
those drawn, they player wins third prize. What is the probability of winning this prize?
71. Compute the probability that a 5-card poker hand is dealt to you that contains all hearts.
72. Compute the probability that a 5-card poker hand is dealt to you that contains four Aces.
73. A bag contains 3 gold marbles, 6 silver marbles, and 28 black marbles. Someone offers to
play this game: You randomly select on marble from the bag. If it is gold, you win $3. If
it is silver, you win $2. If it is black, you lose $1. What is your expected value if you
play this game?
74. A friend devises a game that is played by rolling a single six-sided die once. If you roll a
6, he pays you $3; if you roll a 5, he pays you nothing; if you roll a number less than 5,
you pay him $1. Compute the expected value for this game. Should you play this game?
75. In a lottery game, a player picks six numbers from 1 to 23. If the player matches all six
numbers, they win 30,000 dollars. Otherwise, they lose $1. Find the expected value of
this game.
76. A game is played by picking two cards from a deck. If they are the same value, then you
win $5, otherwise you lose $1. What is the expected value of this game?
77. A company estimates that 0.7% of their products will fail after the original warranty
period but within 2 years of the purchase, with a replacement cost of $350. If they offer a
2 year extended warranty for $48, what is the company's expected value of each warranty
sold?
78. An insurance company estimates the probability of an earthquake in the next year to be
0.0013. The average damage done by an earthquake it estimates to be $60,000. If the
company offers earthquake insurance for $100, what is their expected value of the
policy?
63
Exploration
Some of these questions were adapted from puzzles at mindyourdecisions.com.
79. A small college has been accused of gender bias in its admissions to graduate programs.
a. Out of 500 men who applied, 255 were accepted. Out of 700 women who
applied, 240 were accepted. Find the acceptance rate for each gender. Does this
suggest bias?
b. The college then looked at each of the two departments with graduate programs,
and found the data below. Compute the acceptance rate within each department
by gender. Does this suggest bias?
Men Women
Department
Applied Admitted Applied Admitted
Dept A 400 240 100 90
Dept B 100 15 600 150
c. Looking at our results from Parts a and b, what can you conclude? Is there
gender bias in this college’s admissions? If so, in which direction?
80. A bet on “black” in Roulette has a probability of 18/38 of winning. If you win, you
double your money. You can bet anywhere from $1 to $100 on each spin.
a. Suppose you have $10, and are going to play until you go broke or have $20.
What is your best strategy for playing?
b. Suppose you have $10, and are going to play until you go broke or have $30.
What is your best strategy for playing?
81. Your friend proposes a game: You flip a coin. If it’s heads, you win $1. If it’s tails, you
lose $1. However, you are worried the coin might not be fair coin. How could you
change the game to make the game fair, without replacing the coin?
82. Fifty people are in a line. The first person in the line to have a birthday matching
someone in front of them will win a prize. Of course, this means the first person in the
line has no chance of winning. Which person has the highest likelihood of winning?
83. Three people put their names in a hat, then each draw a name, as part of a randomized
gift exchange. What is the probability that no one draws their own name? What about
with four people?
84. How many different “words” can be formed by using all the letters of each of the
following words exactly once?
a. “ALICE”
b. “APPLE”
85. How many different “words” can be formed by using all the letters of each of the
following words exactly once?
a. “TRUMPS”
b. “TEETER”
64
86. The Monty Hall problem is named for the host of the game show Let’s make a Deal. In
this game, there would be three doors, behind one of which there was a prize. The
contestant was asked to choose one of the doors. Monty Hall would then open one of the
other doors to show there was no prize there. The contestant was then asked if they
wanted to stay with their original door, or switch to the other unopened door. Is it better
to stay or switch, or does it matter?
87. Suppose you have two coins, where one is a fair coin, and the other coin comes up heads
70% of the time. What is the probability you have the fair coin given each of the
following outcomes from a series of flips?
a. 5 Heads and 0 Tails
b. 8 Heads and 3 Tails
c. 10 Heads and 10 Tails
d. 3 Heads and 8 Tails
88. Suppose you have six coins, where five are fair coins, and one coin comes up heads 80%
of the time. What is the probability you have a fair coin given each of the following
outcomes from a series of flips?
a. 5 Heads and 0 Tails
b. 8 Heads and 3 Tails
c. 10 Heads and 10 Tails
d. 3 Heads and 8 Tails
65
66
S U P P L E M E N T
Linear Programming
B
B e f o r e s t u d y i n g t h i s s u p p l e m e n t y o u s h o u l d k n o w o r, i f n e c e s s a r y, r e v i e w
1. Competitive priorities, Chapter 2
2. Capacity management concepts, Chapter 9
3. Aggregate planning, Chapter 13
4. Developing a master schedule, Chapter 14
LEARNING OBJECTIVES
After studying this supplement, you should be able to
1 Describe the role of mathematical models in 6 Describe the geometry of linear programs.
operations decision making.
7 Describe the graphical solution approach.
2 Describe constrained optimization models.
8 Use the simplex algorithm.
3 Understand the advantages and disadvantages of
9 Use artificial variables.
using optimization models.
10 Describe computer solutions of linear programs.
4 Describe the assumptions of linear program-
ming.
11 Use linear programming models for decision
making.
5 Formulate linear programs.
Adapted with permission from Joseph S. Martinich, Production and Operations Management: An Applied Modern Approach, Wiley, New York, 1997.
SUPPLEMENT OUTLINE
The Role of Mathematical Models in Operations The Geometry of Linear Programs B14
Decision Making B2 The Graphical Solution Approach B15
Constrained Optimization Models B2 The Simplex Algorithm B17
Advantages and Disadvantages of Using Optimiza- Using Artificial Variables B26
tion Models B5 Computer Solutions of Linear Programs B29
Assumptions of Linear Programming Models B6 Using Linear Programming Models for Decision
Formulating Linear Programs B7 Making B32
B2 SUPPLEMENT B LINEAR PROGRAMMING
decision variables that maximize or minimize the objective function and sat-
isfy all constraints.
The following example shows how an operational problem can be represented
and analyzed using a constrained optimization model.
The Healthy Pet Food Company manufactures two types of dog food: Meaties and Yum-
mies. Each package of Meaties contains 2 pounds of cereal and 3 pounds of meat; each
package of Yummies contains 3 pounds of cereal and 1.5 pounds of meat. Healthy believes
it can sell as much of each dog food as it can make. Meaties sell for $2.80 per package and
Yummies sell for $2.00 per package. Healthy’s production is limited in several ways. First,
Healthy can buy only up to 400,000 pounds of cereal each month at $0.20 per pound. It can
buy only up to 300,000 pounds of meat per month at $0.50 per pound. In addition, a spe-
cial piece of machinery is required to make Meaties, and this machine has a capacity of
90,000 packages per month. The variable cost of blending and packing the dog food is $0.25
per package for Meaties and $0.20 per package for Yummies. This information is given in
Table B-1.
Suppose you are the manager of the Dog Food Division of the Healthy Pet Food Com-
pany. Your salary is based on division profit, so you try to maximize its profit. How should
you operate the division to maximize its profit and your salary?
Solution:
The Decision Variables. We first identify those things over which we have control: the deci-
sion variables. In this problem we have direct control over two quantities: the number of
packages of Meaties to make each month, and the number of packages of Yummies to make
each month. Within the model these two quantities appear repeatedly, so we represent them
in a simple fashion. We designate these variables by the symbols M and Y.
M number of packages of Meaties to make each month
Y number of packages of Yummies to make each month
Note that the amount of meat used each month and the amount of cereal used each
month are not good choices for the variables. First, we control these only indirectly through
our choice of M and Y. More important, using these as variables could lead to ambiguous
production plans. Determining how much cereal and meat to use in production does not
tell us how to use it—how much of each dog food to make. In contrast, after determining
the values for M and Y, we know what to produce and how much meat and cereal are
needed.
B4 SUPPLEMENT B LINEAR PROGRAMMING
Objective function. Any pair of numerical values for the variables M and Y is a produc-
tion plan. For example, M 10,000 and Y 20,000 means we make 10,000 packages of
Meaties and 20,000 packages of Yummies each month. But how do we know whether this is
a good production plan? We need to specify a criterion for evaluation—an objective func-
tion. The most appropriate objective function is to maximize monthly profit. (Actually, this
is the contribution to profit: fixed costs are ignored because any plan that maximizes rev-
enue minus variable costs maximizes profit as well.) The profit earned by Healthy is a direct
function of the amount of each dog food made and sold, the decision variables. Monthly
profit, designated as z, is written as follows:
z (profit per package of Meaties) (number of packages of Meaties made and
sold monthly) (profit per package of Yummies) (number of packages of
Yummies made and sold monthly)
The profit per package for each dog food is computed as follows:
Meaties Yummies
Selling price 2.80 2.00
Minus
Meat 1.50 0.75
Cereal 0.40 0.60
Blending 0.25 0.20
Profit per package 0.65 0.45
Finally, negative production levels do not make sense, so we require that M 0 and
Y 0. Putting all these together gives the following constrained optimization model.
Maximize z 0.65M 0.45Y
Subject to 2M 3Y 400,000
3M 1.5Y 300,000
M 90,000
M, Y 0
This type of model is called a linear programming model or a linear program A linear program has a
because the objective function is linear and functions in all the constraints are linear. linear objective function and
The optimum solution for the Healthy Pet Food problem is M 50,000, Y linear constraints.
100,000, and z $77,500. That is, Healthy should make 50,000 packages of Meaties
and 100,000 packages of Yummies each month, and it will earn a monthly profit of
$77,500. Before discussing linear programming in detail, let’s consider the advantages
and disadvantages of optimization models in general.
am1x1 am2x2 amnxn bm
Parameters
where the xj values are decision variables and cj , aij , and b i values are constants, called
Constants given in the prob- parameters or coefficients, that are given or specified by the problem assumptions.
lem assumptions. Most linear programs require that all decision variables be nonnegative.
FORMULATING LINEAR PROGRAMS B7
2. Define the objective function. Determine the criterion for evaluating alterna-
tive solutions. The objective function will normally be the sum of terms
made up of a variable multiplied by some appropriate coefficient (parame-
ter). For example, the coefficients might be profit per unit of production, dis-
tance travel per unit transported, or cost per person hired.
3. Identify and express mathematically all of the relevant constraints. It is
often easier to express each constraint in words before putting it into math-
ematical form. The written constraint is decomposed into its fundamental
components. Then substitute the appropriate numerical coefficients and
variable names for the written terms. A common mistake is using variables
that have not been defined in the problem, which is not valid. This mistake
is frequently caused by not defining the original variables precisely. The for-
mulation process is iterative, and sometimes additional variables must be
defined or existing variables redefined. For example, if one of the variables
is the total production of the company and five other variables represent
the production at the company’s five plants, then there must be a constant
that forces total production to equal the sum of the production at the
plants.
Let’s look at the formulation process for typical operations problems.
International Wool Company operates a large farm on which sheep are raised. The farm
manager determined that for the sheep to grow in the desired fashion, they need at least
minimum amounts of four nutrients (the nutrients are nontoxic so the sheep can consume
more than the minimum without harm). The manager is considering three different grains
to feed the sheep. Table B-2 lists the number of units of each nutrient in each pound of
grain, the minimum daily requirements of each nutrient for each sheep, and the cost of
each grain. The manager believes that as long as a sheep receives the minimum daily
amount of each nutrient, it will be healthy and produce a standard amount of wool. The
manager wants to raise the sheep at minimum cost.
Solution
The quantities that the manager controls are the amounts of each grain to feed each sheep
daily. We define
xj number of pounds of grain j ( 1, 2, 3) to feed each sheep daily
Note that the units of measure are completely specified. In addition, the variables are ex-
pressed on a per sheep basis. If we minimize the cost per sheep, we minimize the cost for
any group of sheep. The daily feed cost per sheep will be
(cost per lb of grain j) (lb. of grain j fed to each sheep daily)
That is, the objective function is to
Minimize z 41x1 36x2 96x3
Why can’t the manager simply make all the variables equal to zero? This keeps costs at
zero, but the manager would have a flock of dead sheep, because there are minimum nutri-
ent constraints that must be satisfied. The values of the variables must be chosen so that the
number of units of nutrient A consumed daily by each sheep is equal to or greater than 110.
Expressing this in terms of the variables yields
20x1 30x2 70x3 110
The constraints for the other nutrients are
10x1 10x2 18
50x1 30x2 90
6x1 2.5x2 10x3 110
and finally
all xjs 0
The optimal solution to this problem (obtained using a computer software package) is
x1 0.595, x2 2.008, x3 0.541, and z 148.6 cents.
It is common practice to take a model initially used for one application and apply it to
other situations. The feed mix problem is a good example of a case where one might
use the same basic structure of a model in different applications. For example, a golf
course manager can use the model to select the best mix of fertilizers to provide the
grass with the desired amounts of active chemicals (nitrogen, phosphorus, potash).
The manager’s problem is structurally the same as that faced by the manager of Inter-
national Wool.
Although the basic structure of one model may be appropriate for another ap-
plication, frequently the model needs modification. For example, suppose the U.S.
Army decides to use the feed mix model to select a cost-minimizing diet for its sol-
diers that satisfies minimum nutritional requirements. The basic feed mix problem
makes several subtle assumptions that do not apply for humans. First, issues of taste
have been ignored. Earlier, we assumed that the sheep will eat whatever grain mixture
we feed them. Humans have varying tastes to consider. Some foods may not taste
good together. Second, not all soldiers are of similar size or have the same appetite.
Third, the basic feed mix is a static model: the optimal feed mix today is the same
as that of tomorrow and the next 500 days unless some parameters change. We do not
want to feed people the same meal day after day. Let’s look at another type of prob-
lem.
B10 SUPPLEMENT B LINEAR PROGRAMMING
Blending Problem
In the Healthy Pet Food example, a product mix problem, the company determines
how much of various products to make. The mixture of inputs used in each product
is fixed. In many industries such as the oil, chemical, paper, metals, and food process-
ing industries, a company controls how much of a product to make and the mix of in-
puts to use in making it. This is called a blending problem.
Solution:
The manager of Solar Oil’s operation wants to maximize the company’s profit. The first
question is: What quantities does the manager control? What can the manager manipulate
to influence profit? It is incomplete simply to say that the manager controls the amount of
each final product to make. The manager controls, and must determine, how to make each
final product and how much to make. This can be expressed by letting xij number of
barrels of raw gas I ( 1, 2, 3, 4) used per day to make final product j ( R, P) be the deci-
sion variables. Each barrel of raw gas i that is blended in final product j and then sold gen-
erates a profit equal to its selling price minus its cost. The objective function is the sum of
all terms of the form
(profit per barrel of raw gas i that is blended into gas j) (number of barrels
of raw gas i blended into gas j per day)
Substituting for these gives
Maximize z 2.5x1R 1.5x2R x3R 3.5x4R 5.0x1P 4.0x2P 1.5x3P x4P
FORMULATING LINEAR PROGRAMS B11
Note that the coefficients for some variables are negative. For example, Solar loses $1.00
on each barrel of raw gas 4 that is blended into premium. Does this imply that the optimal
value for these variables must be zero and that they can be dropped from the problem? No!
In blending operations, it is common for some low-cost materials to be combined with
high-cost materials. Although it appears that we are losing money on the high-cost materi-
als, they make the low-cost materials more valuable, and often the final product cannot be
made without them. For example, tungsten steel combines low-cost iron ore or scrap (worth
$100/ton) with tungsten (costing thousands of dollars per ton) to make steel that might sell
for $500 per ton. The manufacturer loses money on the tungsten (on a per ton basis) but is
more than compensated by the enhanced value of the iron ore. Therefore, we do not omit
variables from the problem unless we can prove that their optimum value is zero.
The next step is to identify the constraints. The availability constraint for each raw gaso-
line is
barrels of raw gas i used per day barrels of gas i available per day
The number of barrels of raw gas i used each day is the amount used to make regular
gasoline xiR plus the amount used each day to make premium gasoline xiP . The availability
constraints can be written as
x1R x1P 20,000
x2R x2P 15,000
x3R x3P 15,000
x4R x4P 10,000
The demand constraints put an upper limit on how much regular and premium gasoline
can be sold. The total amount made of each is the sum of the raw gasolines allocated to
making each gasoline each day. In other words,
x1R x2R x3R x4R 35,000
x1P x2P x3P x4P 23,000
If the model formulation is left at this stage, the optimal solution is to mix the lowest-
cost gasolines into the final products, regardless of octane. Therefore, we need to include
constraints that guarantee the variables will take on values that produce final gasolines with
at least the minimum specified octane ratings. The octane rating of the regular gasoline that
is produced will be a weighted average of the octanes of the raw gasolines used; that is,
octane of regular [86 (barrels of raw gas 1 used/day to make regular)
88 (barrels of raw gas 2 used/day to make regular) 96 (barrels of raw
gas 4 used/day to make regular)]/[total barrels of raw gases blended into regular
gasoline]
which should be at least 89. Substituting the appropriate variable names for these quantities
produces the constraint
[86x1R 88x2R 92x3R 96x4R]/[x1R x2R x3R x4R] 89
Multiplying both sides by (x1R x2R x3R x4R) and then gathering terms so that
variables appear only once and all are on the left-hand side yields
3x1R x2R x3R 7x4R 0
Using the same approach to guarantee an octane of 93 for premium gas produces the
constraint
7x1R 5x2R x3R 3x4R 0
Finally, all variables should be nonnegative in value. The optimal solution to this linear
program is x1R 11,428.57, x2R 9107.14, x3R 14,464.29, x4R 0, x1P 0, x2P
5892.86, x3P 535.71, x4P 10,000, and z $42,142.86 daily.
B12 SUPPLEMENT B LINEAR PROGRAMMING
In this example, fractional amounts of raw gasoline input are perfectly reasonable.
Fluids can be finely measured and the solution represents a flow rate. However, even
for a simple problem of this sort, the optimal solution is far from obvious. With linear
programming the daily profit might be 3 to 5% better than that achieved using an in-
telligent seat-of-the-pants approach. A 3% savings represents approximately $350,000
to $400,000 per year. Not bad, for using a simple model. As raw material prices
change, the optimal blend and output levels are quickly revised.
■ Example B.4 Basel Tool and Die Company Multiperiod Planning Problem
Basel Tool and Die Company (BTD) makes large industrial pipe wrenches in one of its fac-
tories. The marketing department estimates demand for this product during the next 6
months to be:
Month Demand
January 370
February 430
March 380
April 450
May 520
June 440
With the current labor force, BTD believes it can make approximately 420 pipe wrenches
per month at a cost of $40 per wrench using regular-time production. An additional 80
wrenches per month can be made using overtime production at a cost per wrench of $45.
Wrenches can be made in advance and held in inventory for later shipment at a cost of $3
per month per wrench. The monthly demand for wrenches must be satisfied every month.
At the end of December (beginning of January) BTD has 10 wrenches in inventory. BTD
wants to plan its production, including overtime, and inventory for the next 6 months so as
to maximize profit. Assuming the revenue for these wrenches is fixed, the production man-
ager can maximize profit by minimizing the total costs incurred in producing and deliver-
ing the wrenches.
Solution:
The quantities that the decision maker controls are (1) the number of wrenches to make
each month using regular-time production, (2) the number of wrenches to make each
month using overtime production, and indirectly (3) the number of wrenches to keep in in-
ventory at the end of each month. We define our decision variables as follows (to keep a
clear time convention, we assume that wrenches are made during a month; at the end of the
month, wrenches are shipped to customers; any wrench not shipped incurs a holding cost
for that month):
FORMULATING LINEAR PROGRAMS B13
The easiest constraints to represent are those limiting the amount of regular-time and over-
time production each month:
Rt 420 for t 1, , 6
and
Ot 80 for t 1, , 6
In addition, we need constraints guaranteeing that demand is satisfied each month. At this
point the model becomes tricky. We might think it would be sufficient adding a constraint
for each month stating that beginning inventory for that month plus total production must
be at least as large as the demand for that month; for example,
10 R1 O1 370
I1 R2 O2 430
and so forth. However, if we solve the problem as it stands, the optimal solution would be to
let R1 360, and all other Rt values and all Ot values equal zero, I1 430, I2 380, I3
450, I4 520, I5 440, and I6 0. This means we should satisfy the demands in the last 5
months using inventories (because inventories are cheap but producing wrenches is expen-
sive). However, this makes no sense because inventories are the result of excess production.
This problem occurs because there are no constraints defining what the relationship is
among inventories, production, and demand. Therefore, we need constraints that define in-
ventories as follows:
(Wrenches in inventory at beginning of month t) (wrenches made during month t)
(wrenches shipped at end of month t) (wrenches in inventory at end of month t)
Converting these to mathematical form, we get the constraints
10 R1 O1 370 I1 R1 O1 I1 360
I1 R2 O2 430 I2 R2 O2 I1 I2 430
I2 R3 O3 380 I3 R3 O3 I2 I3 380
I3 R4 O4 450 I4 or R4 O4 I3 I4 430
I4 R5 O5 520 I5 R5 O5 I4 I5 520
I5 R6 O6 440 I6 R6 O6 I5 I6 440
If the inventory variables are restricted to being nonnegative and these constraints are
satisfied, then the previous demand constraints are satisfied as well. These inventory defini-
tion constraints perform double duty: they define inventories, and guaranteed that demand
is satisfied. Separate demand constraints are not needed.
The optimal solution for the problem is R1 370, R2 R6 420, O1 0,
O2 0, O3 0, O4 10, O5 80, O6 20, I1 10, I2 0, I3 40, I4 20, I5 0, I6 0.
B14 SUPPLEMENT B LINEAR PROGRAMMING
Figure B-1
All solutions
Relationship among solutions
Feasible solutions
Optimal solutions
.5
Y
150
=3
133.33
00
,00
M = 90,000
0
100
Feasible 2M
50 set +3
Y=
40
0,0
00
where M is the number of packages of Meaties made and sold per month and Y is the
number of packages of Yummies made and sold per month. Suppose we construct a
coordinate system with M measured on the horizontal axis and Y measured on the
vertical axis, as shown in Figure B-2. Each point in the M, Y plane corresponds to a
product mix or production plan. The coordinate values for each point represent con-
ceivable, though not necessarily physically possible, values for the variables. Further-
more, every possible product mix is represented by a point in the M, Y plane. The best
solution is the point that makes the objective function as large as possible yet satisfies
all the constraints.
In this example, the optimal extreme point is formed by the intersection of the
lines 2M 3Y 400,000 and 3M 1.5Y 300,000.
To solve equations simultaneously, we use the following property. We can either
(1) multiply any constraint by a nonzero constant or (2) add or subtract a multiple of
any equation to or from any other equation, without changing the set of solutions
that the equations have simultaneously.
Therefore, to solve simultaneously the equations
2M 3Y 400,000
3M 1.5Y 300,000
we can subtract two times the second equation from the first equation, leaving
4M 200,000
3M 1.5Y 300,000
The first equation is easily solved: M 50,000. Substituting this value into the second
equation gives 3(50,000) 1.5Y 300,000, or Y 100,000. This method can be used
for any set of linear equations as long as the number of variables and equations is equal.
Multiple Optima If a finite optimum exists for the problem, there is an extreme
point that is optimal, but it may not be unique. Two or more adjacent extreme points
(they share a common edge) may tie for the best solution. In this case not only are ex-
treme points optimal, but all points on the edge connecting them are optimal. This
would occur in the Healthy Pet Food example if the objective function is to maximize
z 0.30M 0.45Y. Extreme points (M 0, Y 133,333.33) and (M 50,000,
Y 100,000) both yield a $60,000 profit. Every product mix on the line segment
connecting these extreme points is optimal, such as M 20,000, Y 120,000.
As long as A is kept less than or equal to 10, B can be increased without limit
and the objective function increases without limit. There is no finite optimum. Note
that unboundedness refers to the objective function value, not the constraint set. It is
true that for the objective function to be unbounded the feasible region must be un-
bounded in some direction. However, an unbounded feasible set does not imply that
there is no finite optimum. To see this, we simply have to change the objective of the
preceding example to minimize A 2B. The feasible set is unaffected, and therefore
still unbounded in some direction. However, the optimal solution is (A 2.5, B 0,
z 2.5).
Although infeasible problems can occur in practice, an unbounded problem
generally indicates the modeler forgot or misrepresented one or more constraints,
such as a limit on demand for a product or the supply of a resource. When an un-
bounded problem is encountered, the modeler should study the situation to see what
limitations exist that are not being explicitly stated in the constraints.
In 1949, George Dantzig developed an efficient procedure for solving linear programs
called the simplex method or simplex algorithm. This is the most widely used
method in instructional and commercial computer packages. A method developed by Simplex method
Narendra Karmarkar in 1984 is gaining popularity, but since it requires more sophis- Efficient method for solving
ticated mathematics, it is not presented here. linear programs.
The fundamental theorem of linear programming reduces to a finite value the
number of feasible solutions that need to be evaluated. One solution strategy might
be to identify the coordinates of every extreme point and then evaluate the objective
function at each. The one that produces the best objective function value is the opti-
mum. In practice, this approach is not efficient because the number of extreme points
can be very large for real problems with hundreds or thousands of variables and con-
straints.
The simplex algorithm begins by identifying an initial extreme point of the
feasible set. The algorithm then looks along each edge intersecting at the extreme
point and computes the net effect on the objective function if we were to move
along the edge. If the objective function value does not improve by moving along at
least one of these edges, it can be proved that the extreme point is optimal. If move-
ment along one or more of the edges improves the objective function value, we
move along one of these edges until we reach a new extreme point. We repeat the
previous steps: checking along each edge intersecting at the extreme point, and then
either stopping or sliding along another edge that improves the objective function
value.
This algorithm has many desirable features in practice.
1. It only moves from one extreme point to a better or equally good extreme
point, thereby skipping large numbers of suboptimal extreme points without
explicitly identifying them. Thus it usually only has to check a small subset of
the extreme points to find an optimum.
2. When it finds an optimum, it identifies this fact and stops.
3. The algorithm detects whether the problem is infeasible, is unbounded, or
has multiple optima.
4. The algorithm uses very simple mathematics that are easy to implement on a
computer.
B18 SUPPLEMENT B LINEAR PROGRAMMING
Slack variables have physical meaning. For example, slack variables may mea-
sure how much of an available resource is not used for a given solution or how much
of a nutrient an animal receives above some minimum required amount. The slack
variables in each constraint measure something different. Therefore, each one should
have a different designation. A standard convention uses si for a slack variable that has
been incorporated into constraint i.
Optimum
150,000 M = 50,000
Y = 100,000
s1 = 0
s2 = 0
s3 = 40,000
100,000
3M
+1
Extreme point
.5
Feasible M = 90,000
Y=0
Y=
50,000 set
s1 = 220,000
30
M = 0, Y = 0 s3 = 0
s1 = 400,000 Slide along edge
00
s2 = 300,000 Y=0
s3 = 90,000 M=1 50,000 100,000 150,000 M
THE SIMPLEX ALGORITHM B21
begins at 400,000, M can increase by 200,000 units before s1 hits zero. Similarly, M can
increase by 100,000 units before s2 is forced to zero, and M can increase by 90,000 be-
fore s3 reaches zero. Therefore, the most we can increase M before one of the basic
variables is forced to zero is 90,000 units. If M increases beyond this point, s3 becomes
negative and the solution is infeasible.
By increasing M to 90,000, keeping Y 0, and adjusting the other variables, we
obtain a new (adjacent) basic feasible solution: M 90,000, Y 0, s1 220,000,
s2 30,000, and s3 0, where Y and s3 are the nonbasic variables.
Basic M Y s1 s2 s3
cB Variable 0.65 0.45 0 0 0 b Ratio
0 s1 2 3 1 0 0 400,000 (400,000/2) = 200,000
0 s2 3 1.5 0 1 0 300,000 (300,000/3) = 100,000
0 s3 1 0 0 0 1 90,000 (90,000/1) = 90,000 ; Pivot row
zj 0 0 0 0 0 0
cj zj 0.65 0.45 0 0 0
q
Pivot
column
B22 SUPPLEMENT B LINEAR PROGRAMMING
Thus to compute zj for the jth variable, we go down the jth variable column and the cB
column, performing pairwise multiplication and then summing the terms. For exam-
ple, in Table B-4, z1 (2 0) (3 0) (1 0) 0. We perform this operation
for every variable and for the right-hand side values: (400,000 0) (300,000 0)
(90,000 0) 0. The zj in the b column is the objective value for the basic solu-
tion in the tableau. We explain the physical meaning of the zj values shortly.
The bottom row is called the cj zj row. It represents exactly that: we subtract
the zj row from the cj row. There is no value in the b column because there is no b col-
umn value in the cj row.
Meaning of zj and cj zj The algorithm moves from one basic solution to an-
other by
1. Increasing the value of a nonbasic variable
2. Keeping the other nonbasic variables equal to zero
3. Adjusting the values of the basic variables to satisfy the functional
constraints
When this is done, two forces affect the objective function value. There is the di-
rect effect of the nonbasic variable that is being increased in value. The per unit or
marginal effect of increasing the jth variable is the objective function coefficient for
this variable, cj . When the basic variables are adjusted to maintain feasibility, however,
this adjustment affects the objective function as well. This adjustment effect, often
called the opportunity cost, is measured by zj . The opportunity cost is the penalty re-
sulting from adjusting these basic variables. The net marginal effect on the objective
function is cj zj . If the cj zj for some nonbasic variable is positive in sign, increas-
ing that variable (and adjusting the other variables to remain feasible) results in a net
increase in the objective function value.
determined by using a ratio test. For every constraint row i we compute the The ratio test is used to
ratio bi/ais , if ais 0, where column s is the pivot column. That is, we divide determine the leaving vari-
the right-hand side of each constraint by the element in the pivot column of able.
the same row, but only if the denominator ais is strictly positive in value. This
ratio computes how much the entering variable can increase in value before
the basic variable in that constraint is forced down to zero. That leaves the
basic variable in the row with the smallest ratio. This row is called the pivot Pivot row
row. In Table B-4 the ratios for the three constraints are [400,000/2] The row with smallest ratio.
200,000, [300,000/3] 100,000, and [90,000/1] 90,000. The smallest ratio
is for the third constraint, so M enters the basis as the variable for the third
constraint and forces s3 out of the basis.
4. Perform pivot operations to obtain the new canonical form. The intersection of
the pivot row and pivot column is called the pivot element. We need to Pivot element
rewrite the constraints so that they are mathematically equivalent and make Intersection of the pivot row
sure that the new basic variable, M, appears in only the third constraint and and the pivot column.
has a coefficient of 1. In other words, we want the M column to contain
1 in the pivot element and 0 in every other constraint row. We do this with
row operations. The problem does not change if we multiply any equation by
a nonzero constant, or add or subtract a multiple of any equation to or from
any other equation. We divide the entire pivot row by the value of the pivot
element. In Table B-4, the pivot element is already equal to 1, so the pivot
row does not change. It is just rewritten in Table B-5. If the pivot element
had been 4, we would divide the entire pivot row (except the two leftmost
columns) by 4. The new form of the pivot row is always a multiple of the
current pivot row, so a multiple of this new form of the pivot row can be
added to or subtracted from the other rows.
To obtain a zero in the M column of the first constraint, we multiply the pivot
row (third row) by 2 and subtract from the first constraint row:
[2 3 1 0 0 400,000]
2 [1 0 0 0 1 90,000] [0 3 1 0 2 220,000]
The new form of the first constraint in shown in Table B-5. To obtain a zero in the M
column of the second constraint, multiply the pivot row by 3 and subtract from the
second constraint row:
[3 1.5 0 1 0 300,000]
3 [1 0 0 0 1 90,000] [0 1.5 0 1 3 30,000]
Basic M Y s1 s2 s3
cB Variable 0.65 0.45 0 0 0 b Ratio
0 s1 0 3 1 0 2 220,000 (220,000/3) 73,333
0 s2 0 1.5 0 1 3 30,000 (30,000/1.5) 20,000 ; Pivot row
0.65 M 1 0 0 0 1 90,000 no ratio
zj 0.65 0 0 0 0.65 58,500
cj zj 0 0.45 0 0 0.65
q
Pivot
column
B24 SUPPLEMENT B LINEAR PROGRAMMING
The result is shown in Table B-5. Note that we always use the pivot row to operate on
the other rows. If we add or subtract multiples of a row other than the pivot row to or
from a row, the columns for the other basic variables can become messed up. Also
note that because the new form of the pivot row always has a 1 in the pivot element,
we create a 0 in pivot column for any other constraint just by multiplying the new
form of the pivot row by the element in the pivot column of the other row and sub-
tracting the result from that row.
At this point, we determine the basic solution for the tableau in Table B-5. Y and
s3 are not in the basis, so they are set equal to zero. Then, s1 220,000, s2 30,000,
and M 90,000. We compute zj and cj zj elements for each column. For example,
z2 (3 0) (1.5 0) (0 0.65) 0. Note that the zj on the right-hand side
equals the objective function value, 58,500. We will call this term z from now on.
Basic M Y s1 s2 s3
cB Variable 0.65 0.45 0 0 0 b Ratio
0 s1 0 0 1 2 4 160,000 (160,000/4) = 40,000 ; Pivot row
0.45 Y 0 1 0 2/3 2 20,000 no ratio
0.65 M 1 0 0 0 1 90,000 (90,000/1) = 90,000
zj 0.65 0.45 0 0.30 0.25 67,500
cj zj 0 0 0 0.30 0.25
q
Pivot
column
USING ARTIFICIAL VARIABLES B25
Basic M Y s1 s2 s3
cB Variable 0.65 0.45 0 0 0 b
0 s3 0 0 1/4 1/2 1 40,000
0.45 Y 0 1 1/2 1/3 0 100,000
0.65 M 1 0 1/4 1/2 0 50,000
zj 0.65 0.45 0.0625 0.175 0 77,500
cj zj 0 0 0.0625 0.175 0
second constraint, it has a coefficient of 1; therefore, there is no variable in the sec-
ond constraint that can act as a basis variable (multiplying the second constraint by
1 makes the right-hand-side coefficient negative). The third constraint also has no
unique variable ready to be basic. In this case we create a basic but infeasible solution
by adding two new nonnegative variables, A2 A3, to the left-hand side for the second
Artificial variables are and third constraints. These are called artificial variables. (We use the notation Ai
needed when or con- where it is added to the ith constraint.) This gives the new form of the problem,
straints appear in the prob- which is in canonical form.
lem.
Maximize z 20A 6B 9C
Subject to 4A 3B C s1 24
2A 4B 12C s2 A2 30
2A 3B C A3 10
All variables 0
The artificial variables are put into the problem for only one purpose: to act as
basic variables to the algorithm started. If an artificial variable is in the problem, it
must be a basic variable. In the current canonical form the basic variables are s1, A2,
and A3, and the corresponding basic solution is A B C s2 0, s1 24, A2
30, and A3 10. This is a basic solution that occurs at the intersection of the con-
straint boundaries: A 0, B 0, C 0. However, this solution is infeasible because
these lines intersect outside the feasible set.
By modifying the objective function to “encourage” the artificial variables to
leave the basis, we use the simplex algorithm to move from an infeasible to a feasible
basic solution. The algorithm then proceeds exactly as in the previous section. There
are two ways to modify the problem. The first, called the Big-M method, is intuitively
simple and is demonstrated here.
Basic A B C s1 s2 Ac AB
cB Variable 20 6 9 0 0 1000 1000 b Ratio
0 s3 4 3 1 1 0 0 0 24 (24/1) = 24
1,000 A2 2 4 12 0 1 1 0 30 (30/12) = 2.5 ; Pivot row
1,000 A3 2 3 1 0 0 0 1 10 (10/1) = 10
zj 4,000 7,000 13,000 0 1,000 1,000 1,000 4,000
cj zj 4,020 7,006 13,009 0 1,000 0 0
q
Pivot column
USING ARTIFICIAL VARIABLES B27
Variable C has the most positive cj zj , so C enters the basis. The second row
has the smallest ratio, so the basis variable in that row, A2, will leave the basis. Per-
forming the pivot yields Table B-9. Note that the A2 column has been deleted in Table
B-9. As soon as an artificial variable leaves the basis, it is dropped from the problem.
(Do not confuse this with other types of variables.) The resulting solution is not optimal
so variable B enters the basis and replaces A3, giving Table B-10. Variable A then enters
the basis and B leaves, giving Table B-11.
The optimal solution is A 45/11 4.091, B 0, C 20/11 1.818, s1
64/11 5.818 , s2 0, and z 1080/11 98.181. Although the artificial variables
usually leave the basis quickly, they are not always the first variables to leave as they
were in this example.
Basic A B C s1 s2 Ac AB
cB Variable 20 6 9 0 0 1000 1000 b Ratio
0 s3 23/6 8/3 0 1 1/12 — 0 21.5 (21.5/(8/3)) = 8.06
9 C 1/6 1/3 1 0 1/12 — 0 2.5 (2.5/(1/3)) = 7.5
1000 A3 11/6 8/3 0 0 1/12 — 1 7.5 (7.5/(8/3)) = 2.81 ; Pivot row
zj 1831.8 2663.7 9 0 84.1 — 1000 7477.5
cj zj 1851.8 2669.7 0 0 84.1 — 0
q
Pivot column
Basic A B C s1 s2 Ac AB
cB Variable 20 6 9 0 0 1000 1000 b Ratio
0 s3 2 0 0 1 0 — — 14 (14/2) = 7
9 C 1/16 0 1 0 3/32 — — 25/16 no ratio
6 B 11/16 1 0 0 1/32 — — 45/16 (45/11) = 4.09 ; Pivot row
zj 57/16 6 9 0 21/32 — — 495/16
cj zj 263/16 0 0 0 21/32 — —
q
Pivot column
Basic A B C s1 s2 A2 A3
cB Variable 20 6 9 0 0 1000 1000 b
0 s3 0 32/11 0 1 1/11 — — 64/11
9 C 0 1/11 1 0 1/11 — — 20/11
20 A 1 16/11 0 0 1/22 — — 45/11
zj 20 329/11 9 0 1/11 — — 1080/11
cj zj 0 263/11 0 0 1/11 — —
B28 SUPPLEMENT B LINEAR PROGRAMMING
Infeasible Problem If for some tableau the cj zj values satisfy the optimality
conditions but at least one artificial variable is still positive (in the basis), then the
problem has no feasible solution.
Multiple Optima If the problem has more than one optimum, this is signaled by
the final tableau. In the optimal tableau, if cj zj for a nonbasic variable is zero, that
variable entering into the basis does not change the objective function value, so the
new solution is also optimal.
Degeneracy The right-hand sides of a tableau should never be negative, but they
can be zero. When a right-hand side is zero, a basic variable equals zero; this is a
A degenerate solution degenerate solution. You treat the zero just like any other number. It can be used as
occurs when a basic variable the numerator in the ratio test. Degeneracy simply means that the extreme point rep-
equals zero. resented by the basic solution is formed by the intersection of more constraints than
are needed. Therefore, the same extreme point can be expressed algebraically by sev-
eral basic solutions.
COMPUTER SOLUTIONS OF LINEAR PROGRAMS B29
Problem Input
Most linear programming packages use the following information to set up the prob-
lem:
1. Whether the user wants to enter a new problem, read an existing problem,
modify the current problem in memory, or solve a problem
2. An identifying name for the problem so that it can be stored and reused or
modified at a future time
3. Whether the problem involves maximization or minimization
4. The number of variables in the problem
5. The names of the variables or whether the user wants to use default names,
usually X1, X2, and so on
6. The number of constraints in the problem (excluding nonnegativity con-
straints on the variables)
7. The objective function and constraint coefficients. These can be entered as a
data matrix, or a problem template of the objective function constraints is
displayed with variables listed and spaces provided for the user to enter the
coefficients.
Computer Output
Most packages offer several output options: to display the optimum, the optimum
with sensitivity analysis, the initial simplex tableau and the optimum, and so forth. A
computer output for the Healthy Pet Food problem is shown in Figure B-4. Part (a) of
the figure lists the optimal values for the variables in the column labeled “solution”:
M 50,000, Y 100,000, S1 0, S2 0, and W3 40,000. The slack variables are
added to the problem automatically by the computer package, and their optimal val-
ues are listed. At the bottom of Figure B-4 is the objective function value: $77,500.
Sensitivity Analysis
An important use of linear programs is in determining how sensitive the optimal so-
lution is to parameter values in the problem. For example, how will the optimum
change if a price of availability of a resource is changed? This is called sensitivity
analysis or parametric analysis. Let’s look at the sensitivity analysis information pro-
vided by linear programming computer packages.
Figure B-4.
Computer solution for Healthy (a) Final Solution for Healthy
Pet Food
Opportunity
Variable Solution
Cost
M +50000.00 0
Y +100000.00 0
S1 0 +0.0625
S2 0 +0.1725
S3 +40000.00 0
Maximum Objective Function Value = 77500
Iterations = 3
CPU time = 0.4215
range over which each objective function coefficient can vary without the optimal val-
ues for the variables changing.
The notation C(j) refers to the objective function coefficient for the jth variable.
The values in the column labeled “Original” are the original objective function coeffi-
cients in the problem: 0.65 for M and 0.45 for Y. In the M row, the values 0.30 in the
“Min C(j)” column and 0.90 in the “Max C(j)” column mean that as long as all the
other data in the problem are held constant, the solution M 50,000 and Y
100,000 is optimal for any value of C(1) from a minimum of 0.30 to a maximum of
0.90. For example, suppose the profit per package of Meaties changes from $0.65 to
$0.85. The information in Figure B-4 (b) implies that M 50,000 and Y 100,000 is
still the optimal solution. However, the optimal amount of profit changes to $87,500.
One limitation of this analysis is that the range of coefficient values for which
the solution remains optimal is valid only when one coefficient is modified. If two or
more coefficients are changed simultaneously, the ranges given in Figure B-4 (b) do
not tell us what happens. In this case, we change the coefficient values and re-solve the
problem.
that constraint is altered. For example, dual price 0.0625 for constraint 1 implies that
if one addition pound of cereal is available (at $0.20 per pound), the optimum pro-
duction plan can be modified to produce $0.0625 more profit. Similarly, the dual
price of $0.175 means that if an additional pound is available (at $0.50 per pound),
the optimum can be modified to produce $0.175 more profit. It must be emphasized
that these dual prices are valid only if one right-hand side is modified. If two or more
changes are made simultaneously, these prices may not be valid.
Figure B-4(c) also gives the range of right-hand-side values over which the dual
prices will be valid. For example, B(1) is the right-hand-side coefficient of the first
constraint. The table says that keeping everything else the same, each additional
pound of cereal increases profit by $0.0625 until the right-hand side equals 600,000
(shown in the “Max B (I)” column. Similarly, a reduction in cereal reduces the profit
by $0.0625 per pound until the right-hand side reaches 240,000 pounds (“Min B
(i)”). If the amount of available cereal is changed enough to be outside these limits,
new dual prices apply. This analysis is sometimes called right-hand-side ranging.
Uncertainty Regarding Price and Cost Data We assumed that the data given
in Table B-1 were known with certainty. In fact, there is considerable uncertainty
about the price and cost estimates. Suppose that after seeing the preceding solution,
the vice president of marketing says, “If we’re only going to produce 50,000 packages
B32 SUPPLEMENT B LINEAR PROGRAMMING
of Meaties each month, we can charge $3.00 a package; demand for Meaties would
still be at least 50,000 per month at that price.” If we increase the price of Meaties by
$0.20 to $3.00 per package, how does this change the optimal production plan and
Healthy’s profits?
The only thing that changes is the profit per package for Meaties, which increases
from $0.65 to $0.85, so we want to
Maximize z $0.85 M $0.45 Y
Using the objective function sensitivity analysis information in Figure B-4 or re-
solving the problem with the new objective function, we determine that the optimal
production plan is still M 50,000, Y 100,000, but the month profit increases to
$87,500. Thus with the available resources, the change in the relative profit margins
for the two dog foods is not enough to change the optimal product mix, but the profit
does increase. The same type of analysis would apply if we believe that the previously
assumed material or packaging costs are not correct.
This analysis can be performed using a variety of scenarios for product and raw
material prices. It shows us if, and how, the optimal product mix changes depending
on the actual values of the parameters.
Meaties
Yummies
SUPPLEMENT HIGHLIGHTS
1 A mathematical model represents the essential features
of an object, system, or problem without unimportant
of the constraints. The feasible set or feasible region is
the set of all feasible solutions. Finally, an optimal solu-
details. Analyzing and manipulating the model gives in- tion is the feasible solution that produces the best objec-
sight into how the real system behaves under various tive function value possible.
conditions. From this we determine the best system de-
sign or action to take.
7 We can graphically solve an LP problem by using the
fundamental theorem of linear programming: If a finite
2 Constrained optimization models have three major
components: decision variables, objective function, and
optimal solution exists, then at least one extreme point is
optimal. To find the exact coordinate values for the opti-
constraints. Decision variables are physical quantities mum from the graphs, we identify the constraints that
controlled by the decision maker and represented by intersect to form the extreme point. We solve simultane-
mathematical symbols. The objective function defines ously the equations corresponding to the constraints to
the criterion for evaluating the solution. The constraints find the point that lies on both lines (the extreme point).
are a set of functional equalities or inequalities that rep-
resent physical, economic, technological, legal, ethical, or 8 The simplex algorithm has many desirable features in
practice. It only moves from one extreme point to a bet-
other restrictions on what numerical values can be as- ter or equally good extreme point, thereby skipping large
signed to the decision variables. numbers of suboptimal extreme points without explic-
3 The main benefit of optimization models is the ability to
evaluate possible solutions in a quick, safe, and inexpen-
itly identifying them. When it finds an optimum, it iden-
tifies this fact and stops. The algorithm detects whether
sive way without actually constructing and experiment- the problem is infeasible, is unbounded, or has multiple
ing with them. Other benefits include the following: they optima. The algorithm uses very simple mathematics
structure the thought process, increase objectivity, make that are easy to implement on a computer.
complex problems more tractable, make problems
amenable to mathematical and computer solution, and 9 In the Big-M method, we make the objective function
coefficients for the artificial variables either infinity for
facilitate “what if ” analysis. maximization problems or infinity for minimization
4 Linear programs are constrained optimization models
that satisfy three requirements. The decision variables
problems. The name comes from the fact that the letter
M represents some large number that replaces infinity.
must be continuous; they can take on any value within This method encourages the algorithm to drive the arti-
some restricted range. The objective function must be a ficial variables to zero by kicking them out of the basis.
linear function. The left-hand sides of the constraints
must be linear functions.
10 Most packages offer several output options: to display
the optimum, the optimum with sensitivity analysis, the
5 Model formulation is the most important and the most initial simplex tableau and the optimum, and so forth.
difficult aspect of solving a real problem. Solving a
model that does not accurately represent the real prob-
11 The formulations earlier in the supplement give the im-
pression that using linear programming is a clean, sim-
lem is useless. Model formulation includes identifying ple process. In practice, using linear programming and
and defining the decision variables for the problem, other optimization models is not so straightforward, nor
defining the objective function, and identifying and ex- is it static. Specifically, our goal in using models is to ob-
pressing mathematically all of the relevant constraints. tain usable solutions that are better than those we would
6 The characteristic that makes linear programs easy to
solve is their simple geometric structure. A solution for a
have obtained without the models, to use the models to
revise and update our decisions in a timely fashion, and
linear program is any set of numerical values for the to increase our confidence in our decisions.
variables. A feasible solution is a solution that satisfies all
KEY TERMS B35
KEY TERMS
model B2 certainty B7 simplex tableau B21
constrained optimization model B2 feasible solution B14 pivot column B23
decision variables B2 feasible region B14 ratio test B23
objective function B2 feasible set B14 pivot row B23
constraints B2 optimal solution B14 pivot element B23
linear program B5 extreme points B16 artificial variables B26
sensitivity analysis B6 simplex method B17 Big-M method B27
parameters B6 simplex algorithm B17 two-phase method B28
coefficients B6 canonical form B18 degenerate solution B28
proportionality B7 nonbasic variables B20 dual price B31
additivity B7 basic variables B20 shadow price B31
divisibility B7 basic solution B20
B36 SUPPLEMENT B LINEAR PROGRAMMING
SOLVED PROBLEMS
■ Solved Problem 1 Repeating this for the raw material restrictions yields the
Suppose a company manufactures two products, A and B, constraints
using three inputs, labor, material R, and materials S. To 6xA 12xB 900
make one unit of product A requires 6 pounds of R, 7.5 7.5xA 4.5xB 675
pounds of S, and 9 person-hours of labor; to make one unit
of product B requires 12 pounds of R, 4.5 pounds of S, and Finally the variables must be nonnegative:
6 person-hours of labor. The demands for the products are
xA, xB 0
such that the company can sell as much of each product as
it can produce and earn a profit of $3 per unit of A and $4 Putting all of this together gives the linear progamming
per unit of B. However, only 900 pounds of R, 675 pounds model:
of S, and 1200 person-hours of labor are available to the
Maximize z 3xA 4xB
company each day.
Subject to 9xA 6xB 1200
a. Formulate the company’s problem as a linear program to
maximize profit. 6xA 12xB 900
b. Graph the feasible region for this problem. 7.5xA 4.5xB 675
c. Solve the problem graphically by finding the best ex- xA, xB 0
treme point.
b. The nonnegativity constraints, xA 0 and xB 0, re-
strict the feasible solutions to the upper right-hand quad-
rant of Figure B-6. We then plot the inequality 9xA 6xB
Solution:
a. The decision maker controls the amount of each product
to make each day. Thus we can define the decision variables
as Figure B-5
xj No. of units of product j ( A, B) to make each day. Graphical solution of Solved Problem B-1
The company’s objective is to maximize the profit per day. xB
We want to express “profit per day” as a function of the de- 200
cision variables so that no matter what numerical values the
decision variables take on, the function will compute the 180
daily profit. Total profit per day is equal to
(profit/unit of A made) (units of A made/day) 160
(profit/unit of B made) (units of B made/day)
140
Substituting the appropriate numerical values and variables
for these quantities gives an objective function:
120
9 xA
=1
20
A +1 xA = 64.29
xB
B =9 z = 364.31
60 00
75
1200 by graphing its boundary line, 9xA 6xB 1200, and c. Figure B-5 shows objective function contours graphed
finding the side that satisfies the constraint. We first set xA for various profit levels (dotted lines). The contour with the
0 and solve for xB, which gives xB 200, and then set xB highest value intersects the extreme point formed by the in-
0 and solve for xA, which gives xA 133.33. The point xA tersection of the second and third constraints. To obtain the
0, xB 0 satisfies the inequality, so all the points on the coordinates of this point, we solve the two constraint equa-
same side of the line satisfy this inequality. Repeating this tions simultaneously:
procedure for the other constraints gives the feasible set in
6xA 12xB 900
Figure B-5. Note that the first constraint is redundant; that
is , it does not eliminate any solutions that are not already
eliminated by the other constraints. It can be eliminated 7.5xA 4.5xB 675
: xA 64.29 xB 42.86
from the problem without changing the feasible set. The The objective function value for the highest contour is then
feasible set is the four-sided shaded region. z 3(64.29) 4(42.86) 364.31.
is the only one that is negative), so we bring x2 into the ba- Table B-15 Third Tableau: Solved Problem 3
sis. Constraints 1 and 3 tie for the lowest ratio, so we arbi-
x1 x2 s1 s2 s3 A3
trarily select constraint 1 as the pivot row (actually, there are
Basic
tie-breaking rules, but they are beyond the scope of this
CB Variable 30 10 0 0 0 1,000 b
book). Performing the pivot operations gives the tableau in
Table B-15. No cj zj value is positive in this table, so the 10 x2 0 1 2/5 0 1/10 — 20
solution there is optimal. To get the solution, we set the 0 s2 0 0 1/10 1 1/10 — 5
nonbasic variables, s1 and s3, equal to zero and the basic 30 x1 1 0 3/10 0 2/10 — 0
variables equal to the values in the “b” column: x1 0, x2 zj 30 10 25 0 25 — 200
20, and s2 5, and the objective function value is z 200. cj zj 0 0 5 0 5 —
(Notice that this is a degenerate solution because a basic
variable equals zero.)
DISCUSSION QUESTIONS
1. What are the three primary components of a constrained 5. What does it mean when a problem has an unbounded
optimization model? solution? If you formulated a real problem and the solu-
2. Explain the difference between a parameter and a deci- tion? If you formulated a real problem and the solution
sion variable. was unbounded, what does this imply about your model?
3. What are the primary assumptions underlying linear pro- 6. What does it mean to perform sensitivity or “what if ”
gramming models? analysis?
4. If most parameters represent estimates that are not 7. Explain the meaning of dual prices. Why would one want
known with certainty, how can constrained optimization to know the value of a dual price, and how might it be
models be of any value for decision making? used?
PROBLEMS
1. Deutchlander Machine Company (DMC) makes two b. Solve the problem (either graphically, using the simplex
types of printing presses: a four-color litho and a two-color method, or using a computer) and explain in words DMC’s
litho. Demand for both products is booming and exceeds optimal solution.
DMC’s ability to satisfy it. Most raw materials are plentiful, 2. Robertville Furniture Company (RFC) makes two
but production is limited by three factors: a shortage of steel types of dressers: the Classic and the Modern. RFC sells the
rollers, gear cutting capacity, and roller polishing capacity. Classic for $310 and the Modern for $350. At these prices
Each four-color press requires 16 rollers, and each two-color RFC believes it can sell up to 20 Classic and 25 Modern
press requires 8 rollers. The four-color presses require 30 dressers per week. Each type of dresser is made of oak and
hours of gear cutting and 8 hours of polishing time, and the covered with a pecan veneer. The wood requirements for
two-color presses require 12 hours of gear cutting and 3 each dresser are given in the table. Oak costs $1.50 per board
hours of polishing time. DMC is able to buy 100 rollers per foot, and pecan veneer costs $2 per square foot. The dressers
week, and it has 160 hours of gear cutting time and 40 hours must go through two manufacturing departments: cutting
of polishing time available per week. and veneering. The machine hours required for each dresser
To avoid harming long-term sales, DMC does not want to are also given below. RFC has only 40 hours of production
raise prices. At current prices DMC will earn a profit of
DM24,000 on each four-color press made and DM10,000 on Oak/ Pecan/ Cutting Veneering
each two-color press made. So as not to abandon either Dresser Dresser Time Time
product market, DMC also wants to produce at least two (board ft) (sq/ft) (hr/dresser) (hr/dresser)
units of each press each week.
a. Formulate DMC’s problem as a linear program to max- Classic 90 50 1.20 1.00
imize its profit. Modern 100 60 0.90 1.20
B40 SUPPLEMENT B LINEAR PROGRAMMING
time available each week in each department, and it can ob- Fresh potatoes earn a profit of $0.40 per pound after
tain up to 2000 board feet of oak and 1500 square feet of processing costs, but only grade A potatoes can be sold as
pecan veneer each week. The cost of operating each manu- fresh potatoes. Frozen french fried potatoes earn $0.32 per
facturing department is essentially fixed, so RFC would like pound after processing costs, but the potatoes used must
to maximize its contribution to overhead (revenue minus have an average quality rating of at least 3.5. Hash balls earn
variable costs). $0.25 per pound after processing costs, but the potatoes used
a. Formulate RFC’s problem as a linear program, defin- must have an average quality rating of at least 3.0. Assume
ing your variables clearly. that these ratings are linear in the sense that the quality rat-
b. Solve the problem (graphically, using the simplex ing of a mixture equals the weighted average of the inputs.
method, or using a computer) and state what RFC should do VPC believes it can sell as much french fried and hash ball
(i.e., explain RFC’s optimal solution in words). potatoes as it can make, but it believes the total demand for
c. What resource is limiting RFC’s production? its fresh potatoes during the next two months is 2.5 million
3. Western Pulp (WP) produces recycled paperboard for pounds.
box manufacturers by combining four grades of recycled pa- a. Formulate a linear programming model to determine
per stock. Each grade of stock has a different strength, color, the best use for the potatoes so as to maximize VPC’s
and texture. The strength, color, and texture of the paper- profit.
board are approximately a weighted average of those charac- b. Solve the problem using a computer and explain the
teristics of the paper inputs. The table gives the characteris- answer in words.
tics of the paper stocks and their cost per ton. WP has c. Suppose VPC could buy additional grade A potatoes at
received an order for 500 tons of paperboard with a strength $0.35 per pound; how much should it buy? Explain.
rating of at least 7, a color of at least 5, and texture of at least 5. Manfred Leaks manages a large discount store. His
6. WP would like to determine the least costly mix required biggest problem has been scheduling cashiers so that he has
to produce this paperboard. an adequate number without having too many. The store is
open from 9 A.M. to 9 P.M. every day of the week. Based on
historical data, he found that the customer patterns for
Paper Grade Strength Color Texture Cost/Ton Monday to Thursday are essentially the same, but those
1 8 9 8 $150 for Friday, Saturday, and Sunday are all different. He
2 6 7 5 $110 divided the day into three 4-hour segments and esti-
3 5 5 6 $ 90 mated how many cashiers were needed for each time period
4 3 4 5 $ 50 for each day of the week. These are given in the following
table.
a. Formulate the problem as a linear program. Day of Week Mon – Thur Fri Sat Sun
b. Solve this problem on a computer and explain the op-
timal solution. 9 A.M.– 1 P.M. 6 3 10 4
4. Volcano Potato Company (VPC) grows potatoes, 1 P.M.– 5 P.M. 5 8 14 12
processes them, and then sells three potato products: fresh 5 P.M.– 9 A.M. 8 4 7 6
potatoes, frozen french fried potatoes, and frozen hash ball
potatoes (shredded and then reconstituted balls of potatoes
Employees must work continuous 8-hour shifts begin-
with a soft consistency). During the next two months, VPC
ning at 9 A.M. or 1 P.M., and their weekly schedules must be
expects to harvest 8 million pounds of potatoes. VPC would
made up of 5 consecutive days of work with 2 consecutive
like to determine how much of each product should be made
days off (and they work the same hours each workday).
from the potatoes. Potatoes are graded according to quality
Manfred would like to devise weekly schedules that will min-
on a 0 – 5 scale. VPC divides its potatoes into three grades: A,
imize the total number of cashiers needed, but the schedules
B, and C. Grade A potatoes have an average quality rating of
must be such that the minimum cashier requirements in the
4.5; grade B potatoes have an average quality rating of 2.5,
table are satisfied.
and grade C potatoes have a quality rating below 1 and are
a. Formulate Manfred’s problem as a linear program; be
not used for any products. From historical data and esti-
sure to define the variables precisely. (Hint: There are 14
mates based on the current growing season’s weather, VPC
possible schedules; there will be one variable correspond-
believes the distribution of potato quality will be:
ing to each schedule.)
b. Solve the problem using a computer.
Grade A B C c. Is the assumption of divisibility satisfied? Will your an-
% of Harvest 50 40 10 swer to this question be true in general? Explain.
PROBLEMS B41
6. Checker Credit Service provides credit information to sales. To maintain a reasonable presence in each market,
its customers throughout the country 24 hours a day. Ros- however, each district must be assigned at least one sales rep,
alind Hanks is the manager of phone services. She supervises and at least $50,000 must be spent on advertising in each
credit reps who answer customers’ calls. From historical data market.
she has estimated that the following number of credit reps a. Formulate a linear programming model to help Mr.
are needed during various times of the day. Stimpson solve his problem.
b. Solve the problem using a computer.
8. Great Plains Advertising Company (GPAC) has a
$150,000 advertising budget to advertise an automobile firm.
Time Period No. of Reps Needed
GPAC is considering advertising in newspapers and on tele-
Midnight – 4 A.M. 3 vision. The more GPAC advertises in a particular medium,
4 A.M.– 8 A.M. 6 the less effective additional ads are in reaching new cus-
8 A.M.– noon 13 tomers. The following table lists the number of new cus-
Noon – 4 P.M. 15
4 P.M.– 8 P.M. 12
8 P.M.– midnight 9 No. of Ads New Customers/Ad
Newspaper 1 – 10 900
11 – 20 600
Employees work shifts of 8 consecutive hours, and shifts 21 – 30 300
can start at the beginning of any of the six periods shown in Television 1–5 10,000
the table. Ms. Hanks has complete freedom in deciding the 6 – 10 5,000
number of days each employee works each week, so she is in- 11 – 15 2,000
terested only in knowing how many employees should start
work at the beginning of each time period to minimize the
total number of employees needed each day. tomers reached by each ad. Each newspaper ad costs $1500,
a. Formulate her problem as a linear program. (Hint: and each television ad costs $10,000. At most 30 newspaper
There will be six decision variables.) ads and 15 television ads can be placed. Also, GPAC would
b. Solve the problem using a computer. like to use at least as many newspaper ads as television ads.
c. Is the divisibility assumption satisified? Formulate a linear program that will maximize the number
d. Suppose full-time employees were paid $8 per hour, of new customers contacted subject to the previous restric-
and suppose part-time employees could be hired to work tions. (Hint: You need six variables, not two.)
4-hour shifts for $5 per hour. But part-time employees 9. The demand for a company’s product during the next
are only half as efficient as full-time employees are only four months is given here. It costs the company $9 per unit
half as efficient as full-time employees (i.e., Checker
needs two part-time employees to do the work of one
full-time employee). Formulate and solve the new prob- Month Demand
lem.
7. Ronald Stimpson is regional sales manager for an in- 1 450
dustrial products company. His region contains four sales 2 575
districts. He supervises 10 sales representatives and controls 3 490
an advertising budget of $800,000 per year. Mr. Stimpson be- 4 530
lieves that sales in a district are related to the amount of ad-
vertising and the number of sales reps assigned to the dis-
trict. Based on historical data, his estimates of incremental to produce the product using regular-time labor and $12 per
annual sales per dollar of advertising and sales per sales rep unit to produce the product using overtime labor. A maxi-
for each district are given in the following table. Mr. Stimp- mum of 500 units can be made each month using regular-
son would like to determine how to allocate sales reps and time labor. There is no limit on overtime productin. Excess
the advertising budget among the four districts to maximize units produced can be stored at a costs of $2 per unit per
month.
a. Formulate this company’s problem as a linear program
District 1 2 3 4 to minimize its total production and storage costs during
the next four months and to satisfy demand (there are no
$ sales/$ advertising 7 12 10 11 initial inventories).
$ sales (0000)/sales rep 38 25 36 41 b. Solve the problem using a computer.
B42 SUPPLEMENT B LINEAR PROGRAMMING
Alloy A Alloy B demanded by each wholesaler are also listed, along with the
At least 40% copper No more than 35% copper production capacity at each manufacturing plant. The com-
At least 10% nickel At least 40% nickel pany wishes to satisfy the demands of each wholesaler at
No more than 25% nickel minimum total cost (production plus shipping). However,
Aluminum content must no plant should be operating at less than 60% of its capacity.
be exactly twice that a. Formulate a linear program to solve the company’s
of nickel No more than 30% aluminum problem.
b. Solve the problem using a computer.
14. AMCHEM Chemical Company produces three prod-
a. Formulate the company’s problem as a linear program ucts: A, B, and C. Each product requires labor to produce it,
to maximize profit. and production of each product creates pollutants. By law
b. Solve the problem using a computer. the firm is not allowed to produce more than the following
12. Wilson Creek Farm has 200 acres of land available for pollutants per day: 200 pounds of sulfur dioxide, 300 pounds
planting. The owner is considering planting three crops: of carbon monoxide, 150 pounds of hydrogen sulfide, and 50
corn, soybeans, and wheat. The production yield, water re- pounds of benzene. The total number of person-hours of la-
quirements, and labor requirements for a salable crop are bor available per day is 6000. In addition, the total output
given here. The owner expects to have only 35,000 gallons of per day of products A and B combined cannot be more than
water available per week to use for the crops, and during the the output of product C. Each pound of product A generates
PROBLEMS B43
a profit of $5, each pound of B generates $7, and each Treatment Center* Daily Volume
pound of C generates $4. Pollutant and labor rates per hun-
District A B C (tons/day)
dred pounds of product are given here.
1 1.2 1.1 3.2 20
2 0.5 1.3 2.5 30
A B C 3 1.0 0.4 1.9 45
Pounds of Sulf dioxide .10 .05 .20 4 1.5 1.6 1.4 25
Pollutants/ Carb monoxide .18 .04 .03 5 2.4 1.5 1.6 20
100 lb Hydrogen sulfide .25 .15 .02 6 2.6 1.9 0.5 25
of Product Benzene .01 .06 .04 *Round-trip travel plus collection times in hours.
Pers-Hr/
100 l.b of product Labor 3.0 2.0 4.5 Each district is served by several trucks because each
truck can handle approximately 5 tons of wastes per load.
a. Formulate this problem as a linear program to maxi- Trucks are stationed at each treatment center and then they
mize daily profit. go to a district to collect wastes and return to the center. The
b. Solve the problem using a computer. cost of collection is approximately proportional to the travel
15. International Fiber Company (IFC) makes newsprint plus collection time because drivers are paid on a per-hour
for newspapers. IFC has three paper mills, A, B, and C, basis and do not work 8-hr days.
spread throughout the country. The cost of producing a. Enviroclean would like to determine how much of each
newsprint varies from mill to mill. IFC estimates that the district’s wastes should be collected and sent to each treat-
marginal production cost for each ton of newsprint is $210 ment center to minimize collection cost. Formulate this
at mill A, $225 at B, and $220 at C. IFC supplies five primary problem as a linear program.
geographical markets from these three mills. The monthly b. Solve the problem using a computer.
demand at each market, the per ton shipping cost between c. Does the fact that each truck can carry 5 tons of waste
each mill and each market, and the monthly production ca- violate the divisibility assumption? Does it make the formu-
pacity of each mill are as follows: lation and solution in (a) and (b) invalid? Explain.
17. The demand for Emca Inc.’s product during the next 4
months is given here. The product is made up of two compo-
Capacity
Market (tons/ Month Demand
Mill 1 2 3 4 5 month)
1 90
Shipping A 20 25 30 15 35 1200 2 85
Cost/Ton B 30 20 32 28 19 1500 3 95
C 25 18 28 23 31 900 4 100
Monthly
demand 600 1000 500 800 500
nents, A and B. Emca can either manufacture the components
itself or subcontract to another company. If Emca manufac-
IFC would like to satisfy all market demands at minimum tures the components, each component must go through two
total cost (production plus transportation). Formulate a lin- production departments: fabricating and finishing. Compo-
ear program to sove IFC’s problem. (Hint: Let xij tons of nent A requires 2 hours of fabricating time and 4 hours of
newsprint made at mill i and sent to market j each month, a finishing time; component B requires 3 hours of fabricating
total of 15 variables.) time and 2 hours of finishing time. Each department has 550
16. Enviroclean Waste Disposal Company collects toxic hours of time available each month for production. Emca has
wastes from commercial and industrial sites and transports determined that is costs $200 per unit of A that is made and
them to one of its three treatment centers, where the materi- $240 per unit of B. Emca believes that its production capacity
als are either incinerated, chemically treated to reduce their is insufficient to satisfy the demand, so it has arranged to buy
toxicity, or stored in an approved manner. Each treatment some units of A and B from a subcontractor for $220 per unit
center has a limited capacity: centers A and B can process 50 of A and $255 per unit of B. Any units of the components can
tons per day, and center C can process 75 tons per day. Envi- be held in inventory at a cost of $8 per month.
roclean serves six general districts. The round-trip travel and a. Formulate Emca’s planning problem as a linear pro-
collection times from the six regions to the treatment centers gram to minimize its cost during the next 4 months while
and the predicted daily volumes of waste generated in each delivering the amount demanded each month.
district are given in the following table. b. Solve the problem using a computer.
B44 SUPPLEMENT B LINEAR PROGRAMMING
18. (The previous problems all dealt with the issues faced 20. Solve the following linear program graphically.
by private firms. The following is a simplified version of an
Maximize z x1 2x2
actual public sector problem.) The Appleville School District
Subject to 6x1 3x2 15
has two high schools, each of which has a capacity of 4000
2x1 x2 4
students. Approximately one-third of the high school students
x1, x2 0
in the district are members of racial minorities. The district
can be divided into four distinct communities. The number 21. Solve the following linear program graphically.
of students in each community expected to attend a public
high school next year and the distance from the center of each Minimize z 4A B
community to each high school are listed in Table B-16. Subject to 3A 2B 12
2A 6B 18
A B2
A, B 0
Table B-16 Appleville School District Data
No. of No. of Miles Miles 22. Solve the following linear program using the simplex
Majority Minority to to algorithm.
Community Students Students H.S A H.S B Maximize z 2A 4B 3C
1 1900 250 3.4 1.5 Subject to 3A 4B 2C 60
2 1700 400 2.4 2.2 2A B 2C 40
3 800 650 1.1 2.9 A 3B 2C 80
4 550 1250 1.7 2.8 A, B, C 0
Total 4950 2550
23. Solve the following linear program using the simplex
algorithm.
Historically the two high schools have been racially un- Maximize z 5.0X 8.0Y
balanced, with school A having a disproportionately high en- Subject to 2.5X 5.0Y 50
rollment of minority students and school B having a dispro- 2.0X 1.0Y 20
portionately high enrollment of majority students. To satisfy 7.5X 2.0Y 60
a court agreement to achieve better racial balance between X, Y 0
the schools, each high school must have at least 24% and no 24. Solve the following linear program using the simplex
more than 44% of its enrollment made up of minority stu- algorithm.
dents (the overall minority enrollment in the district is
34%). The school district would like to determine how many Maximize z 15x1 25x2 10x3
students of each type (majority and minority) should be sent Subject to 6x2 3x3 12
from each community to each high school to minimize total x1 4x2 2x3 10
student bus miles traveled. All xjs 0
a. Formulate this problem as a linear program. (Hint: let 25. Solve the following linear program using the simplex
xij number of majority students from community i algorithm.
assigned to H.S. j Minimize z 3A 4B C
yij number of minority students from community i Subject to 2A B C 20
assigned to H.S. j A B 5C 15
A, B, C 0
where i 1, 2, 3, 4 and j A, B.)
26. Solve the following linear program using the simplex
b. Solve this problem using a computer. algorithm.
19. Solve the following linear program graphically: Maximize z 4x1 2x2 2x3
Minimize z 10A 7.5B Subject to 3x1 6x2 3x3 90
Subject to 4A 2B 10 3x1 x2 x3 180
3A 2B 3 x1 x2 x3 60
A B3 All xj s 0
A, B 3
BIBLIOGRAPHY B45
BIBLIOGRAPHY
Eppen, G. D., F. J. Gould, and C. P. Schmidt. Introductory Ravindran, A., Don. T. Philips, and James J. Solberg. Opera-
Management Science, 4th ed., Upper Saddle River, N.J.: tions Research: Principles and Practice, 2nd ed., New York:
Prentice-Hall, 1993. Wiley, 1986.
Hillier, Frederick S., and Gerald J. Leberman. Introduction to Winston, Wayne L. Operations Research: Applications and Al-
Operations Research, 4th ed., Oakland, Calif.: Holden- gorithms, 2nd ed., Boston: PWS-Kent, 1991.
Day, 1986.
Markland, Robert. Topics in Management Science, 3rd ed.,
New York: Wiley, 1989.