mathematical dynamic programming pdf