Recursion and Dynamic Programming