Professional Documents
Culture Documents
DD Unit 5. Slides
DD Unit 5. Slides
K S Deepika
Department of MBA
Syllabus
Deterministic Programming
- Shortest path
- Knapsack
- equipment replacement
- capital budgeting problem.
Investment problems
Knapsack problem
Replacement problems
LPP, …
Dynamic Programming
• JavaScript
• Python
• Ruby
• PHP
• Lua
• Perl
How does it work?
Circles: nodes
Lines: decisions
Dynamic Programming Example 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 been collecting the data regarding
sales and salesmen in each area over a number of past
years. The information is summarised in the table. For the
next year, the firm has only 9 salesmen and the problem is
to allocate the salesmen to three different zones so that
the total sales are maximum.
Dynamic Programming Example 1
Profit in thousand
rupees
No. of
salesmen Zone 1 Zone 2 Zone 3
0 30 35 40
1 45 45 50
2 60 50 60
3 70 65 70
4 80 70 80
5 90 80 95
6 100 90 100
7 105 100 110
8 100 100 110
9 90 100 110
Dynamic Programming Example 1
Sub problems
Stage 1: Zone 1
Stage 2: Zone 1 + Zone 2
Stage 3: Zone 1+ Zone 2 + Zone 3
Dynamic Programming Example 1
Dynamic Programming Example 1
Dynamic Programming Example 1
Dynamic Programming Example 1
Dynamic Programming Example 2
Estimated profits
No. of boxes Store 1 Store 2 Store 3 Store 4
0 0 0 0 0
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
Equivalence of LP and DP solutions
Formulation of LP
Handling stochasticity in DP and LP
K S Deepika
Department of MBA
deepikaks@pes.edu