Introduction to Dynamic Programming