what is dynamic programming

1 year ago 74
Nature

Dynamic programming is a mathematical optimization method and an algorithmic paradigm that was developed by Richard Bellman in the 1950s and has found applications in numerous fields, from aerospace engineering to economics. It is mainly an optimization over plain recursion, where a recursive solution that has repeated calls for the same inputs can be optimized using dynamic programming. The idea is to break down a problem into subproblems, solve them from the bottom up, and store the results of subproblems so that they do not have to be recomputed when needed later. Dynamic programming is used when a problem can be broken down into smaller subproblems that have overlapping subproblems, and the computed values are stored, thus reducing the need for repeated calculations and saving time and providing faster solutions.

Dynamic programming involves defining a sequence of value functions that take the state of the system at times i from 1 to n as an argument. The definition of the last value function in the sequence, Vn(y), is the value obtained in state y at the last time n. The technique takes many forms when it comes to implementation, and optimal techniques rely on data storage and reuse to increase algorithm efficiency. Dynamic programming is mostly applied to recursive algorithms, but not all problems that use recursion can use dynamic programming. Unless there is a presence of overlapping subproblems, a recursion can only reach the solution using a divide and conquer approach.