Eastern Mediterranean University Department Of Industrial Engineering Deterministic Dynamic Programming presented by: Ziad El Masri Supervisor: Prof. Dr. Sahand Daneshvar
Introduction Dynamic programming (DP) determines the optimum solution to an n-variable problem by decomposing it into n stages with each stage comprising a single-variable sub problem. The main contribution of DP is the principal of optimality.
Recursive nature of computations in DP Computations in DP are done recursively, in the sense that the optimum solution of one sub problem is used as an input to the next sub problem. The sub problems are normally linked together by some common constraints. As we move from one sub problem to the next, we must account for the feasibility of these constraints.
Recursive nature of computations in DP To solve the problem by DP, we first decompose it into stages. The vertical lines in the figure delineate the three stages of the problem.
Recursive nature of computations in DP Next, we carry out the computations for each stage separately. Stage 1 Stage 2 Stage 3
Recursive nature of computations in DP The general idea is to compute the shortest distances to all the terminal nodes of a stage and then use these distances as input data to the immediately succeeding stage. Considering the nodes associated with stage 1, we can see that nodes 2,3 and 4 are each connected to the starting node 1 by a single arc (see the previous figure).
Recursive nature of computations in DP Stage 1 summary results: Shortest distance to node 2 = 7 miles (from node 1) Shortest distance to node 3 = 8 miles (from node 1) Shortest distance to node 4 = 5 miles (from node 1)
Next we move to stage 2 Recursive nature of computations in DP Next we move to stage 2 = min + = min = 12 i = 1,2,3 = min + = min = 17 i = 3,4 Stage 2 summary results: Shortest distance to node 5 = 12 miles (from node 4) Shortest distance to node 6 = 17 miles (from node 3) Shortest distance to node 5 Shortest distance to node i Distance from node i to node =19 8+8=16 5+7=12 Shortest distance to node 6 Shortest distance to node i Distance from node i to node 6 8+9= =18
Recursive nature of computations in DP The last step is to consider stage 3 = min = 21 Stage 3 summary results: Shortest distance to node 7 = 21 miles (from node 5) The optimum route is defined as Shortest distance to node = =
The DP recursive computations can be expressed mathematically
Forward and Backward Recursion
Backward Recursion Stage 3 Optimum solution
Backward Recursion Stage 2 Optimum solution = = = = = 19165
Backward Recursion Stage 1 Optimum solution = = = The optimum route is defined as
Cargo-Loading Model