Upload
duongtruc
View
220
Download
4
Embed Size (px)
Citation preview
The OR Final Exam July 31
An opportunity for the discriminating student to do good.
Taking the OR
Exam just has to be
about the best thing in
the world!
The Rules of Engagement • Open book – notes, presentations, journal articles
• No Computers but calculators should be used
• 90 minutes in length
• Internet Students need to register for the exam by Noon Monday July 29th
• 3 problem solving questions
I decided not to use my
book or notes so I can
demonstrate complete
mastery of the subject.
For your educational enjoyment:
•Question #1
•Markov Process (steady-state)
•Question #2
•Queuing Model (Rate diagram problem)
•Question #3
•Classical Optimization (Unconstrained, Lagrangian or
KKT problem)
4
The Semester in Review A fast pace look at the highlights of
the Operations Research course.
- See actual problems solved,
- Feel the suspense as the semester comes to an end,
- Relive those glorious day of summer!
5
What will we see?
• Steady-state Markov problems
• Queuing problems with variations
• An unconstrained optimization problem
• An equality constrained optimization problem
• An inequality constrained optimization problem
6
The A. Salt Mining Company work force consisting of 70 migrant workers. Transition
period is one day
Next day today On time Late No show
On time 0.4 0.3 0.3
Late 0.8 0.2 0
No show 0 0.8 0.2
P matrix Next day
today On time Late No show
On time 0.4 a. 0.3 0.3
Late 0.8 0.2 0
No show 0 0.8 0.2
(a) What is the probability that a worker that was on time on a Monday
will be late for work on the next day?
7
(b) What is the long run percent of workers that will (1) show up
for work on time, (2) are late, or (3) are no shows on any given
day?
P matrix Next day
Today On time Late No show
On time 0.4 0.3 0.3
Late 0.8 0.2 0
No show 0 0.8 0.2
1 1 2
3 1 3
2 1 3
.4 .8
.3 .2
1
1 2
1 3
1 2 3
1 2 3
.6 .8 0
.3 .8 0
1
.471; .353; .176
(c) If a worker is late today, what is the expected number of days before that worker is late again?
8
22
2
1 12.83
.353days
(d) If a worker is late on a Monday, what is the probability that worker will not show up for work
Wednesday?
9
P2 matrix Wednesday
Monday On time Late No show
On time 0.4 0.42 0.18
Late 0.48 0.28 d. 0.24
No show 0.64 0.32 0.04
23
2
.3
.8 .2 0 0 .24
.2
p
P matrix Next day
Today On time Late No show
On time 0.4 0.3 0.3
Late 0.8 0.2 0
No show 0 0.8 0.2
(e) If Mark Off, a migrant worker, is late today, what is the expected number of days before Mark is at work on time?
10
21 21 31
21
21
1 .2 0
.8 1
11.25
.8
u
P matrix Next day
Today On time Late No show
On time 0.4 0.3 0.3
Late 0.8 0.2 0
No show 0 0.8 0.2
1ij ik kj
k j
u p u
j = 1, k = 2, 3
(f) Today was a particularly bad day with only 30 workers showing up on time, 15 were late, and the remaining were no-shows. What is the expected number of workers that will be at
work on time tomorrow?
11
30 15 25 On time Late No show
0.4 0.3 0.3
0.8 0.2 0
0 0.8 0.2 (30) (.4) + 15 (.8) + 25 (0) = 24 32 14
A Queuing Problem
• WeTube is a video-sharing website that maintains 3 web servers.
• Each server fails at the rate of once every 5 days.
• It takes Sam, the maintenance man, a mean of 2 days to restore a failed server.
• However, if all 3 servers have failed, then Sam calls on Pam to restore one of the servers (also with a mean time of 2 days).
• Assume steady-state with exponential time between failures and restoration times.
Construct the rate diagram
0
3/5 2/5 1/5
1/2 1/2 2(1/2)
1 2 3
What is the probability that Sam is not busy?
0
3/5 2/5 1/5
1/2 1/2 2(1/2)
1 2 3 C1
= 6/5 ; C2 = (6/5)(4/5) = 24/25
C3 = (24/25)(1/5)
P0 = [1 + 6/5 + 24/25 + 24/125]-1 = 0.29833
Compute the average number of servers down for repair.
0
3/5 2/5 1/5
1/2 1/2 2(1/2)
1 2 3 C1
= 6/5 ; C2 = (6/5)(4/5) = 24/25
C3 = (24/25)(1/5)
P0 = [1 + 6/5 + 24/25 + 24/125]-1 = 0.29833
L = (1)(6/5)(0.29833) + 2(24/25)(0.29833) +
3(24/125)(0.29833) = 1.103
What is the average time in days that a server is down for repair?
0
3/5 2/5 1/5
1/2 1/2 2(1/2)
1 2 3 C1
= 6/5 ; C2 = (6/5)(4/5) = 24/25
C3 = (24/25)(1/5)
P0 = [1 + 6/5 + 24/25 + 24/125]-1 = 0.29833
L = (1)(6/5)(0.29833) + 2(24/25)(0.29833) +
(24/125)(0.29833) = 1.103
bar = (3/5)(0.29833) + (2/5)(6/5)(0.29833)
+ (1/5)(24/25)(0.29833) = .37947
W = L/ bar = 2.906 days
What is the probability that no server will be available on-line?
0
3/5 2/5 1/5
1/2 1/2 2(1/2)
1 2 3 C1
= 6/5 ; C2 = (6/5)(4/5) = 24/25
C3 = (24/25)(1/5)
P0 = [1 + 6/5 + 24/25 + 24/125]-1 = 0.29833
L = (1)(6/5)(0.29833) + 2(24/25)(0.29833) +
(24/125)(0.29833) = 1.103
P3 = (24/125)(0.29833) = 0.05728
We are going to work some more
problems!
This is going to be so great!
Another Markov Problem
• Families in the country of Marcoff live in one of two regions: the Mountains or the Coastal region.
• Each year a certain fraction of the families in each region will migrate to the other region. This annual migration pattern is captured in the following table.
• Model this migration pattern as a Markov chain.
From Region
To region
Mountains Coastal region
Mountains .8 .2
Coastal region .3 .7
Question 1
• Find the steady-state percent of the population that will live in each region.
From Region
To region
Mountains Coastal region
Mountains .8 .2
Coastal region .3 .7
1 2
3 2;
5 5
1 1 2
1 2
2 1
1 1
.8 .3
1
.2
.3
2 51 1
3 3
Question 2
• What is the expected number of years for a family in each region to return to that region?
From Region
To region
Mountains Coastal region
Mountains .8 .2
Coastal region .3 .7
1 2
3 2;
5 5
Expected reoccurrence times
Mountains Coastal region
5/3 = 1.67 years
5/2 =2.5 years
Question 3
• If a family is currently living in the Mountains, what is the probability that they will be living in the Mountains or the Coastal region two years from now?
From Region
To region
Mountains Coastal region
Mountains .8 .2
Coastal region .3 .7
2.8 .2 .8 .2 .7 .3
.3 .7 .3 .7 .45 .55P
Mountains Coastal
0.7 0.3
Question 4 • What are the expected first passage times for families living in
the Mountains to migrate to the coastal region and for families living in the coastal region to migrate to the Mountains?
From Region
To region
Mountains Coastal region
Mountains .8 .2
Coastal region .3 .7
12 12
12
1 .8
1/ .2 5
Mountains Coastal
5 yr 3 1/3 yr
21 21
21
1 .7
11/ .3 3
3
Question 5 • The following table shows the current number of families (in
1,000’s) living in each region. What will be the population (in 1,000’s) of each region a year from now?
From Region
To region
Mountains Coastal region
Mountains .8 .2
Coastal region .3 .7
Mountains Coastal
500 500
Mountains Coastal
400 600
.8 .2
400 600 500 500.3 .7
Another queuing problem • The Dayton library has two copies of the best
seller novel by M.L. Stedman titled The Light Between Oceans.
• The mean demand rate for this book by patrons of the library is 2 per week.
• The average (mean) time that the book is checked out is for 2 weeks.
• If both books are checked out, then up two patrons may be placed on a holding list.
• Assume steady-state with exponential time between demands and check out times and an infinite calling population.
Construct the rate diagram
0
2 2 2
1/2 2(1/2) 2(1/2)
1 2 3 4
2
2(1/2)
What is the probability that both books are available?
0
2 2 2
1/2 2(1/2) 2(1/2)
1 2 3 4
2
2(1/2)
C1 = 4 ; C2 = 8; C3 = 16; C4 = 32
P0 = [1 + 4+ 8 + 16 + 32]-1 = [61]-1 = .0164
Compute the average number of patrons on the holding (waiting) list.
P0 = [1 + 4+ 8 + 16 + 32]-1 = [61]-1 = .0164
Lq = (1)(16/61)+ 2(32/61) = 80/61 = 1.31
0
2 2 2
1/2 2(1/2) 2(1/2)
1 2 3 4
2
2(1/2)
C1 = 4 ; C2 = 8; C3 = 16; C4 = 32
What is the average time in days that a patron is on the holding list before obtaining the novel?
bar = 2(1-32/61) = 58/61
Wq = Lq/ bar = (80/61) / (58/61) = 80/58 = 1.38
weeks = 9.65 days
P0 = P0 = [1 + 4+ 8 + 16 + 32]-1 = [61]-1 = .0164
Lq = (1)(16/61)+ 2(32/61) = 80/61 = 1.31
C1 = 4 ; C2 = 8; C3 = 16; C4 = 32
What is the expected number of patrons requesting the novel that are turned away each week?
P4 = 2 (32/61) = 64/61 = 1.05
0
2 2 2
1/2 2(1/2) 2(1/2)
1 2 3 4
2
2(1/2)
C1 = 4 ; C2 = 8; C3 = 16; C4 = 32
• The Light Between Oceans is an incredible moving novel about what happens when good people make bad decisions. The story takes place in the town of Point Partageuse, Australia during the 1920s. The story begins when a light house keeper (Tom) and his wife (Isabel) find a life boat with ….
32
An unconstrained optimization problem
There are no constraints in reaching the summit
33
Nonlinear Programming The I. B. A. Failure Company makes two types of
anti-lock brake systems having the following demand
functions:
x = 100 - .05 Sx - .1y
y = 300 - .10 Sy - .2 x
where Sx and Sy are the selling prices of the x and y models.
Dan D. Lion, Vice-Pres for Product Development must set
the unit prices in order to maximize revenue. Daf O. Dil, a
management scientist, says to find a stationary point and
then check the second order conditions.
note: x,y are in hundreds
34
Sx = 2000 – 20x – 2y
Sy = 3000 – 2x – 10y
R = Sx x + Sy y = 2000x – 20x2 - 2xy + 3000y – 2xy – 10y2
Rx = 2000 – 40x – 4y = 0
Ry = 3000 – 20y – 4x = 0
x* = 35.7 and y* = 143
Sx = $1000 and Sy = $1498.60
Let’s solve this thing…
35
R(x,y) = 2000x – 20x2 - 2xy + 3000y – 2xy – 10y2
Rx = 2000 – 40x – 4y = 0
Ry = 3000 – 20y – 4x = 0
Rxx = - 40 < 0
Ryy = - 20
Rxy = - 4
Rxx Ryy –(Rxy)2 = (- 40)( - 20) – 16 >0
therefore the function is concave.
2nd order conditions:
36
An equality constrained optimization problem
Lagrange to the rescue
Must stay on the road in climbing to the summit
37
The Maxi Mum Company • The Maxi Mum Company must produced 1,000 units of a
product over the next 4 months. Because of changes in labor and material costs, the profit generated from each month’s production will change. If xi is the number of units produced in month i and the total profit is given by the following function, find the production levels for each month that will maximize the production of the 1,000 units.
.5 .5 .5 .5
1 2 3 4Profit 6 4 3 2x x x x
38
Setting up the solution conditions (a) Set up the Lagrangian function:
(b) Construct the necessary conditions:
1 2 3 4
.5 .5 .5 .5
1 2 3 4 1 2 3 4
L(x , x , x , x , )
6 4 3 2 x x x x 1000
v
x x x x v
4
1
0; 1,2,3,42
1000 0
i
i i
i
i
aLv i
x x
x
Where a1 = 6, a2 = 4, a3 = 3; a4 = 2
39
Now solving… (c) Solve for the optimum monthly production levels.
2
2
2
4 4 42 2
2 21 1 1
2
4 422 2
1 1
02
1
2 2 4
1 11000
4 4
1 1000 1000;
4
i
i i
i ii i i
i i i
i i i
i i
i i
i i
aLv
x x
a ax or x a
v v v
x a av v
x av
a a
40
What about a numerical solution?
42 2 2 2 2
1
2
42
1
1
2
3
4
10006 4 3 2 65; 15.3846
65
1000
15.3846 36 553.85
15.3846 16 246.15
15.3846 36 138.46
15.3846 4 61.54
i
i
i i
i
i
a
x a
a
x
x
x
x
41
Sufficiency? .5 .5 .5 .5
1 2 3 4
.5 .5 .5 .5
1 2 3 4
1 1 3 4
1.5
1
1.5
2
1 2 3 4
1.5
3
1.5
4
Profit 6 4 3 2
Profit Profit Profit Profit3 ; 2 ; 1.5 ;
1.50 0 0
10 0 0
( , , , ).75
0 0 0
.50 0 0
x x x x
x x x xx x x x
x
xH x x x x
x
x
42
An inequality constrained optimization problem
Karush-Kuhn-Tucker to the rescue
Constrained from reaching the summit
43
KKT Problem!
Max f(x,y) = 24 ln(x) + 40 ln(y)
s.t. 5x + 8y ≤ 192
where ln is the natural log function
a. Write the Lagrangian function for this problem.
L(x,y, ) = 24ln(x) + 40ln(y) - (5x + 8y -192)
44
K-T Conditions
L(x,y, ) = 24ln(x) + 40ln(y) - (5x + 8y -192)
b. Construct the necessary (Kuhn-Tucker) conditions for
solving this problem.
I. 24/x - 5 = 0 II. 5x + 8y ≤ 192
40/y - 8 = 0
III. (5x – 8y – 192) = 0 IV. ≥ 0
45
c. Solve (b)
First assume = 0, then from I. infeasible
Second assume > 0, then
from I. 8(24) / x – 200/y = 0 or y = (25/24) x
and substituting into III for y gives 5x + 8 (25/24) x = 192
or x = 14.4 and y = 15
then from I: * = 40 / (8y) = 1/3 > 0
Therefore found a K-T point.
I. 24/x - 5 = 0 II. 5x + 8y ≤ 192
40/y - 8 = 0
III. (5x – 8y – 192) = 0 IV. ≥ 0
46
Check for Sufficiency
The constraint is linear, therefore the feasible region is convex. The
KKT conditions are both necessary and sufficient.
d. Tell why or why not, your solution in (c) solves the original problem (i.e.
is a global maximum).
Since
fxx = -24/x2 < 0 ; fyy = -40/y2 < 0 ; fxy = 0 and fxx fyy – (fxy)2 > 0,
then f(x,y) is everywhere concave.
2
2
240
400
xH
y
47
Final Exam Warm-up Question
1. Combine linear, nonlinear, and integer programming into
the elusive unified field theory.
2. Develop a new mathematical system in which to develop
your theory.
3. Devise a costly experiment to support it.
4. Show with your theory that graduate students are both
concave and suboptimal and they will only converge
locally displaying complementary slackness.
5. Show also that the dual to a graduate student is a convex
polyhedron with a single pointed and obtuse vertex.
48
The OR Final Exam
Remember to support your local
operations researcher.
Coming soon to a location near you.
49
No title needed There is nothing better in life than to
do well on an OR exam.
I am so excited about the OR final exam.
Engineering Management Students enthusiastic about the OR Final
I wish there were more than 3 problems on
the final. This is going to
be the best test ever!
Yippee! I’m on my
way to take the OR
Exam! This will be fun!
I remember when
I took the OR Exam.
Gosh, those were the days!
My
book
I passed the OR
Exam last year. Look
at me now!
The OR Exam Be the first on your
block to pass it!