Content deleted Content added
m Fixed reference links that were broken |
→Matrix chain multiplication: fix math italics |
||
(109 intermediate revisions by 81 users not shown) | |||
Line 1:
{{Short description|Problem optimization method}}
{{Distinguish|Dynamic programming language|Dynamic problem}}
{{bots|deny=OAbot}}<!-- To prevent re-addition of bogus pmc -->
[[File:Shortest path optimal substructure.svg|thumb|upright=0.8|'''Figure 1.''' Finding the shortest path in a graph using optimal substructure; a straight line indicates a single edge; a wavy line indicates a shortest path between the two vertices it connects (among other paths, not shown, sharing the same two vertices); the bold line is the overall shortest path from start to goal.]]
'''Dynamic programming''' is both a [[mathematical optimization]] method and
In both contexts it refers to simplifying a complicated problem by breaking it down into simpler sub-problems in a [[Recursion|recursive]] manner. While some decision problems cannot be taken apart this way, decisions that span several points in time do often break apart recursively. Likewise, in computer science, if a problem can be solved optimally by breaking it into sub-problems and then recursively finding the optimal solutions to the sub-problems, then it is said to have ''[[optimal substructure]]''.
If sub-problems can be nested recursively inside larger problems, so that dynamic programming methods are applicable, then there is a relation between the value of the larger problem and the values of the sub-problems.<ref name=":0">Cormen, T. H.; Leiserson, C. E.; Rivest, R. L.; Stein, C. (2001), Introduction to Algorithms (2nd ed.), MIT Press & McGraw–Hill, {{ISBN|0-262-03293-7}} . pp. 344.</ref> In the optimization literature this relationship is called the [[Bellman equation]].
Line 11 ⟶ 13:
=== Mathematical optimization ===
In terms of mathematical optimization, dynamic programming usually refers to simplifying a decision by breaking it down into a sequence of decision steps over time.
This is done by defining a sequence of '''value functions''' ''V''<sub>1</sub>, ''V''<sub>2</sub>, ..., ''V''<sub>''n''</sub> taking ''y'' as an argument representing the '''[[State variable|state]]''' of the system at times ''i'' from 1 to ''n''. The definition of ''V''<sub>''n''</sub>(''y'') is the value obtained in state ''y'' at the last time ''n''. The values ''V''<sub>''i''</sub> at earlier times ''i'' = ''n'' −1, ''n'' − 2, ..., 2, 1 can be found by working backwards, using a [[Recursion|recursive]] relationship called the [[Bellman equation]]. For ''i'' = 2, ..., ''n'', ''V''<sub>''i''−1</sub> at any state ''y'' is calculated from ''V''<sub>''i''</sub> by maximizing a simple function (usually the sum) of the gain from a decision at time ''i'' − 1 and the function ''V''<sub>''i''</sub> at the new state of the system if this decision is made Since ''V''<sub>''i''</sub> has already been calculated for the needed states, the above operation yields ''V''<sub>''i''−1</sub> for those states.
Finally, ''V''<sub>1</sub> at the initial state of the system is the value of the optimal solution. The optimal values of the decision variables can be recovered, one by one, by tracking back the calculations already performed.
=== Control theory ===
Line 18 ⟶ 32:
The solution to this problem is an optimal control law or policy <math>\mathbf{u}^{\ast} = h(\mathbf{x}(t), t)</math>, which produces an optimal trajectory <math>\mathbf{x}^{\ast}</math> and a [[cost-to-go function]] <math>J^{\ast}</math>. The latter obeys the fundamental equation of dynamic programming:
:<math>- J_{t}^{\ast} = \min_{\mathbf{u}} \left\{ f \left( \mathbf{x}(t), \mathbf{u}(t), t \right) + J_{x}^{\ast \mathsf{T}} \mathbf{g} \left( \mathbf{x}(t), \mathbf{u}(t), t \right) \right\}</math>
a [[partial differential equation]] known as the [[Hamilton–Jacobi–Bellman equation]], in which <math>J_{x}^{\ast} = \frac{\partial J^{\ast}}{\partial \mathbf{x}} = \left[ \frac{\partial J^{\ast}}{\partial x_{1}} ~~~~ \frac{\partial J^{\ast}}{\partial x_{2}} ~~~~ \dots ~~~~ \frac{\partial J^{\ast}}{\partial x_{n}} \right]^{\mathsf{T}}</math> and <math>J_{t}^{\ast} = \frac{\partial J^{\ast}}{\partial t}</math>. One finds
Alternatively, the continuous process can be approximated by a discrete system, which leads to a following recurrence relation analog to the Hamilton–Jacobi–Bellman equation:
:<math>J_{k}^{\ast} \left( \mathbf{x}_{n-k} \right) = \min_{\mathbf{u}_{n-k}} \left\{ \hat{f} \left( \mathbf{x}_{n-k}, \mathbf{u}_{n-k} \right) + J_{k-1}^{\ast} \left( \hat{\mathbf{g}} \left( \mathbf{x}_{n-k}, \mathbf{u}_{n-k} \right) \right) \right\}</math>
at the <math>k</math>-th stage of <math>n</math> equally spaced discrete time intervals, and where <math>\hat{f}</math> and <math>\hat{\mathbf{g}}</math> denote discrete approximations to <math>f</math> and <math>\mathbf{g}</math>. This functional equation is known as the [[Bellman equation]], which can be solved for an exact solution of the discrete approximation of the optimization equation.<ref>{{cite book |first=Donald E. |last=Kirk |title=Optimal Control Theory: An Introduction |___location=Englewood Cliffs, NJ |publisher=Prentice-Hall |year=1970 |isbn=978-0-13-638098-6 |pages=94–95 |url=https://books.google.com/books?id=fCh2SAtWIdwC&pg=PA94 }}</ref>
==== Example from economics: Ramsey's problem of optimal saving ====
{{See also|Ramsey–Cass–Koopmans model}}
In [[economics]], the objective is generally to maximize (rather than minimize) some dynamic [[social welfare function]]. In Ramsey's problem, this function relates amounts of consumption to levels of [[utility]]. Loosely speaking, the planner faces the trade-off between contemporaneous consumption and future consumption (via investment in [[Physical capital|capital stock]] that is used in production), known as [[intertemporal choice]]. Future consumption is discounted at a constant rate <math>\beta \in (0,1)</math>. A discrete approximation to the transition equation of capital is given by
:<math>k_{t+1} = \hat{g} \left( k_{t}, c_{t} \right) = f(k_{t}) - c_{t}</math>
where <math>c</math> is consumption, <math>k</math> is capital, and <math>f</math> is a [[production function]] satisfying the [[Inada conditions]]. An initial capital stock <math>k_{0} > 0</math> is assumed.
Line 68 ⟶ 82:
We see that it is optimal to consume a larger fraction of current wealth as one gets older, finally consuming all remaining wealth in period {{mvar|T}}, the last period of life.
=== Computer
There are two key attributes that a problem must have in order for dynamic programming to be applicable: [[optimal substructure]] and [[overlapping subproblem|overlapping sub-problem]]s. If a problem can be solved by combining optimal solutions to ''non-overlapping'' sub-problems, the strategy is called "[[Divide and conquer algorithm|divide and conquer]]" instead.<ref name=":0" /> This is why [[mergesort|merge sort]] and [[quicksort|quick sort]] are not classified as dynamic programming problems.
''Optimal substructure'' means that the solution to a given optimization problem can be obtained by the combination of optimal solutions to its sub-problems. Such optimal substructures are usually described by means of [[recursion]]. For example, given a graph ''G=(V,E)'', the shortest path ''p'' from a vertex ''u'' to a vertex ''v'' exhibits optimal substructure: take any intermediate vertex ''w'' on this shortest path ''p''. If ''p'' is truly the shortest path, then it can be split into sub-paths ''p<sub>1</sub>'' from ''u'' to ''w'' and ''p<sub>2</sub>'' from ''w'' to ''v'' such that these, in turn, are indeed the shortest paths between the corresponding vertices (by the simple cut-and-paste argument described in ''[[Introduction to Algorithms]]''). Hence, one can easily formulate the solution for finding shortest paths in a recursive manner, which is what the [[Bellman–Ford algorithm]] or the [[Floyd–Warshall algorithm]] does.
''Overlapping'' sub-problems means that the space of sub-problems must be small, that is, any recursive algorithm solving the problem should solve the same sub-problems over and over, rather than generating new sub-problems. For example, consider the recursive formulation for generating the Fibonacci
[[Image:Fibonacci dynamic programming.svg|thumb|108px|'''Figure 2.''' The subproblem graph for the Fibonacci sequence. The fact that it is not a [[tree structure|tree]] indicates overlapping subproblems.]]
This can be achieved in either of two ways:<ref>{{
* ''[[Top-down and bottom-up design|Top-down approach]]'': This is the direct fall-out of the recursive formulation of any problem. If the solution to any problem can be formulated recursively using the solution to its sub-problems, and if its sub-problems are overlapping, then one can easily [[memoize]] or store the solutions to the sub-problems in a table (often an [[Array (data structure)|array]] or [[Hash table|hashtable]] in practice). Whenever we attempt to solve a new sub-problem, we first check the table to see if it is already solved. If a solution has been recorded, we can use it directly, otherwise we solve the sub-problem and add its solution to the table.
* ''[[Top-down and bottom-up design|Bottom-up approach]]'': Once we formulate the solution to a problem recursively as in terms of its sub-problems, we can try reformulating the problem in a bottom-up fashion: try solving the sub-problems first and use their solutions to build-on and arrive at solutions to bigger sub-problems. This is also usually done in a tabular form by iteratively generating solutions to bigger and bigger sub-problems by using the solutions to small sub-problems. For example, if we already know the values of ''F''<sub>41</sub> and ''F''<sub>40</sub>, we can directly calculate the value of ''F''<sub>42</sub>.
Some [[programming language]]s can automatically [[memoization|memoize]] the result of a function call with a particular set of arguments, in order to speed up [[call-by-name]] evaluation (this mechanism is referred to as ''[[call-by-need]]''). Some languages make it possible portably (e.g. [[Scheme (programming language)|Scheme]], [[Common Lisp]], [[Perl]] or [[D (programming language)|D]]). Some languages have automatic [[memoization]] <!-- still not a typo for "memor-" --> built in, such as tabled [[Prolog]] and [[J (programming language)|J]], which supports memoization with the ''M.'' adverb.<ref>{{cite web|title=M. Memo|url=http://www.jsoftware.com/help/dictionary/dmcapdot.htm|work=J Vocabulary|publisher=J Software|
=== Bioinformatics ===
Dynamic programming is widely used in bioinformatics for
| last = Delisi | first = Charles
| date = July 1974
| doi = 10.1002/bip.1974.360130719
| issue = 7
| journal = Biopolymers
| pages = 1511–1512
| title = Cooperative phenomena in homopolymers: An alternative formulation of the partition function
| volume = 13}}</ref> and by Georgii Gurskii and Alexander Zasedatelev in the [[Soviet Union]].<ref>{{citation
| last1 = Gurskiĭ | first1 = G. V.
| last2 = Zasedatelev | first2 = A. S.
| date = September 1978
| issue = 5
| journal = Biofizika
| pages = 932–946
| pmid = 698271
| title = Precise relationships for calculating the binding of regulatory proteins and other lattice ligands in double-stranded polynucleotides
| volume = 23}}</ref> Recently these algorithms have become very popular in bioinformatics and [[computational biology]], particularly in the studies of [[nucleosome]] positioning and [[transcription factor]] binding.
== Examples:
=== Dijkstra's algorithm for the shortest path problem ===
From a dynamic programming point of view, [[Dijkstra's algorithm]] for the [[shortest path problem]] is a successive approximation scheme that solves the dynamic programming functional equation for the shortest path problem by the '''Reaching''' method.<ref name=sniedovich_06>{{Citation | last = Sniedovich | first = M. | title = Dijkstra's algorithm revisited: the dynamic programming connexion | journal = Journal of Control and Cybernetics | volume = 35 | issue = 3 | pages = 599–620 | year = 2006 | url = http://matwbn.icm.edu.pl/ksiazki/cc/cc35/cc3536.pdf | postscript = .}} [http://www.ifors.ms.unimelb.edu.au/tutorial/dijkstra_new/index.html Online version of the paper with interactive computational modules.]</ref><ref name=denardo_03>{{Citation | last = Denardo | first = E.V. | title = Dynamic Programming: Models and Applications | publisher = [[Dover Publications]] | ___location = Mineola, NY | year = 2003 | isbn = 978-0-486-42810-9}}</ref><ref name=sniedovich_10>{{Citation | last = Sniedovich | first = M. | title = Dynamic Programming: Foundations and Principles | publisher = [[Taylor & Francis]] | year = 2010 | isbn = 978-0-8247-4099-3 }}</ref>
In fact, Dijkstra's explanation of the logic behind the algorithm,<ref>{{
{{
'''Problem 2.''' Find the path of minimum total length between two given nodes <math>P</math> and <math>Q</math>.
Line 102 ⟶ 133:
=== Fibonacci sequence ===
Using dynamic programming in the calculation of the ''n''th member of the [[Fibonacci sequence]] improves its performance greatly. Here is a naïve implementation, based directly on the mathematical definition:
Notice that if we call, say, <code>fib(5)</code>, we produce a call tree that calls the function on the same value many different times:
Line 121 ⟶ 151:
Now, suppose we have a simple [[Associative array|map]] object, ''m'', which maps each value of <code>fib</code> that has already been calculated to its result, and we modify our function to use it and update it. The resulting function requires only [[Big-O notation|O]](''n'') time instead of exponential time (but requires [[Big-O notation|O]](''n'') space):
This technique of saving values that have already been calculated is called ''[[memoization]]''; <!-- Yes, memoization, not memorization. Not a typo. --> this is the top-down approach, since we first break the problem into subproblems and then calculate and store values.
Line 131 ⟶ 161:
In the '''bottom-up''' approach, we calculate the smaller values of <code>fib</code> first, then build larger values from them. This method also uses O(''n'') time since it contains a loop that repeats n − 1 times, but it only takes constant (O(1)) space, in contrast to the top-down approach which requires O(''n'') space to store the map.
'''return''' currentFib
In both examples, we only calculate <code>fib(2)</code> one time, and then use it to calculate both <code>fib(4)</code> and <code>fib(3)</code>, instead of computing it every time either of them is evaluated.
=== A type of balanced 0–1 matrix ===
{{unreferenced section|date=May 2013}}
Consider the problem of assigning values, either zero or one, to the positions of an {{math|<var>n</var> × <var>n</var>}} matrix, with {{math|<var>n</var>}} even, so that each row and each column contains exactly {{math|<var>n</var> / 2}} zeros and {{math|<var>n</var> / 2}} ones. We ask how many different assignments there are for a given
:<math>\begin{bmatrix}
Line 170 ⟶ 198:
0 & 1 & 1 & 0 \\
1 & 0 & 0 & 1
\end{bmatrix} \text{ and } \begin{bmatrix}
1 & 1 & 0 & 0 \\
1 & 1 & 0 & 0 \\
0 & 0 & 1 & 1 \\
0 & 0 & 1 & 1
\end{bmatrix}.</math>
There are at least three possible approaches: [[Brute-force search|brute force]], [[backtracking]], and dynamic programming.
Brute force consists of checking all assignments of zeros and ones and counting those that have balanced rows and columns ({{math|<var>n</var> / 2}} zeros and {{math|<var>n</var> / 2}} ones). As there are <math>2^{n^2}</math> possible assignments and <math>\tbinom{n}{n/2}^n</math>
Backtracking for this problem consists of choosing some order of the matrix elements and recursively placing ones or zeros, while checking that in every row and column the number of elements that have not been assigned plus the number of ones or zeros are both at least {{math|<var>n</var> / 2}}. While more sophisticated than brute force, this approach will visit every solution once, making it impractical for {{math|<var>n</var>}} larger than six, since the number of solutions is already
Dynamic programming makes it possible to count the number of solutions without visiting them all. Imagine backtracking values for the first row – what information would we require about the remaining rows, in order to be able to accurately count the solutions obtained for each first row value? We consider {{math|<var>k</var> × <var>n</var>}} boards, where {{math|1 ≤ <var>k</var> ≤ <var>n</var>}}, whose
For example, in the first two boards shown above the sequences of vectors would be
Line 199 ⟶ 232:
The number of solutions {{OEIS|id=A058527}} is
:
Links to the MAPLE implementation of the dynamic programming approach may be found among the [[#External links|external links]].
Line 222 ⟶ 255:
|-
! 1
| – || – ||
|-
!width="15"| !! style="width:15px;"|1 !! style="width:15px;"|2 !! style="width:15px;"|3 !! style="width:15px;"|4 !! style="width:15px;"|5
Line 283 ⟶ 316:
: <math>q(i,j)=\begin{cases} \infty & j < 1 \text{ or }j > n \\ c(i, j) & i = 1 \\ \min(q(i-1, j-1), q(i-1, j), q(i-1, j+1)) + c(i,j) & \text{otherwise.}\end{cases}</math>
The first line of this equation deals with a board modeled as squares indexed on <code>1</code> at the lowest bound and <code>n</code> at the highest bound. The second line specifies what happens at the
'''function''' minCost(i, j)
Line 295 ⟶ 328:
This function only computes the path cost, not the actual path. We discuss the actual path below. This, like the Fibonacci-numbers example, is horribly slow because it too exhibits the '''overlapping sub-problems''' attribute. That is, it recomputes the same path costs over and over. However, we can compute it much faster in a bottom-up fashion if we store path costs in a two-dimensional array <code>q[i, j]</code> rather than using a function. This avoids recomputation; all the values needed for array <code>q[i, j]</code> are computed ahead of time only once. Precomputed values for <code>(i,j)</code> are simply looked up whenever needed.
We also need to know what the actual shortest path is. To do this, we use another array <code>p[i, j]</code>; a ''predecessor array''. This array records the path to any square <code>s</code>. The predecessor of <code>s</code> is modeled as an offset relative to the index (in <code>q[i, j]</code>) of the precomputed path cost of <code>s</code>. To reconstruct the complete path, we lookup the predecessor of <code>s</code>, then the predecessor of that square, then the predecessor of that square, and so on recursively, until we reach the starting square. Consider the following
Now the rest is a simple matter of finding the minimum and printing it.
=== Sequence alignment ===
Line 348 ⟶ 381:
=== Tower of Hanoi puzzle ===
[[Image:Tower of Hanoi.jpeg|
[[Image:Tower of Hanoi 4.gif|
The '''[[Tower of Hanoi]]''' or '''Towers of [[Hanoi]]''' is a [[mathematical game]] or [[puzzle]]. It consists of three rods, and a number of disks of different sizes which can slide onto any rod. The puzzle starts with the disks in a neat stack in ascending order of size on one rod, the smallest at the top, thus making a conical shape.
Line 368 ⟶ 401:
For n=1 the problem is trivial, namely S(1,h,t) = "move a disk from rod h to rod t" (there is only one disk left).
The number of moves required by this solution is 2<sup>''n''</sup> − 1. If the objective is to '''maximize''' the number of moves (without cycling) then the dynamic programming [[Bellman equation|functional equation]] is slightly more complicated and 3<sup>''n''</sup> − 1 moves are required.<ref>{{Citation |author=Moshe Sniedovich |title= OR/MS Games: 2. The Towers of Hanoi Problem |journal=INFORMS Transactions on Education |volume=3 |issue=1 |year=2002 |pages=34–51 |
=== Egg dropping puzzle ===
:Suppose that we wish to know which stories in a 36-story building are safe to drop eggs from, and which will cause the eggs to break on landing (using [[U.S. English]] terminology, in which the first floor is at ground level). We make a few assumptions:
Line 394 ⟶ 427:
: ''W''(''n'',''k'') = minimum number of trials required to identify the value of the critical floor under the worst-case scenario given that the process is in state ''s'' = (''n'',''k'').
Then it can be shown that<ref name="sniedovich_03">
: ''W''(''n'',''k'') = 1 + min{max(''W''(''n'' − 1, ''x'' − 1), ''W''(''n'',''k'' − ''x'')): ''x'' = 1, 2, ..., ''k'' }
Line 427 ⟶ 460:
But the recurrence relation can in fact be solved, giving <math>f(t,n) = \sum_{i=0}^{n}{ \binom{t}{i} }</math>, which can be computed in <math>O(n)</math> time using the identity <math>\binom{t}{i+1} = \binom{t}{i} \frac{t-i}{i+1}</math> for all <math>i \geq 0</math>.
Since <math>f(t,n) \leq f(t+1,n)</math> for all <math>t \geq 0</math>, we can binary search on <math>t</math> to find <math>x</math>, giving an <math>O( n \log k )</math> algorithm.<ref>{{Citation |author=Dean Connable Wills |title=Connections between combinatorics of permutations and algorithms and geometry |url=https://ir.library.oregonstate.edu/xmlui/handle/1957/11929?show=full}}</ref>
=== Matrix chain multiplication ===
Line 437 ⟶ 469:
This is such a long example that it might be better to make it its own article.-->
Matrix chain multiplication is a well-known example that demonstrates utility of dynamic programming. For example, engineering applications often have to multiply a chain of matrices. It is not surprising to find matrices of large dimensions, for example 100×100. Therefore, our task is to multiply matrices {{tmath|A_1, A_2, .... A_n}}.
: {{math|((''A''<sub>1</sub> × ''A''<sub>2</sub>) × ''A''<sub>3</sub>) × ... ''A<sub>n</sub>''}}
: {{math|''A''<sub>1</sub>×(((''A''<sub>2</sub>
: {{math|(''A''<sub>1</sub> × ''A''<sub>2</sub>) × (''A''<sub>3</sub> × ... ''A<sub>n</sub>'')}}
and so on. There are numerous ways to multiply this chain of matrices. They will all produce the same final result, however they will take more or less time to compute, based on which particular matrices are multiplied. If matrix A has dimensions m×n and matrix B has dimensions n×q, then matrix C=A×B will have dimensions m×q, and will require m*n*q scalar multiplications (using a simplistic [[matrix multiplication algorithm]] for purposes of illustration).
For example, let us multiply matrices A, B and C. Let us assume that their dimensions are m×n, n×p, and p×s, respectively. Matrix A×B×C will be of size m×s and can be calculated in two ways shown below:
Line 452 ⟶ 484:
# (A×B)×C This order of matrix multiplication will require mnp + mps scalar calculations.
Let us assume that m = 10, n = 100, p = 10 and s = 1000. So, the first way to multiply the chain will require 1,000,000 + 1,000,000 calculations. The second way will require only 10,000 + 100,000 calculations. Obviously, the second way is faster, and we should multiply the matrices using that arrangement of parenthesis.
Therefore, our conclusion is that the order of parenthesis matters, and that our task is to find the optimal order of parenthesis.
Line 472 ⟶ 504:
This formula can be coded as shown below, where input parameter "chain" is the chain of matrices, i.e. {{tmath|A_1, A_2, ... A_n}}:
So far, we have calculated values for all possible {{math|''m''[''i'', ''j'']}}, the minimum number of calculations to multiply a chain from matrix ''i'' to matrix ''j'', and we have recorded the corresponding "split point"{{math|''s''[''i'', ''j'']}}. For example, if we are multiplying chain {{math|''A''<sub>1</sub>
This algorithm will produce "tables" ''m''[, ] and ''s''[, ] that will have entries for all possible values of i and j. The final solution for the entire chain is m[1, n], with corresponding split at s[1, n]. Unraveling the solution will be recursive, starting from the top and continuing until we reach the base case, i.e. multiplication of single matrices.
Line 492 ⟶ 524:
Therefore, the next step is to actually split the chain, i.e. to place the parenthesis where they (optimally) belong. For this purpose we could use the following algorithm:
print "A"i
print "("
PrintOptimalParenthesis(s, i, s[i, j]) PrintOptimalParenthesis(s, s[i, j] + 1, j) print ")"
Of course, this algorithm is not useful for actual multiplication. This algorithm is just a user-friendly way to see what the result looks like.
Line 529 ⟶ 564:
</syntaxhighlight>
== History of the name ==
The term ''dynamic programming'' was originally used in the 1940s by [[Richard Bellman]] to describe the process of solving problems where one needs to find the best decisions one after another. By 1953, he refined this to the modern meaning, referring specifically to nesting smaller decision problems inside larger decisions,<ref>Stuart Dreyfus. [https://web.archive.org/web/20050110161049/http://www.wu-wien.ac.at/usr/h99c/h9951826/bellman_dynprog.pdf "Richard Bellman on the birth of Dynamical Programming"].</ref> and the field was thereafter recognized by the [[IEEE]] as a [[systems analysis]] and [[engineering]] topic. Bellman's contribution is remembered in the name of the [[Bellman equation]], a central result of dynamic programming which restates an optimization problem in [[Recursion (computer science)|recursive]] form.
Bellman explains the reasoning behind the term ''dynamic programming'' in his autobiography, ''Eye of the Hurricane: An Autobiography'':
{{Blockquote
|text=I spent the Fall quarter (of 1950) at [[RAND Corporation|RAND]]. My first task was to find a name for multistage decision processes. An interesting question is, "Where did the name, dynamic programming, come from?" The 1950s were not good years for mathematical research. We had a very interesting gentleman in Washington named [[Charles Erwin Wilson|Wilson]]. He was Secretary of Defense, and he actually had a pathological fear and hatred of the word "research".
|author=Richard Bellman
|source=''Eye of the Hurricane: An Autobiography'' (1984, page 159)
}}
The word ''dynamic'' was chosen by Bellman to capture the time-varying aspect of the problems, and because it sounded impressive.<ref name="Eddy">{{cite journal |last=Eddy |first=S. R. |
The above explanation of the origin of the term
== See also ==
{{Portal|Systems science|Mathematics}}
<!-- alphabetical order please [[WP:SEEALSO]] -->
<!-- please add a short description [[WP:SEEALSO]], via {{subst:AnnotatedListOfLinks}} or {{Annotated link}} -->
{{div col|colwidth=30em|small=}}
* {{Annotated link |Convexity in economics}}
* {{Annotated link |Greedy algorithm}}
* {{Annotated link |Non-convexity (economics)}}
* {{Annotated link |Stochastic programming}}
* {{Annotated link |Stochastic dynamic programming}}
* {{Annotated link |Reinforcement learning}}
{{div col end}}
<!-- alphabetical order please [[WP:SEEALSO]] -->
== References ==
{{Reflist
== Further reading ==
*{{citation|last1=Adda|first1=Jerome|last2=Cooper|first2=Russell|year=2003|url=https://mitpress.mit.edu/books/dynamic-economics|title=Dynamic Economics|publisher=MIT Press|isbn=9780262012010}}. An accessible introduction to dynamic programming in economics. [https://sites.google.com/site/coopereconomics/matlab-programs MATLAB code for the book] {{Webarchive|url=https://web.archive.org/web/20201009085820/https://sites.google.com/site/coopereconomics/matlab-programs |date=2020-10-09 }}.
*{{citation|first=Richard|last=Bellman|
*{{citation|first=Richard|last=Bellman|
*{{citation|last1=Cormen|first1=Thomas H.|author1-link=Thomas H. Cormen|last2=Leiserson| first2=Charles E.| author2-link=Charles E. Leiserson|last3=Rivest|first3=Ronald L.|author3-link=Ronald L. Rivest|last4=Stein|first4=Clifford|author4-link=Clifford Stein|year=2001| title=Introduction to Algorithms|edition=2nd|publisher=MIT Press & McGraw–Hill|isbn=978-0-262-03293-3|title-link=Introduction to Algorithms}}. Especially pp. 323–69.
*{{citation|first1=Stuart E.|last1=Dreyfus|first2=Averill M.|last2=Law|year=1977|title=The Art and Theory of Dynamic Programming|publisher=Academic Press|isbn=978-0-12-221860-6}}.
*{{citation| last1=Giegerich| first1=R.|last2=Meyer| first2=C.|last3=Steffen| first3=P.| year=2004| url=http://bibiserv.techfak.uni-bielefeld.de/adp/ps/GIE-MEY-STE-2004.pdf|title=A Discipline of Dynamic Programming over Sequence Data|journal=Science of Computer Programming|volume=51|pages=215–263| issue=3|doi=10.1016/j.scico.2003.12.005|doi-access=free}}.
*{{citation|first=Sean| last=Meyn| url=https://netfiles.uiuc.edu/meyn/www/spm_files/CTCN/CTCN.html|title=Control Techniques for Complex Networks| publisher=Cambridge University Press| year=2007|isbn=978-0-521-88441-9|url-status=dead|
*{{cite journal | last1 = Sritharan | first1 = S. S. | year = 1991 | title = Dynamic Programming of the Navier-Stokes Equations
*{{citation|last1=Stokey|first1=Nancy|author1-link=Nancy Stokey|last2=Lucas|first2=Robert E.| author2-link=Robert E. Lucas|last3=Prescott|first3=Edward|author3-link=Edward Prescott|year=1989| title=Recursive Methods in Economic Dynamics|publisher=Harvard Univ. Press|isbn=978-0-674-75096-8}}.
== External links ==
* King, Ian, 2002 (1987), "[http://researchspace.auckland.ac.nz/bitstream/handle/2292/190/230.pdf A Simple Introduction to Dynamic Programming in Macroeconomic Models.]" An introduction to dynamic programming as an important tool in economic theory.
{{Optimization algorithms|combinatorial|state=expanded}}
{{Parsers}}
{{Algorithmic paradigms}}
{{Authority control}}
|