next up previous contents
Next: Dynamic Programming Objects: Up: An Experiment in Object Previous: Background Reading and Study:

   
Dynamic Programming Using Typeless Graphs:

We will now use our typeless graph class developed in to implement a standard dynamic programming algorithm. The standard Dynamic Programming algorithm is an iterative technique for minimizing the cost of moving from a chosen start to a chosen goal node in a graph of N nodes. If we label all of the nodes in the graph with say the lexicographic ordering, q  $ \leq$  N, the standard Dynamic Programming algorithm may be stated as follows: if Jq denotes the cost of moving from node q to the goal, then the optimal node costs satisfy the equation:


Jq = $\displaystyle \inf_{i \in S(q)}^{}$(Tq $\scriptstyle \rightarrow$ i + Ji)  

where S(q) is the set of successors to a given node and Tq $ \rightarrow$ i denotes the cost of moving from node q to the successor node i $ \in$ S(q). This equation is usually solved via an iterative procedure:


Jqt + 1 = $\displaystyle \inf_{i \in S(q)}^{}$(Tq $\scriptstyle \rightarrow$ i + Jit)  

with the initial goal costs Jq set in some fashion.



 
next up previous contents
Next: Dynamic Programming Objects: Up: An Experiment in Object Previous: Background Reading and Study:
Jim Peterson
1999-04-13