# Bellman equation

A Bellman equation, named after Richard E. Bellman, is a necessary condition for optimality associated with the mathematical optimization method known as dynamic programming.[1] It writes the "value" of a decision problem at a certain point in time in terms of the payoff from some initial choices and the "value" of the remaining decision problem that results from those initial choices.[citation needed] This breaks a dynamic optimization problem into a sequence of simpler subproblems, as Bellman's “principle of optimality” prescribes.[2]

The Bellman equation was first applied to engineering control theory and to other topics in applied mathematics, and subsequently became an important tool in economic theory; though the basic concepts of dynamic programming are prefigured in John von Neumann and Oskar Morgenstern's Theory of Games and Economic Behavior and Abraham Wald's sequential analysis.[citation needed]

Almost any problem that can be solved using optimal control theory can also be solved by analyzing the appropriate Bellman equation.[why?][further explanation needed] However, the term 'Bellman equation' usually refers to the dynamic programming equation associated with discrete-time optimization problems.[3] In continuous-time optimization problems, the analogous equation is a partial differential equation that is usually called the Hamilton–Jacobi–Bellman equation.[4][5]

## Analytical concepts in dynamic programming

To understand the Bellman equation, several underlying concepts must be understood. First, any optimization problem has some objective: minimizing travel time, minimizing cost, maximizing profits, maximizing utility, etc. The mathematical function that describes this objective is called the objective function.

Dynamic programming breaks a multi-period planning problem into simpler steps at different points in time. Therefore, it requires keeping track of how the decision situation is evolving over time. The information about the current situation that is needed to make a correct decision is called the "state".[6][7] For example, to decide how much to consume and spend at each point in time, people would need to know (among other things) their initial wealth. Therefore, wealth ${\displaystyle (W)}$  would be one of their state variables, but there would probably be others.

The variables chosen at any given point in time are often called the control variables. For example, given their current wealth, people might decide how much to consume now. Choosing the control variables now may be equivalent to choosing the next state; more generally, the next state is affected by other factors in addition to the current control. For example, in the simplest case, today's wealth (the state) and consumption (the control) might exactly determine tomorrow's wealth (the new state), though typically other factors will affect tomorrow's wealth too.

The dynamic programming approach describes the optimal plan by finding a rule that tells what the controls should be, given any possible value of the state. For example, if consumption (c) depends only on wealth (W), we would seek a rule ${\displaystyle c(W)}$  that gives consumption as a function of wealth. Such a rule, determining the controls as a function of the states, is called a policy function (See Bellman, 1957, Ch. III.2).[6]

Finally, by definition, the optimal decision rule is the one that achieves the best possible value of the objective. For example, if someone chooses consumption, given wealth, in order to maximize happiness (assuming happiness H can be represented by a mathematical function, such as a utility function and is something defined by wealth), then each level of wealth will be associated with some highest possible level of happiness, ${\displaystyle H(W)}$ . The best possible value of the objective, written as a function of the state, is called the value function.

Richard Bellman showed that a dynamic optimization problem in discrete time can be stated in a recursive, step-by-step form known as backward induction by writing down the relationship between the value function in one period and the value function in the next period. The relationship between these two value functions is called the "Bellman equation". In this approach, the optimal policy in the last time period is specified in advance as a function of the state variable's value at that time, and the resulting optimal value of the objective function is thus expressed in terms of that value of the state variable. Next, the next-to-last period's optimization involves maximizing the sum of that period's period-specific objective function and the optimal value of the future objective function, giving that period's optimal policy contingent upon the value of the state variable as of the next-to-last period decision. This logic continues recursively back in time, until the first period decision rule is derived, as a function of the initial state variable value, by optimizing the sum of the first-period-specific objective function and the value of the second period's value function, which gives the value for all the future periods. Thus, each period's decision is made by explicitly acknowledging that all future decisions will be optimally made.

## Derivation

### A dynamic decision problem

Let the state at time ${\displaystyle t}$  be ${\displaystyle x_{t}}$ . For a decision that begins at time 0, we take as given the initial state ${\displaystyle x_{0}}$ . At any time, the set of possible actions depends on the current state; we can write this as ${\displaystyle a_{t}\in \Gamma (x_{t})}$ , where the action ${\displaystyle a_{t}}$  represents one or more control variables. We also assume that the state changes from ${\displaystyle x}$  to a new state ${\displaystyle T(x,a)}$  when action ${\displaystyle a}$  is taken, and that the current payoff from taking action ${\displaystyle a}$  in state ${\displaystyle x}$  is ${\displaystyle F(x,a)}$ . Finally, we assume impatience, represented by a discount factor ${\displaystyle 0<\beta <1}$ .

Under these assumptions, an infinite-horizon decision problem takes the following form:

${\displaystyle V(x_{0})\;=\;\max _{\left\{a_{t}\right\}_{t=0}^{\infty }}\sum _{t=0}^{\infty }\beta ^{t}F(x_{t},a_{t}),}$

subject to the constraints

${\displaystyle a_{t}\in \Gamma (x_{t}),\;x_{t+1}=T(x_{t},a_{t}),\;\forall t=0,1,2,\dots }$

Notice that we have defined notation ${\displaystyle V(x_{0})}$  to denote the optimal value that can be obtained by maximizing this objective function subject to the assumed constraints. This function is the value function. It is a function of the initial state variable ${\displaystyle x_{0}}$ , since the best value obtainable depends on the initial situation.

### Bellman's Principle of Optimality

The dynamic programming method breaks this decision problem into smaller subproblems. Richard Bellman's principle of optimality describes how to do this:

Principle of Optimality: An optimal policy has the property that whatever the initial state and initial decision are, the remaining decisions must constitute an optimal policy with regard to the state resulting from the first decision. (See Bellman, 1957, Chap. III.3.)[6][7][8]

In computer science, a problem that can be broken apart like this is said to have optimal substructure. In the context of dynamic game theory, this principle is analogous to the concept of subgame perfect equilibrium, although what constitutes an optimal policy in this case is conditioned on the decision-maker's opponents choosing similarly optimal policies from their points of view.

As suggested by the principle of optimality, we will consider the first decision separately, setting aside all future decisions (we will start afresh from time 1 with the new state ${\displaystyle x_{1}}$ ). Collecting the future decisions in brackets on the right, the previous problem is equivalent to:[clarification needed]

${\displaystyle \max _{a_{0}}\left\{F(x_{0},a_{0})+\beta \left[\max _{\left\{a_{t}\right\}_{t=1}^{\infty }}\sum _{t=1}^{\infty }\beta ^{t-1}F(x_{t},a_{t}):a_{t}\in \Gamma (x_{t}),\;x_{t+1}=T(x_{t},a_{t}),\;\forall t\geq 1\right]\right\}}$

subject to the constraints

${\displaystyle a_{0}\in \Gamma (x_{0}),\;x_{1}=T(x_{0},a_{0}).}$

Here we are choosing ${\displaystyle a_{0}}$ , knowing that our choice will cause the time 1 state to be ${\displaystyle x_{1}=T(x_{0},a_{0})}$ . That new state will then affect the decision problem from time 1 on. The whole future decision problem appears inside the square brackets on the right.[clarification needed][further explanation needed]

### The Bellman equation

So far it seems we have only made the problem uglier by separating today's decision from future decisions. But we can simplify by noticing that what is inside the square brackets on the right is the value of the time 1 decision problem, starting from state ${\displaystyle x_{1}=T(x_{0},a_{0})}$ .

Therefore, we can rewrite the problem as a recursive definition of the value function:

${\displaystyle V(x_{0})=\max _{a_{0}}\{F(x_{0},a_{0})+\beta V(x_{1})\}}$ , subject to the constraints: ${\displaystyle a_{0}\in \Gamma (x_{0}),\;x_{1}=T(x_{0},a_{0}).}$

This is the Bellman equation. It can be simplified even further if we drop time subscripts and plug in the value of the next state:

${\displaystyle V(x)=\max _{a\in \Gamma (x)}\{F(x,a)+\beta V(T(x,a))\}.}$

The Bellman equation is classified as a functional equation, because solving it means finding the unknown function V, which is the value function. Recall that the value function describes the best possible value of the objective, as a function of the state x. By calculating the value function, we will also find the function a(x) that describes the optimal action as a function of the state; this is called the policy function.

### In a stochastic problem

In the deterministic setting, other techniques besides dynamic programming can be used to tackle the above optimal control problem. However, the Bellman Equation is often the most convenient method of solving stochastic optimal control problems.

For a specific example from economics, consider an infinitely-lived consumer with initial wealth endowment ${\displaystyle {\color {Red}a_{0}}}$  at period ${\displaystyle 0}$ . He has an instantaneous utility function ${\displaystyle u(c)}$  where ${\displaystyle c}$  denotes consumption and discounts the next period utility at a rate of ${\displaystyle 0<\beta <1}$ . Assume that what is not consumed in period ${\displaystyle t}$  carries over to the next period with interest rate ${\displaystyle r}$ . Then the consumer's utility maximization problem is to choose a consumption plan ${\displaystyle \{{\color {OliveGreen}c_{t}}\}}$  that solves

${\displaystyle \max \sum _{t=0}^{\infty }\beta ^{t}u({\color {OliveGreen}c_{t}})}$

subject to

${\displaystyle {\color {Red}a_{t+1}}=(1+r)({\color {Red}a_{t}}-{\color {OliveGreen}c_{t}}),\;{\color {OliveGreen}c_{t}}\geq 0,}$

and

${\displaystyle \lim _{t\rightarrow \infty }{\color {Red}a_{t}}\geq 0.}$

The first constraint is the capital accumulation/law of motion specified by the problem, while the second constraint is a transversality condition that the consumer does not carry debt at the end of his life. The Bellman equation is

${\displaystyle V(a)=\max _{0\leq c\leq a}\{u(c)+\beta V((1+r)(a-c))\},}$

Alternatively, one can treat the sequence problem directly using, for example, the Hamiltonian equations.

Now, if the interest rate varies from period to period, the consumer is faced with a stochastic optimization problem. Let the interest r follow a Markov process with probability transition function ${\displaystyle Q(r,d\mu _{r})}$  where ${\displaystyle d\mu _{r}}$  denotes the probability measure governing the distribution of interest rate next period if current interest rate is ${\displaystyle r}$ . The timing of the model is that the consumer decides his current period consumption after the current period interest rate is announced.

Rather than simply choosing a single sequence ${\displaystyle \{{\color {OliveGreen}c_{t}}\}}$ , the consumer now must choose a sequence ${\displaystyle \{{\color {OliveGreen}c_{t}}\}}$  for each possible realization of a ${\displaystyle \{r_{t}\}}$  in such a way that his lifetime expected utility is maximized:

${\displaystyle \max \mathbb {E} {\bigg (}\sum _{t=0}^{\infty }\beta ^{t}u({\color {OliveGreen}c_{t}}){\bigg )}.}$

The expectation ${\displaystyle \mathbb {E} }$  is taken with respect to the appropriate probability measure given by Q on the sequences of r 's. Because r is governed by a Markov process, dynamic programming simplifies the problem significantly. Then Bellman equation is simply

${\displaystyle V(a,r)=\max _{0\leq c\leq a}\{u(c)+\beta \int V((1+r)(a-c),r')Q(r,d\mu _{r})\}.}$

Under some reasonable assumption, the resulting optimal policy function g(a,r) is measurable.

For a general stochastic sequential optimization problem with Markovian shocks and where the agent is faced with his decision ex-post, the Bellman equation takes a very similar form

${\displaystyle V(x,z)=\max _{c\in \Gamma (x,z)}F(x,c,z)+\beta \int V(T(x,c),z')d\mu _{z}(z').}$

## Solution methods

• The method of undetermined coefficients, also known as 'guess and verify', can be used to solve some infinite-horizon, autonomous Bellman equations.[9]
• The Bellman equation can be solved by backwards induction, either analytically in a few special cases, or numerically on a computer. Numerical backwards induction is applicable to a wide variety of problems, but may be infeasible when there are many state variables, due to the curse of dimensionality. Approximate dynamic programming has been introduced by D. P. Bertsekas and J. N. Tsitsiklis with the use of artificial neural networks (multilayer perceptrons) for approximating the Bellman function.[10] This is an effective mitigation strategy for reducing the impact of dimensionality by replacing the memorization of the complete function mapping for the whole space domain with the memorization of the sole neural network parameters.
• By calculating the first-order conditions associated with the Bellman equation, and then using the envelope theorem to eliminate the derivatives of the value function, it is possible to obtain a system of difference equations or differential equations called the 'Euler equations'.[11] Standard techniques for the solution of difference or differential equations can then be used to calculate the dynamics of the state variables and the control variables of the optimization problem.

## Applications in economics

The first known application of a Bellman equation in economics is due to Martin Beckmann and Richard Muth.[12] Martin Beckmann also wrote extensively on consumption theory using the Bellman equation in 1959. His work influenced Edmund S. Phelps, among others.

A celebrated economic application of a Bellman equation is Robert C. Merton's seminal 1973 article on the intertemporal capital asset pricing model.[13] (See also Merton's portfolio problem).The solution to Merton's theoretical model, one in which investors chose between income today and future income or capital gains, is a form of Bellman's equation. Because economic applications of dynamic programming usually result in a Bellman equation that is a difference equation, economists refer to dynamic programming as a "recursive method" and a subfield of recursive economics is now recognized within economics.

Nancy Stokey, Robert E. Lucas, and Edward Prescott describe stochastic and nonstochastic dynamic programming in considerable detail, and develop theorems for the existence of solutions to problems meeting certain conditions. They also describe many examples of modeling theoretical problems in economics using recursive methods.[14] This book led to dynamic programming being employed to solve a wide range of theoretical problems in economics, including optimal economic growth, resource extraction, principal–agent problems, public finance, business investment, asset pricing, factor supply, and industrial organization. Lars Ljungqvist and Thomas Sargent apply dynamic programming to study a variety of theoretical questions in monetary policy, fiscal policy, taxation, economic growth, search theory, and labor economics.[15] Avinash Dixit and Robert Pindyck showed the value of the method for thinking about capital budgeting.[16] Anderson adapted the technique to business valuation, including privately held businesses.[17]

Using dynamic programming to solve concrete problems is complicated by informational difficulties, such as choosing the unobservable discount rate. There are also computational issues, the main one being the curse of dimensionality arising from the vast number of possible actions and potential state variables that must be considered before an optimal strategy can be selected. For an extensive discussion of computational issues, see Miranda and Fackler,[18] and Meyn 2007.[19]

## Example

In Markov decision processes, a Bellman equation is a recursion for expected rewards. For example, the expected reward for being in a particular state s and following some fixed policy ${\displaystyle \pi }$  has the Bellman equation:

${\displaystyle V^{\pi }(s)=R(s,\pi (s))+\gamma \sum _{s'}P(s'|s,\pi (s))V^{\pi }(s').\ }$

This equation describes the expected reward for taking the action prescribed by some policy ${\displaystyle \pi }$ .

The equation for the optimal policy is referred to as the Bellman optimality equation:

${\displaystyle V^{\pi *}(s)=\max _{a}\{{R(s,a)+\gamma \sum _{s'}P(s'|s,a)V^{\pi *}(s')}\}.\ }$

where ${\displaystyle {\pi *}}$  is the optimal policy and ${\displaystyle V^{\pi *}}$  refers to the value function of the optimal policy. The equation above describes the reward for taking the action giving the highest expected return.

## References

1. ^ Dixit, Avinash K. (1990). Optimization in Economic Theory (Second ed.). Oxford: Oxford University Press. p. 164. ISBN 0-19-877211-4.
2. ^ Kirk, Donald E. (1970). Optimal Control Theory: An Introduction. Englewood Cliffs, NJ: Prentice-Hall. p. 55. ISBN 0-13-638098-0.
3. ^ Kirk, Donald E. (1970). Optimal Control Theory: An Introduction. Englewood Cliffs, NJ: Prentice-Hall. p. 70. ISBN 0-13-638098-0.
4. ^ Kamien, Morton I.; Schwartz, Nancy L. (1991). Dynamic Optimization: The Calculus of Variations and Optimal Control in Economics and Management (Second ed.). Amsterdam: Elsevier. p. 261. ISBN 0-444-01609-0.
5. ^ Kirk, Donald E. (1970). Optimal Control Theory: An Introduction. Englewood Cliffs, NJ: Prentice-Hall. p. 88. ISBN 0-13-638098-0.
6. ^ a b c Bellman, R.E. 1957. Dynamic Programming. Princeton University Press, Princeton, NJ. Republished 2003: Dover, ISBN 0-486-42809-5.
7. ^ a b S. Dreyfus (2002), 'Richard Bellman on the birth of dynamic programming' Archived January 10, 2005, at the Wayback Machine Operations Research 50 (1), pp. 48–51.
8. ^ R Bellman, On the Theory of Dynamic Programming, Proceedings of the National Academy of Sciences, 1952
9. ^ Ljungqvist, Lars; Sargent, Thomas J. (2004). Recursive Macroeconomic Theory (2nd ed.). MIT Press. pp. 88–90. ISBN 0-262-12274-X.
10. ^ Bertsekas, D. P.; Tsitsiklis, J. N. (1996). Neuro-Dynamic Programming. Athena Scientific.
11. ^ Miao, Jianjun (2014). Economic Dynamics in Discrete Time. MIT Press. p. 134. ISBN 978-0-262-32560-8.
12. ^ Beckmann, Martin; Muth, Richard (1954). "On the Solution to the 'Fundamental Equation' of inventory theory" (PDF). Cowles Commission Discussion Paper 2116.
13. ^ Merton, Robert C. (1973). "An Intertemporal Capital Asset Pricing Model". Econometrica. 41 (5): 867–887. JSTOR 1913811.
14. ^ Stokey, Nancy; Lucas, Robert E.; Prescott, Edward (1989). Recursive Methods in Economic Dynamics. Harvard Univ. Press. ISBN 0-674-75096-9.
15. ^ Ljungqvist, Lars; Sargent, Thomas (2012). Recursive Macroeconomic Theory (Third ed.). MIT Press. ISBN 978-0-262-01874-6.
16. ^ Dixit, Avinash; Pindyck, Robert (1994). Investment Under Uncertainty. Princeton Univ. Press. ISBN 0-691-03410-9.
17. ^ Anderson, Patrick L., Business Economics & Finance, CRC Press, 2004 (chapter 10), ISBN 1-58488-348-0; The Value of Private Businesses in the United States, Business Economics (2009) 44, 87–108. doi:10.1057/be.2009.4. Economics of Business Valuation, Stanford University Press (2013); ISBN 9780804758307. Stanford Press Archived 2013-08-08 at the Wayback Machine
18. ^ Miranda, M., & Fackler, P., 2002. Applied Computational Economics and Finance. MIT Press
19. ^ S. P. Meyn, 2007. Control Techniques for Complex Networks Archived 2008-05-13 at the Wayback Machine, Cambridge University Press, 2007. Appendix contains abridged Meyn & Tweedie Archived 2007-10-12 at the Wayback Machine.