Dynamic Programming Framework