No Slide Title

Download Report

Transcript No Slide Title

Chapter 10
Solutions 1
10.3.1) The owner of a chain of three grocery stores has purchased 5 crates of fresh
strawberries. The estimated probability distribution of potential sales of the strawberries
before spoilage differs among the three stores. Therefore, the owner wants to know how to
allocate 5 crates to the three stores to maximize expected profit.
For administrative reasons, the owner does not wish to split crates between stores.
However, he is willing to distribute no crates to any of his stores. The following table gives
estimated expected profit at each store when it is allocated various numbers of crates.
Crates
0
1
2
3
4
5
1
0
5
9
14
17
21
Store
2
0
6
11
15
19
22
3
0
4
9
13
18
20
Soln:
Let xn = number crates allocated to a store
pn(xn) = expected profit from allocating xn crates to store n
sn = number of crates remaining
fn(sn) = max { pn(xn) + fn+1*(sn-xn) }
Chapter 10
Solutions 1
10.3.1)
Crates
0
1
2
3
4
5
1
0
5
9
14
17
21
Store
2
0
6
11
15
19
22
3
0
4
9
13
18
20
Soln:
Let xn = number crates allocated to a store
pn(xn) = expected profit from allocating xn crates to store n
sn = number of crates remaining
fn(sn) = max { pn(xn) + fn+1*(sn-xn) }
Store 1
5
Store 2
Store 3
5
5
4
4
3
3
2
2
1
1
0
0
0
Chapter 10
Solutions 1
10.3.1)
Crates
0
1
2
3
4
5
Store
2
0
6
11
15
19
22
1
0
5
9
14
17
21
3
0
4
9
13
18
20
Soln:
Let xn = number crates allocated to a store
pn(xn) = expected profit from allocating xn crates to store n
sn = number of crates remaining
fn(sn) = max { pn(xn) + fn+1*(sn-xn) }
Store 1
5
Store 2
Store 3
5
5
s3
f3 *(s 3 )
x3 *
4
4
3
3
2
2
1
1
0
1
2
3
4
5
0
4
9
13
18
20
0
1
2
3
4
5
0
0
0
Chapter 10
Solutions 1
10.3.1)
Crates
0
1
2
3
4
5
Store
2
0
6
11
15
19
22
1
0
5
9
14
17
21
3
0
4
9
13
18
20
Soln:
Let xn = number crates allocated to a store
pn(xn) = expected profit from allocating xn crates to store n
sn = number of crates remaining
fn(sn) = max { pn(xn) + fn+1*(sn-xn) }
Store 1
5
Store 2
Store 3
5
5
s3
f3 *(s 3 )
x3 *
4
4
3
3
2
2
1
1
0
1
2
3
4
5
0
4
9
13
18
20
0
1
2
3
4
5
0
0
0
Chapter 10
Solutions 1
10.3.1)
Store 1
5
Store 2
Store 3
5
5
4
4
3
3
2
2
1
1
0
0
0
x2
s2
0
1
2
3
4
5
0
0
4
9
13
18
20
1
6+0
6+4
6+9
6+13
6+18
2
11+0
11+4
11+9
11+13
3
15+0
15+4
15+9
4
19+0
19+4
5
f2 *(s 2 )
x2 *
22+0
0
6
11
15
20
24
0
1
2
1,2,3
2
1,2,3
Chapter 10
Solutions 1
10.3.1)
Store 1
5
Store 2
Store 3
5
5
4
4
3
3
2
2
1
1
0
0
0
x1
s1
5
0
0+24
1
5+20
Optimal Allocation
5
Optimal path
Optimal path from
a given state
2
9+15
Store 1
3
14+11
4
17+6
Store 2
5
21+0
Store 3
5
5
4
4
3
3
2
2
1
1
0
0
0
f1 *(s 1 )
x1 *
25
1,3
Chapter 10
Solutions 1
10.3.2) A college student has 7 days remaining before final examinations begin in her four
courses and she wants to allocate this study time as effectively as possible. She needs at
least 1 day on each course, and she likes to concentrate on just one course each day, so she
wants to allocate 1, 2, 3, or 4 days to each course. Having recently taken an O.R. course,
she decides to use dynamic programming to make the allocations so as to maximize the
total grade points.
Study Days
1
2
3
4
1
3
5
6
7
Grade Points per Course
2
3
5
2
5
4
6
7
9
8
4
6
7
9
9
Soln:
Let xn = number days allocated to a course
pn(xn) = grade points earned from allocating xn days to course n
sn = number of days remaining
fn(sn) = max { pn(xn) + fn+1*(sn-xn) }
Course 1
Course 2
Course 3
7
6
5
5
4
4
3
3
2
Chapter 10
Solutions 1
10.3.2)
Soln:
Let xn = number days allocated to a course
pn(xn) = grade points earned from allocating xn days to course n
sn = number of days remaining
fn(sn) = max { pn(xn) + fn+1*(sn-xn) }
Course 1
Course 2
Course 3
Course 4
7
6
5
5
4
4
3
3
2
s4
f4 *(s 4 )
x4 *
1
2
3
4
6
7
9
9
1
2
3
4
4
3
2
1
0
Chapter 10
Solutions 1
10.3.2)
Soln:
Let xn = number days allocated to a course
pn(xn) = grade points earned from allocating xn days to course n
sn = number of days remaining
fn(sn) = max { pn(xn) + fn+1*(sn-xn) }
Course 1
Course 2
Course 3
Course 4
7
6
5
5
4
4
3
3
4
3
2
2
1
0
s3
2
3
4
5
1
8
9
11
11
2
10
11
13
3
13
14
4
f3 *(s 3 )
x3 *
14
8
10
13
14
1
2
3
3,4
Chapter 10
Solutions 1
10.3.2)
Soln:
Let xn = number days allocated to a course
pn(xn) = grade points earned from allocating xn days to course n
sn = number of days remaining
fn(sn) = max { pn(xn) + fn+1*(sn-xn) }
Course 1
Course 2
Course 3
Course 4
7
6
5
5
4
4
3
3
4
3
2
2
1
0
s2
3
4
5
6
1
13
15
18
19
2
13
15
18
3
14
16
4
f2 *(s 2 )
x2 *
17
13
15
18
19
1
1
1
1
Chapter 10
Solutions 1
10.3.2)
Soln:
Let xn = number days allocated to a course
pn(xn) = grade points earned from allocating xn days to course n
sn = number of days remaining
fn(sn) = max { pn(xn) + fn+1*(sn-xn) }
Course 1
Course 2
Course 3
Course 4
7
6
5
5
4
4
3
3
4
3
2
2
1
0
s1
7
Optimal
1
1
22
2
23
3
21
4
20
f1*(s 1 )
x1*
23
2
x1*
x2 *
x3 *
x4 *
2
1
3
1
Chapter 10
Solutions 1
10.3.7) Consider an electronic system consisting of four components, each of which must
work for the system to function. The reliability of the system can be improved by installing
several parallel units in one or more components. The following table gives the probability
that the respective components will function if they consist of one, two, or three parallel
units:
Units
1
2
3
Comp 1
0.5
0.6
0.8
Probability of Functioning
Comp 2
Comp 3
Comp 4
0.6
0.7
0.5
0.7
0.8
0.7
0.8
0.9
0.9
The probability that the system will function is the product of the probabilities that the
respective components will function. The cost (in $100’s) of installing 1, 2, or 3 parallel
units in the respective components is given by the following table: (total budget = $1,000).
Units
1
2
3
Comp 1
1
2
3
Cost
Comp 2
Comp 3
2
1
4
3
5
4
Comp 4
2
3
4
Soln:
Let xn = number parallel units for component n
pn(xn) = probability component will function with xn parallel units
cn(xn) = cost of installing xn units
sn = number of $ in 100’s remaining
fn(sn) = max { pn(xn) * fn+1*(sn-cn(xn) }
Chapter 10
Solutions 1
10.3.7)
Units
1
2
3
Comp 1
0.5
0.6
0.8
Units
1
2
3
Probability of Functioning
Comp 2
Comp 3
Comp 4
0.6
0.7
0.5
0.7
0.8
0.7
0.8
0.9
0.9
Comp 1
1
2
3
Cost
Comp 2
Comp 3
2
1
4
3
5
4
Comp 4
2
3
4
Soln:
Let xn = number parallel units for component n
pn(xn) = probability component will function with xn parallel units
cn(xn) = cost of installing xn units
sn = number of $ in 100’s remaining
fn(sn) = max { pn(xn) * fn+1*(sn-cn(xn) }
s4
f4 *(s 4 )
x4 *
0
1
2
3
4-10
0
0
0.5
0.7
0.9
0
0
1
2
3
Chapter 10
Solutions 1
10.3.7)
Units
1
2
3
Comp 1
0.5
0.6
0.8
Units
1
2
3
Probability of Functioning
Comp 2
Comp 3
Comp 4
0.6
0.7
0.5
0.7
0.8
0.7
0.8
0.9
0.9
Comp 1
1
2
3
Cost
Comp 2
Comp 3
2
1
4
3
5
4
Comp 4
2
3
4
Soln:
s4
f4 *(s 4 )
x4 *
0
1
2
3
4-10
0
0
0.5
0.7
0.9
0
0
1
2
3
s3
0
1
2
3
4
5
6
7
8-10
1
0
0
0.35
0.49
0.63
0.63
0.63
0.63
2
0
0
0.4
0.56
0.72
0.72
3
f3 *(s 3 )
x3 *
0
0
0.45
0.63
0.81
0
0
0
0.35
0.49
0.63
0.63
0.72
0.81
0
0,1
0,1
1
1
1
1
2
3
Chapter 10
Solutions 1
10.3.7)
Units
1
2
3
Units
1
2
3
Comp 1
0.5
0.6
0.8
Probability of Functioning
Comp 2
Comp 3
Comp 4
0.6
0.7
0.5
0.7
0.8
0.7
0.8
0.9
0.9
Cost
Comp 2
Comp 3
2
1
4
3
5
4
Comp 1
1
2
3
Comp 4
2
3
4
Soln:
s3
0
1
2
3
4
5
6
7
8-10
s2
2
3
4
5
6
7
8
9
10
1
0
0
0.35
0.49
0.63
0.63
0.63
0.63
1
0
0
0
0.21
0.294
0.378
0.378
0.432
0.486
3
f3 *(s 3 )
x3 *
0
0
0.4
0.56
0.72
0.72
0
0
0.45
0.63
0.81
0
0
0
0.35
0.49
0.63
0.63
0.72
0.81
0
0,1
0,1
1
1
1
1
2
3
2
3
f2 *(s 2 )
x2 *
0
0
0
0.28
0.392
0.504
0
0
0
0.21
0.294
0.378
0.378
0.441
0.504
0,1
0,1
0,1,2
1
1
1
1
2
3
2
0
0
0
0.245
0.343
0.441
0.441
Chapter 10
Solutions 1
10.3.7)
Units
1
2
3
Comp 1
0.5
0.6
0.8
Units
1
2
3
Probability of Functioning
Comp 2
Comp 3
Comp 4
0.6
0.7
0.5
0.7
0.8
0.7
0.8
0.9
0.9
Cost
Comp 2
Comp 3
2
1
4
3
5
4
Comp 1
1
2
3
Comp 4
2
3
4
Soln:
s2
2
3
4
5
6
7
8
9
10
s1
10
Optimal
1
3
f2 *(s 2 )
x2 *
0
0
0
0.245
0.343
0.441
0.441
0
0
0
0.28
0.392
0.504
0
0
0
0.21
0.294
0.378
0.378
0.441
0.504
0,1
0,1
0,1,2
1
1
1
1
2
3
1
0.22
2
0.227
3
0.302
f1 *(s 1 )
x1 *
0.302
3
x1 *
x2 *
x3 *
x4 *
3
1
1
3
1
0
0
0
0.21
0.294
0.378
0.378
0.432
0.486
2