Dynamic Programming in Economics