Dynamic Programming Flashcards
what is the general idea of DP
Divide a problem into sub problems, solve sub problems independently, and use relations between the sub problems to fidn a solution to the original problem
what is the relation between shortest path and DP?
They are strongly related. We can regard each DP problem as a shortest path problem in an acyclic network.
what is the difficulty with DP
Formulating problems so that they mimic shortest path problems
advantage of DP?
All arcs and nodes do not need ot be stored explicitly.
What do we requrie to be able ot use DP?=
THe problem must have a dynamic structure where we can divide the problem into a number of sequential “stages”. We regard it as a case qhere we need to make a decision at each stage.
The stages, what are they?
Depends on the application. Typically it is related to time periods.
How are sub problems defined?
We define a subproblem by considering one possible state in a stage. So, we define all subproblems (from a stage) as resulting from the various states we can achieve by our decisions.
What do we clal the optimal decision?
A control.
What do we call variables with optimal decisions?
Control variables
what is the relationship between states and stages? Broadly speaking
In a stage and state, a decision will make a new state in the next stage.
what is the computation we make in each node?
To satisfy the Bellman equation.
y_j = min [i:(i,j) in B] {y_i + c_ij}, j=2, …, n
this means: Keeping j fixed (but for all j) we select y_j to be the smallest value we find from y_i + c_ij whne we consider all possible values of i, where the arc (i,j) is in the set of arcs.
c_ij defines the cost on the arc.
y_i defines the “shortest path from source to i”.
elaborate on what the Bellman equation does
y_j = min [i:(i,j) in B] {y_i + c_ij}, j=2, …, n
this means: Keeping j fixed (but for all j) we select y_j to be the smallest value we find from y_i + c_ij whne we consider all possible values of i, where the arc (i,j) is in the set of arcs.
c_ij defines the cost on the arc.
y_i defines the “shortest path from source to i”.
At some specific node j, we compute its “value” by considering all possible combinations of 1-arc moves in combination with the optimal value on the other side of those 1-arc moves.
When can we solve all Bellman equations using a systemaic approach?
When there are no cycles
What is DP regarded as?
DP can be considered as a systematic approach to solving the Bellmann’s
what is the principle of optimality?
Given the current state, the optimal decision for each of the remaining stages must not depend on previously reached states of previously chosen decisions.