Académique Documents
Professionnel Documents
Culture Documents
Contents (lecture-wise):
Lecture-01: Course Outline
Lecture-02: Inventory Model (Risk, Certainty, Expected Value, Payoff Matrix, EVR)
Lecture-03: Opportunity Loss method, EVLO, EVPI, EVC, Incremental Analysis
Lecture-04: Lab Class (Payoff table, Opportunity Loss table in Excel)
Lecture-05: Introduction to Probability, Using tree diagrams for mutually exclusive events
Lecture-06: Problems solved with tree diagrams
Lecture-07: Bayes Theorem
Lecture-08: Decision Analysis (Using Bayes theorem), Decision tree diagram
Lecture-09: Introduction to Linear Programming (LP) Modelling
Lecture-10: LP modelling exercises
Lecture-11: Lab Class (Data input in Excel and using Solver)
Lecture-12: Transportation Model and Assignment Model (LP modelling)
Formulae
Contents (topic-wise):
Payoff Table, Opportunity Loss Table, EVR, EVC, EVLO etc: Lectures 02-04
Probability, Tree Diagram, Bayes theorem: Lectures 05 to 08
Decision Analysis, Decision tree: Lecture-08
LP modelling: Lectures 09 to 12
Transportation and Assignment Model: Lecture-12
Demand
40
41
42
43
44
10%
40
320
295
270
245
220
20%
41
320
333
308
283
258
40%
42
320
333
346
321
296
20%
43
320
333
346
359
334
10%
44
320
333
346
359
372
100%
Expected
Value
320
329.2
330.8
317.2
296
5 expected values (EVs) for each of the production levels (in units) have been found. The
optimum expected value is known as Expected Value under Risk (EVR).
Thus, here EVR = Tk. 330.8 (at 42 units of production).
Note, for the first cell (Demand=40, Production=40) the formula R=38*40-40*25-200 has
been used. However from then on, the values of cells adjacent to each other have been
found using marginal cost, marginal and marginal profit principles.
In the short-term, the models may produce undesired outcome. However, in the long-term,
these models help us make more correct decisions and we would have made without them.
Demand
40
41
42
43
44
10%
40
25
50
75
100
20%
41
13
25
50
75
40%
42
26
13
25
50
20%
43
39
26
13
25
10%
44
52
39
26
13
ELO
26
16.8
15.2
28.8
50
EV
320
329.2
330.8
317.2
296
EVC
346
346
346
346
346
*Only the ELO are calculated from this table. EV had been calculated in the payoff matrix.
Here, the ELOR (Expected Opportunity Loss under Risk) is 15.2 (for 42 units). It is also
the EVPI (discussed below). Therefore, the best decision is to produce 42 units.
Demand
40
41
42
43
44
10%
40
320
295
270
245
220
20%
41
320
333
308
283
258
40%
42
320
333
346
321
296
20%
43
320
333
346
359
334
10%
44
320
333
346
359
372
100%
Expected
Value
320
329.2
330.8
317.2
296
Here, EVC
= (320 * 0.1) + (333 * 0.2) + (346 * 0.4) + (359 * 0.2) + (372 * 0.1)
= 346
Incremental Analysis
Probability of selling the additional unit: (refer to Table 1.1 or 1.2 for probability values)
40th - 100%
41st - 90%
42nd - 70%
43rd - 30%
44th - 10%
For 41st unit, probable profit (? term) = (13 * 0.9) - (25 * 0.1) = 9.2
Since the value is greater than zero, it is profitable to produce the 41st unit.
OLu p - OLo (1-p) = 0, where p = probability of selling; (1-p) = probability of not selling
The above equation helps us find the minimum value of p for which loss is not made.
Thus, p = OLO / (OLO + OLU), where OLO = VC; OLU = CM = SP - VC
This value of p is a minimum value. If, for example, p = 0.68 (or 68%) then up to the 42nd
unit should be produced. The 43rd unit should not be produced because 68% > 30%. Even if
p is 30.5%, then only 42 units should be produced. 43 units should only be produced when p
is below 30%, for example 25%.
Single-Period Inventory Models with Probabilistic Demand
Method
Advantages
Disadvantages
Payoff Table /
Payoff Matrix
Opportunity
Loss
Incremental
Analysis
When only the decision is needed, Opportunity Loss method and Incremental Analysis
Method offer quick anwers. However, the Payoff Table is needed when more detailed
information e.g. about EVC and EVR is needed.
3.
Problem-1:
There are:
No Milk
Total
Sugar
10
16
No Sugar
12
Total
18
10
28
P (M|S) = 10/16;
P(M) P(M|S)
Therefore, the cup containing milk and the cop containing sugar are not independent events.
Note: Another case of events that are neither independent nor mutually exclusive.
Problem-2:
Draw 2 cards from a deck and calculate the probability of getting one ace.
Solution:
[Use tree diagram or direct method. Tree diagram is preferred in complex problems, e.g.
those with more than 4 final outcomes.
d) P(HC) = 0.096
e) For any one claim, P
Problem-2:
The probability that a customer will buy a pen is 30% and a book is 40%. What is the
probability that:
a) he will buy only a pen
b) he will buy both the pen and the book
c) either the pen or the book (but not both)
d) 2 consecutive customers dont buy anything
Solution-A (with Tree diagram):
a) P(PB) = 0.18;
c) P(PB) + P(PB) = 0.18 + 0.28 = 0.46;
b) P(PB) = 0.12;
d) [P(PB)]2 = 0.422 = 0.1764
P(BB) = 1/6
Solution-B (without tree diagram):
P(BB) = 2/4 x 1/3 = 1/6
Problem-4:
From a deck of cards, you pick 2 cards. What is the probability that you will get an Ace and
a King (in any order)?
Problem-5:
From a deck of cards, you pick 2 cards. What is the probability that you will get an Ace and
a King of the same suit (in any order)?
Solution-A (with Tree diagram):
Bayes Theorem
Problem-1:
P(X) = 30%;
P(Y) = 20%;
P(Z) = 50%;
P(E|X) = 10%
P(E|Y) = 20%
P(E|Z) = 5%
where E = error
To find: P(X|E)
Sample Space:
Steps:
1.Find joint probabilities [i.e. P(KE) ]
2. Find marginal p of E [ P(E) = sum of all P(KE) ]
3. Find all the P(K|E) using P(K|E) = P (KE) / P(E)
Solution:
Events
Marginal
Probability
P(K)
Conditional
Probability
P(E|K)
Joint
Probability
P(KE)
Conditional P
(given Error)
P(K|E)
0.30
0.10
0.03
0.316
0.20
0.20
0.04
0.421
0.50
0.05
0.025
0.263
P(E) = 0.095
Total
Problem-2:
Three typists are working. The probability of work being doen by each typist and the
corresponding chances of error are given:
P(A) = 25%; P(E|A) = 20%
P(B) = 45%; P(E|B) = 25%
P(C) = 30%; P(E|C) = 10%
Given that there is error, what is the probability that
(1) A typed it (2) B typed it (3) C typed it
Solution:
Events
Marginal
Probability
P(K)
Conditional
Probability
P(E|K)
Joint
Probability
P(KE)
Conditional P
(given Error)
P(K|E)
0.25
0.20
0.05
0.260
0.45
0.25
0.1125
0.584
0.30
0.10
0.03
0.156
P(E) = 0.1925
Total
Probability that (1) A typed it is 0.260, (2) B typed it is 0.584, (3) C typed it is 0.156
Problem-3:
There will be a football match tomorrow. It rained 5 days each year. Weatherman
forecasted rain for tomorrows match. When it rains, he forecasts 90% of the time. When it
doesnt rain, he forecasts rain 20% of the time. So given that he forecasted rain tomorrow,
what is the probability that it will rain?
Solution:
Let the events Raining be R, not raining be N, and weatherman forecasts rain be F.
Thus,
P(R) = 5/365;
P(N) = 360/365;
P(F|R) = 90%;
P(F|N) = 20%
Events
Marginal
Probability
P(K)
Conditional
Probability
P(F|K)
Joint
Probability
P(KF)
Conditional P
(given Error)
P(K|F)
5/365
0.90
0.0123
0.0587
360/365
0.20
0.1973
0.9413
P(F) = 0.2096
Total
Thus, the probability of rain tomorrow given that weatherman forecasted rain is 0.0587
*Note: If P(F|N) decreases, e.g. 10%, then P(R|F) will increase since it means accuracy
is increasing. [When P(F|N) = 10%, P(R|F) = 0.11 > 0.0587 ]
Large Plant
200,000
-180,000
Small Plant
100,000
-20,000
Do nothing
The company can buy a report which may show the market has favorable conditions (F) or
unfavorable conditions (U). Given that P(F|h) = 70%, P(F|l) = 20%, P(h) = 50%, P(l) = 50%,
find the expected value of the report and the expected value of sample information.
Solution:
When report is Favorable (F):
Variable
P(k)
P(F|k)
P(kF)
P(k|F)
0.50
0.70
0.35
0.778 [0.35/0.45]
0.50
0.20
0.1
0.222 [0.1/0.45]
Sum
0.45 = P(F)
EV of Large Plant
EV of Small Plant
EV of Do Nothing
= (0 x 0.778) + (0 x 0.222)
= 0
P(k)
P(U|k)
P(kU)
P(k|U)
0.50
0.15
0.273 [0.15/0.55]
050
0.80 [1 - 0.20]
0.4
0.727 [0.4/0.55]
Sum
EV of Large Plant
EV of Small Plant
EV of Do Nothing
= 0
Without Report:
EV of Large Plant
EV of Small Plant
EV of Do Nothing
= 0
EV of without report
= EVR = 40,000
Insert
beautiful
decision
tree
diagram
here.
Problem-2:
Given two routes, one of which uses the expressway, and the time taken to travel:
Expressway Open (s 1)
Expressway Jammed (s 2)
30 minutes
30 minutes
Expressway
(Route 2)
25 minutes
45 minutes
Based on their experience with traffic problems, Rona and Jerry agreed on a 0.15
probability that the expressway will be jammed.
In addition, they agreed that weather seemed to affect the traffic conditions on the
expressway. Let:
C = clear;
O = overcast;
R = raining
The following conditional probabilities apply:
P(C|s 1) = 0.8;
P(O|s 1) = 0.2;
P(R|s 1) = 0.0
P(C|s 2) = 0.1;
P(O|s 2) = 0.3;
P(R|s 2) = 0.6
Which route should be selected if the weather is: (a) clear, (b) overcast, (c) raining
(d) What is the expected travel time?
Solution:
For Clear weather:
Variable
P(k)
P(C|k)
P(kC)
P(k|C)
s1
0.85 [1-0.15]
0.80
0.68
0.978 [0.68/0.695]
s2
0.15 [given]
0.10
0.015
0.022 [0.015/0.695]
Sum
0.695 = P(C)
EV of Route 1 = 30
[Route 1 does not use the expressway, so probability of s 1 and s 2 has no effect on it]
EV of Route 2 = 25 x P(s 1|C) + 45 x P(s 2|C)
= (25 x 0.978) + (45 x 0.022)
= 25.44
EVR of Clear = EVRC = 25.44
[Smallest value is EVR as it is regarding time taken]
(a) Route 2 should be selected if weather is clear as it will take less time to travel.
P(k)
P(O|k)
P(kO)
P(k|O)
s1
0.85
0.20
0.17
0.791 [0.17/0.215]
s2
0.15
0.30
0.045
0.209 [0.045/0.215]
Sum
0.215 = P(O)
EV of Route 1 = 30
EV of Route 2 = 25 x P(s 1|O) + 45 x P(s 2|O)
= (25 x 0.791) + (45 x 0.201)
= 29.18
EVR of Overcast = EVRO = 29.18
(b) Route 2 should be selected if weather is overcast as it will take less time to travel.
For Rainy weather:
Variable
P(k)
P(R|k)
P(kR)
P(k|R)
s1
0.85
0.00
0.00
0 [0/0.09
s2
0.15
0.60
0.09
1 [0.09/0.09]
0.09 = P(R)
Sum
EV of Route 1 = 30
EV of Route 2 = 25 x P(s 1|R) + 45 x P(s 2|R)
= (25 x 0) + (45 x 1)
= 45
Insert
beautiful
decision
tree
diagram
here.
Problem-1:
Blue Ridge Hot tubs produces two types of tubs, X and Y. Their details are given below:
Type X
Type Y
Pumps
Labor
9 hrs
6 hrs
Tubing
12 feet
16 feet
Unit profit
$350
$300
There are 200 pumps, 1566 hours of labor and 2880 feet of tubing available.
Solution:
x 1 = number of type X to produce;
x 2 = number of type Y to produce
MAX: 350x 1 + 300x 2
S.T. : x 1 + x 2 200
9x 1 + 6x 2 1566
12x 1 + 16x 2 2880
x 1 0 ; x 2 0
Note: The objective here is to maximize the profit function. The first constraint is about
pump capacity, the second constraint relates to labor capacity, the third constraint is about
tubing capacity, and the final constraints are for non-negativity.
Problem-2:
Two types of paint jobs can be done. A and B are raw materials required:
Exterior Paint
Interior Paint
Revenue
3000
2000
Only 6 units of A and 8 units of B can be used. No more than two interior paint jobs can be
done. At least one more exterior paint job than interior paint job needs to be done.
Develop an LP to maximize the revenue.
Solution:
x 1 = no. of exterior paint jobs
x 2 = no. of interior paint jobs
MAX: 3000x 1 + 2000x 2
S.T. : x 1 + 2x 2 6
2x 1 + x 2 8
x 1 - x 2 1
x 2 2
x 1 0
x 2 0
Note: The objective here is to maximize the revenue function.
The first constraint is about maximum capacity of resource A (which is 6) and the second
constraint is about capacity of resource B (which is 8).
The third constraint expresses that there is AT LEAST one more exterior paintjob than
interior paintjob.
The fourth constraint is about maximum number of interior paintjobs that can be done.
Last 2 constraints are for non-negativity.
Trade credit
Maximum investment
($ millions)
7
1.0
Corporate bonds
11
2.5
Gold stocks
19
1.5
Construction loans
15
1.8
In addition, the board specifies that at least 55% of the funds invested must be in gold
stocks and construction loans, and that no less than 15% be invested in trade credit.
Develop the LP model.
Solution:
x 1 = investment in trade credit ($ millions)
x 2 = investment in corporate bonds ($ millions)
x 3 = investment in gold stocks ($ millions)
x 4 = investment in construction loans ($ millions)
MAX: 0.07x 1 + 0.11x 2 + 0.19x 3 + 0.15x 4
S.T. : x 1 + x 2 + x 3 + x 4 5
x 1 1
x 2 2.5
x 3 1.5
x 4 1.8
x 3 + x 4 0.55 (x 1 + x 2 + x 3 + x 4)
x 1 0.15 (x 1 + x 2 + x 3 + x 4)
x 1 , x 2 , x 3 , x 4 0
Note:
1. Objective is to maximize interest earned, so objective function is sumproduct of array of
interests and the types of investment. The decision variables are the particular types of
investments.
2. First constraint expresses that total investment cannot exceed allotted sum of $5 million.
3. Constraints 2-5 express the maximum investment capacity for each type of investment.
4. Constraint 6 expresses at least 55% of total investment must be in gold + construction.
5. Constraint 7 expresses that at least 15% of total investment must be in trade credit.
6. Non-negative constraints
Problem-2
MSA, a surveying agency, must conduct a survey that satisfied the following requirements:
1. Survey at least 2,300 US households in total.
2. Survey at least 1,000 households whose heads are 30 years of age or younger.
3. Survey at least 600 households whose heads are between 31 and 50 years of age,
4. Ensure at least 15% of those surveyed live in a state that borders Mexico.
5. Ensure that no more than 20% of those surveyed who are 51 years of age or over
live in a state that borders Mexico.
MSA decides that all surveys should be conducted in person. It estimates that the costs of
reaching people in each age and region category are as follows:
Region
Age 30
Age 31-50
Age 51
7.5
6.8
5.5
6.9
7.25
6.1
MSAs goal is to meet the above sampling requirements at the least possible cost.
Note: With three age groups and two geographic groups, there are 6 different combinations
of population. Moreover, there are specific constraints in the problem such as the group of
people in Age 51 who are living in a state that borders Mexico. Thus there must be 6
decision variables, for each of the combinations. In LP problems like these, it helps to
visualize the decision variables in a table/array format (shown below), as it is more
convenient to input these decision variables when using excel to solve.
(This table is to help visualize, and is NOT needed when developing the LP model):
[x 1...x 6 represents no. of people]
Age 30
Age 31-50
Age 51
x1
x2
x3
x4
x5
x6
Solution:
x 1 = No. of people in age 30 living in a state bordering Mexico
x 2 = No. of people in age 31-50 living in a state bordering Mexico
x 3 = No. of people in age 51 living in a state bordering Mexico
x 4 = No. of people in age 30 living in a state NOT bordering Mexico
x 5 = No. of people in age 31-50 living in a state NOT bordering Mexico
x 6 = No. of people in age 51 living in a state NOT bordering Mexico
MIN:
S.T. : x 1 + x 2 + x 3 + x 4 + x 5 + x 6 2300
x 1 + x 4 1000
x 2 + x 5 600
x 1 + x 2 + x 3 0.15 (x 1 + x 2 + x 3 + x 4 + x 5 + x 6)
x 3 0.20 (x 3 + x 6)
x 1 , x 2 , x 3 , x 4 , x 5 , x 6 0
Note: The first 5 constraints correspond to the constraints numbered 1-5 in the problem,
and the last constraint is for non-negativity. The 5th constraint does not take the entire
population of people surveyed as it is mentioned in the problems constraint no.5 of those
surveyed who are 51 years of age or over so only 20% of (x 3 + x 6) is taken.
Problem-3
You need to buy some filing cabinets. You know that Cabinet X costs $10 per unit, requires
six square feet of floor space, and holds eight cubic feet of files. Cabinet Y costs $20 per
unit, requires eight square feet of floor space, and holds twelve cubic feet of files. You have
been given $140 for this purchase, though you don't have to spend that much. The office
has room for no more than 72 square feet of cabinets. How many of which model should
you buy, in order to maximize storage volume?
Solution
Drawing the table makes the problem very easy to model.
Cabinet X
Cost
Cabinet Y
Maximum
$10
$20
$140
Floor Space
6 sq. ft.
8 sq. ft.
72 sq. ft.
Storage Volume
8 cu. ft.
12 cu. ft.
[Objective]
x 1 = no. of Cabinet X
x 2 = no. of Cabinet Y
MAX: 8x 1 + 12x 2
S.T :
Problem-4
XYZ bank has 12 full time tellers. The number of teller required per hour is given below:
Time
9-10
10
10-11
12
11-12
14
12-1
16
1-2
18
2-3
17
3-4
15
4-5
10
The bank is considering hiring some part time tellers. If it is economically viable, they will
reduce the number of full time employees.
Full Time Tellers:
Work from 9 AM 5 PM
Take a 1 hour lunch break, half at 11, the other half at noon
Cost $90 per day (salary & benefits)
Part Time Tellers:
Work 4 consecutive hours (no lunch break)
Are paid $7 per hour ($28 per day)
Part time teller hours cannot exceed 50% of the days minimum requirement
Develop the LP Model
Solution:
p1 = No. of part-time employees starting work at 9
p2 = No. of part-time employees starting work at 10
p3 = No. of part-time employees starting work at 11
p4 = No. of part-time employees starting work at 12
p5 = No. of part-time employees starting work at 1
Boston
Cleveland
Des Moines
Evansfield
Fordville
Capacity of units:
Des Moines
100
Albequerque
300
Evansfield
300
Boston
200
Fordville
300
Cleveland
200
Total
700
Total
700
*Note that total capacity of units demanded (Destination) and supply (Origin) sides are
equal (700 units). Thus, this is a balanced model.
Solution
Let no. of units to be shipped from Des Moines to Albuquerque = x 11
Let no. of units to be shipped from Des Moines to Boston = x 12
Let no. of units to be shipped from Des Moines to Cleveland = x 13
Let no. of units to be shipped from Evansfield to Albuquerque = x 21
Let no. of units to be shipped from Evansfield to Boston = x 22
Let no. of units to be shipped from Evansfield to Cleveland = x 23
Let no. of units to be shipped from Fordville to Albuquerque = x 31
Let no. of units to be shipped from Fordville to Boston = x 32
Let no. of units to be shipped from Fordville to Cleveland = x 33
MIN:
S.T:
5x 11 + 4x 12 + 3x 13 + 8x 21 + 4x 22 + 3x 23 + 9x 31 + 7x 32 + 5x 33
x 11 + x 12 + x 13 = 100
x 21 + x 22 + x 23 = 300
x 31 + x 32 + x 33 = 300
x 11 + x 21 + x 31 = 300
x 12 + x 22 + x 32 = 300
x 13 + x 23 + x 33 = 200
x 11 , x 12 , x 13 , x 21 , x 22 , x 23 , x 31 , x 32 , x 33 0
Note:
1. The objective is to minimize the cost function, thus objective function is the
sumproduct of the array of no. of units (shipped from each origin to each destination) and
the unit cost of transportation. The decision variables here are the no. of units shipped
from each origin to each destination, and as there are six combinations, there are 9
decision variables from x 11 to x 33
2. Constraints 1-3 are for origin/demand-side. The 1st constraint is for Des Moines, 2nd
constraint for Evansfield and so on. = is used as this is a balanced transportation model.
3. Constraints 4-6 are for destination/supply-side. The 4th constraint is for Albuquerque, 5th
constraint is for d-2 and so on. = is used as this is a balanced transportation model.
4. The final (7th) constraint is for non-negativity.
Task-2
Task-3
Adams
11
14
Brown
10
11
Cooper
12
Solution
Adams doing Task-1 = x 11
Brown doing Task-1 = x 21
Cooper doing Task-1 = x 31
MIN:
S.T:
x 11 + x 12 + x 13 = 1
x 21 + x 22 + x 23 = 1
x 31 + x 32 + x 33 = 1
x 11 + x 21 + x 31 = 1
x 12 + x 22 + x 32 = 1
x 13 + x 23 + x 33 = 1
x 11 , x 12 , x 13 , x 21 , x 22 , x 23 , x 31 , x 32 , x 33 0
x 11 , x 12 , x 13 , x 21 , x 22 , x 23 , x 31 , x 32 , x 33 1
Note:
1. The objective is to minimize the cost function, thus objective function is the
sumproduct of the array of each assignee doing each assignment and the unit cost of
doing the work. The decision variables here are assignees doing assignments.
2. The last two constraints (constraints 7 and 8) are to express that the value of decision
variables can only be either 1 (for assignee doing the assignment) and 0 (for assignee not
doing assignment).
3. Constraints 1-6 are for 1-to-1 relationship of assignees/people and assignments/tasks.
The first three constraints are to express that each assignee/person can perform AT LEAST
and AT MOST one task only. Since total value is 1 and decision variables can only take
values of either 1 or 0, only one of the three decision variables in the constraint will be
equal to 1 and the other two will equal zero. For example, x 11 + x 12 + x 13 = 1 is the
constraint for Adams. If x 12 = 1, this means x 11=x 13=0, which means that Adams will be
performing task-2 and not performing task-1 and task-3.
Similarly, the last three constraints are to express that each assignment/task can be
performed by AT LEAST and AT MOST one assignee/person only.
Excel:
1.
Profit = p x SP - p x VC - FC (when production <= demand)
Profit = d x SP - p x VC - FC (when production > demand)
[Using IF, for payoff matrix]
2.
3.
4.
Probability
For all events:
P(AUB) = P(A) + P(B) - P(AB)
P(AUBUC) = P(A) + P(B) + P(C) - P(AB) - P(AC) - P(BC) + P(ABC)
P(A|B) = P(AB) / P(B)
or, P(AB) = P(A|B) / P(B) or, P(B) = P(AB) / P(A|B)
For mutually exclusive events:
P(AB) = 0; P(AUB) = P(A) + P (B)
For independent events:
P(AB) = P(A).P(B); P(AUB) = P(A) + P(B) - P(A).P(B)
The branches of tree diagrams represent mutually exclusive events
Bayes Theorem:
1.Find all the joint probabilities [i.e. P(KE) ]
2. Find marginal probability of E [ P(E) = sum of all P(KE) ]
3. Find all the P(K|E), using P(K|E) = P (KE) / P(E)
Steps to develop LP model:
1. Understand the problem
2. Identify the decision variables
3. Determine the objective function in terms of decision variables
4. Determine constraints in terms of decision variables
5. State the non-negative constraints