Sie sind auf Seite 1von 5

Dynamic Programming

1.

A firm has divided its marketing area into three zones. The amount of sales depends on the number of salesmen in each zone. The firm has the data on the number
of salesmen and sales over a period of time. This is given below. The firm has a total of nine salesmen and the problem is to allocate these salesmen to different
zones so that the sales are maximum.
Number of salesmen
Zone I
Zone II
Zone III
0
30
35
42
1
45
45
54
2
60
52
60
3
70
64
70
4
79
72
82
5
90
82
95
6
98
93
102
7
105
98
110
8
100
100
110
9
90
100
110
Stage 1: we start with the first zone write the number of salesmen and sales
No of
0
1
2
3
4
salesmen
Sales
30
45
60
70
79

90

98

105

100

90

Stage 2: Now consider the first two zones. Nine salesmen can be deployed in these two zones in ten different ways.
Zone 1
Zone 2
0
1
2
3
4
5
6
7
8
9

35
45
52
64
72
82
93
98
100
100

0
30
65
75
82
94
102
112
123
128
130
130

1
45
80
90
97
109
117
127
138
143
145

2
60
95
105
112
124
132
142
153
158

3
70
105
115
122
134
142
152
163

4
79
114
124
131
143
151
161

5
90
125
135
142
154
162

6
98
133
143
150
162

7
105
140
150
157

8
100
135
145

9
90
125

Stage 3: See the allocation with the highest sales and prepare the allocations for the third zone accordingly
Zone 1+2
Zone 2

0
1
2
3
4
5
6
7
8
9

42
54
60
70
82
95
102
110
110
110

0
65
0+0

1
80
1+0

2
95
2+0

107
119
125
135
147
150
167
175
175
175

122
134
140
150
162
175
182
190
190

137
149
155
160
177
190
197
205

3
105
3+0
2+1
147
159
165
175
187
200
207

4
115
3+1

5
125
5+0

6
135
5+1

157
169
175
185
197
210

167
179
185
195
207

177
189
195
205

7
143
6+1
4+3
185
197
203

8
154
5+3

9
163
3+6

196
208

205

Example 2: The owner of four grocery stores has purchased six crates of fresh strawberries.
The following table gives the estimated profits at each store when it is allocated different
number of boxes. Find the allocation to the stores so that the profits are maximized.
Stores
1
2
3
4
Number of
0
0
0
0
0
Boxes
1
4
2
6
2
2
6
4
8
3
3
7
6
8
4
4
7
8
8
4
5
7
9
8
4
6
7
10
8
4
Step 1: Allocate between store 1 and 2
Store 1
Store 2
0
1
2
3
4
5
6

0
2
4
6
8
9
10

0
0
0*
2
4
6
8
9
10

1
4
4*
6*
8*
10*
12*
10

2
6
6*
8*
10*
12*
14*

3
7
7
9
11
13

4
7
7
9
11

5
7
7
9

6
7
7

Step 2: Allocate between store (1+2) and 3


Store
1+2
Store 3

0
1
2
3
4
5
6

0
6
8
8
8
8
8

0
0+0

4
1+0
4
10*
12*
12
12
12

8
2+1
1+2
8
14*
16*
16

10
2+2
1+3
10
16*
18*

12
2+3
1+4
12
18*

14
2+4

0*
6*
8
8
8
8
8

6
2+0
1+1
6
12*
14*
14
14

14

Step 3: Allocate between store (1+2+3) and 4


Store
1+2+3
Store 4

0
0+0+0

6
0+0+1

10
1+0+1

12
1+0+2
2+0+1
1+1+1

16
2+1+2
1+2+2
2+2+1
1+3+1
16

18
2+2+2
1+3+2
2+3+1
1+4+1
18*

10

12

14
2+0+2
1+1+2
2+1+1
1+2+1
14

12

14

16

18*

13

15

17

10

14

16

10

14

10

So optimal allocation is
X1

X2

X3

X4

Profit

18

18

18

18

18

18

18

18

Das könnte Ihnen auch gefallen