Dynamic programming_0
Dynamic programming_0
Operations Analysis II
IE 322
Dynamic Programming
1
9/18/2013
Forward Strategy
1‐ Divide the original problem into sub problems
called stages.
2‐Solve the first stage of the problem for all possible
conditions or states.
3‐Working forward from that first stage, solve each
intermediate stage.
4‐Obtain the optimal solution for the original
problem by solving all stages sequentially.
2
9/18/2013
Backward Strategy
1‐ Divide the original problem into sub problems
called stages.
2‐Solve the last stage of the problem for all possible
conditions or states.
3‐Working backward from that last stage, solve
each intermediate stage.
4‐Obtain the optimal solution for the original
problem by solving all stages sequentially.
3
9/18/2013
4
9/18/2013
Forward Equations
To define the recursive equation for this manufacturing
sequence problem, define ft(i) be the shortest time from
node 1 to node i at stage t.
Define cji as the time from node j to node i.
Then, ft is computed from ft‐1 using the recursive formula:
ft(i) =min {cji + ft‐1(j)}
f0(1) =0
In dynamic programming, ‘i’ is referred to as the state of
the system at stage t.
In general, a state is the information that is needed at
any stage to make an optimal decision.
Backward Equations
To define the recursive equation for this manufacturing
sequence problem, define ft(i) be the shortest time from
node 7 to node i at stage t.
Define cij as the time from node j to node i.
Then, ft is computed from ft‐1 using the recursive formula:
ft(i) =min {cij + ft+1(i)}
f4(7) =0
In dynamic programming, ‘i’ is referred to as the state of
the system at stage t.
In general, a state is the information that is needed at
any stage to make an optimal decision.
5
9/18/2013
The starting nodes of the current stage represent the states of the
previous stage.
The set of starting nodes in the first stage includes only the source node (s)
The set of arrival nodes in the last stage includes only the sink node (t)
6
9/18/2013
7
9/18/2013
8
9/18/2013
9
9/18/2013
10
9/18/2013
11
9/18/2013
12
9/18/2013
13
9/18/2013
3
1 8
1 6 6
4 2
10 t
4 1
s
15
3 10 4
7
2
5 11
9
14