Lectures

Math Camp

Lecture 9: Dynamic Programming and the Bellman Equation

In many economic problems, the decision maker faces a sequence of choices, each affecting the next. A household that saves today has more to spend tomorrow; a firm that invests today produces more next year. Today’s choice earns a payoff now and changes the situation for every later choice, so the choices at different dates cannot be studied separately. Dynamic programming is a tool for solving such problems.

1 Sequential problems and their recursive form

1.1 The growth problem

Time is discrete, t=0,1,2,t=0,1,2,\dots. An agent (decision-maker) starts with a stock of capital k0>0k_{0}>0. Capital ktk_{t} produces output f(kt)f(k_{t}) at date tt, and output is either consumed, ctc_{t}, or carried forward as next period’s capital, kt+1k_{t+1}. The agent values consumption streams by a discounted sum of one-period utilities and solves

max{ct,kt+1}t=0t=0βtu(ct)subject toct+kt+1=f(kt),ct0,kt+10,k0 given.\max_{\{c_{t},\,k_{t+1}\}_{t=0}^{\infty}}\ \sum_{t=0}^{\infty}\beta^{t}u(c_{t}) \qquad\text{subject to}\qquad c_{t}+k_{t+1}=f(k_{t}),\quad c_{t}\geq0,\quad k_{t+1}\geq0, \quad k_{0}\text{ given}.(1)

The number β(0,1)\beta\in(0,1) is the discount factor. The utility function u:+u:\mathbb{R}_{+}\to\mathbb{R} is continuous, strictly increasing, and strictly concave, and f:++f:\mathbb{R}_{+}\to\mathbb{R}_{+} is continuous, increasing, and concave with f(0)=0f(0)=0; both are differentiable on (0,)(0,\infty). When we differentiate a value function we assume in addition that u(c)u'(c)\to\infty as c0c\to0, so that an agent never chooses zero consumption.

Problem (1) is written as a sequential problem: the unknown is the whole sequence of consumptions and capital stocks, c0,k1,c1,k2,c_{0},k_{1},c_{1},k_{2},\dots, chosen at once. Since ct=f(kt)kt+1c_{t}=f(k_{t})-k_{t+1}, the capital sequence determines the consumption sequence. We can therefore use kt+1[0,f(kt)]k_{t+1}\in[0,f(k_{t})] as the choice at date tt. Every date has the same structure, drawn in Figure 1.1: ktstatekt+1choicekt+1tomorrow’s state.\underbrace{k_{t}}_{\text{state}} \ \longrightarrow\ \underbrace{k_{t+1}}_{\text{choice}} \ \longrightarrow\ \underbrace{k_{t+1}}_{\text{tomorrow's state}} . The agent inherits the state ktk_{t} at date tt and chooses kt+1k_{t+1}, earning the current payoff u(f(kt)kt+1)u(f(k_{t})-k_{t+1}). The transition makes today’s choice tomorrow’s state.

Figure 1.1. One date of the growth problem. The state k_{t} fixes the feasible choices [0,f(k_{t})]; the choice k_{t+1} produces the current payoff and becomes the state at date t+1.

The state is not simply “a variable indexed by tt.” It is the information inherited from the past that matters for the choices still to be made. In the growth problem, once ktk_{t} is known, the feasible choices at date tt and everything after depend on the past only through ktk_{t}: two histories that arrive at the same ktk_{t} face the same future. Which sequence of earlier consumptions produced ktk_{t} is irrelevant, so it is not part of the state. If instead the payoff at date tt were u(ct,ct1)u(c_{t},c_{t-1}), so that yesterday’s consumption changed the value of today’s, then ct1c_{t-1} would have to be carried in the state along with ktk_{t}. A state must therefore contain all information from the history that affects future feasible choices, payoffs, or transitions.

1.2 The principle of optimality and the Bellman equation

Suppose the agent begins a date with capital kk and chooses kk'. From tomorrow on the agent faces the same continuation problem as (1), with kk' in place of k0k_{0}: the same technology, preferences, and infinite horizon. The highest utility attainable from tomorrow on therefore depends only on kk'.

Definition 1.1 (Value function). The value function V:+V:\mathbb{R}_{+}\to\mathbb{R} assigns to each initial stock kk the largest lifetime utility attainable from it, V(k)=maxt=0βtu(ct)subject to the constraints of (1) with k0=k.V(k)=\max\ \sum_{t=0}^{\infty}\beta^{t}u(c_{t}) \qquad\text{subject to the constraints of \href{#eq:lec09-sequence-problem}{(1)} with }k_{0}=k .

Whenever we write a maximum, we assume that the objective is finite and the maximum is attained. Bounded one-period utility is sufficient for convergence: if |u(c)|M\lvert u(c) \rvert\leq M for every c0c\geq0, every feasible stream has discounted utility of absolute value at most M/(1β)M/(1-\beta) by the geometric-sum calculation of Lecture 8’s Example 3.9. Attainment requires additional conditions supplied by the macroeconomics sequence.

Now split lifetime utility from kk into today’s payoff and everything after. If today’s choice is kk', then today yields u(f(k)k)u(f(k)-k'), and the most that tomorrow and later can yield is V(k)V(k'), discounted once because it starts one period later. An optimal choice of kk' makes the total as large as possible:

V(k)=max0kf(k){u(f(k)k)+βV(k)}for every k0.V(k)=\max_{0\leq k'\leq f(k)} \left\{u\left(f(k)-k'\right)+\beta V(k')\right\} \qquad\text{for every }k\geq0 .(2)

This is the Bellman equation of the growth problem. Its terms correspond to the pieces of Section 1.1:

  • kk is the current state;

  • kk' is the choice, and [0,f(k)][0,f(k)] is the set of feasible choices;

  • u(f(k)k)u(f(k)-k') is the current payoff;

  • today’s choice kk' becomes tomorrow’s state, which is why the same letter appears inside V()V(\cdot);

  • V(k)V(k') is the continuation value, the value of behaving optimally from tomorrow on;

  • β\beta discounts the continuation value back to today.

The reasoning that produced (2) is Bellman’s principle of optimality: after any feasible first choice, the best continuation is an optimal plan for the problem that starts from the resulting state. In particular, every tail of an optimal plan is optimal from the state reached at that date. Otherwise, replacing the tail by an optimal continuation would raise lifetime utility without changing any earlier payoff.

The unknown in (2) is a function. The equation must hold at every k0k\geq0, and the same VV appears on both sides, once evaluated at kk and once at kk'. Thus solving the Bellman equation means finding a function VV that satisfies it at every state. For a fixed kk and a fixed candidate VV, the maximization inside the braces is a one-variable problem of the kind solved in Lecture 6. The recursive formulation repeats this one-period choice at every state.

The recursive formulation gives more than an equation for VV. Under our assumptions, the value function of Definition 1.1 is the unique bounded solution of the Bellman equation when uu is bounded. Moreover, a feasible capital sequence is optimal for (1) if and only if, at every date, its kt+1k_{t+1} attains the maximum in (2) at the state ktk_{t}. We use these facts without proof; Section 3.2 returns to the uniqueness claim.

1.3 Value function and policy function

Solving (2) produces two objects, and it is important to keep them apart. The first is the value function VV. The second is the choice that attains the maximum at each state.

Definition 1.2 (Policy function). The policy function g:++g:\mathbb{R}_{+}\to\mathbb{R}_{+} assigns to each state the choice that attains the maximum in the Bellman equation, g(k)arg max0kf(k){u(f(k)k)+βV(k)}.g(k)\in\mathop{\mathrm{arg\,max}}_{0\leq k'\leq f(k)} \left\{u\left(f(k)-k'\right)+\beta V(k')\right\} .

Under our assumptions the maximizer is unique at every kk, so gg is a function; we take this without proof. Consumption then follows from the constraint, c=f(k)g(k)c=f(k)-g(k). The two functions answer different questions: kVlifetime utility from k,kgtomorrow’s capital k.k\ \overset{V}{\longmapsto}\ \text{lifetime utility from }k , \qquad\qquad k\ \overset{g}{\longmapsto}\ \text{tomorrow's capital }k' . The policy function describes the agents’s choice at each state and generates the whole optimal path from k0k_{0} alone: k1=g(k0),k2=g(k1),k3=g(k2),k_{1}=g(k_{0}),\qquad k_{2}=g(k_{1}),\qquad k_{3}=g(k_{2}),\ \dots The Bellman equation determines the value function. Its continuation term βV(k)\beta V(k') values tomorrow’s capital in today’s utility. The sequential problem (1) and the recursive problem (2) generate the same optimal paths; the recursive formulation describes them with a rule gg rather than a list of numbers.

2 First-order and envelope conditions

The maximization inside the Bellman equation is a one-variable problem. Lecture 6 supplies its first-order condition, and Lecture 8’s envelope theorem gives the derivative of the optimized value. In this section we assume, for k>0k>0, that VV is differentiable and concave and that the maximizer g(k)g(k) is interior, 0<g(k)<f(k)0<g(k)<f(k), and differentiable in kk. Standard dynamic-programming results establish these properties under suitable hypotheses; we impose them rather than prove them.

2.1 The first-order condition

Fix kk and let c=f(k)kc=f(k)-k'. The objective in (2) is u(f(k)k)+βV(k)u(f(k)-k')+\beta V(k'), and Lecture 6’s interior first-order condition, differentiating in kk', gives

u(c)+βV(k)=0,that is,u(c)=βV(k).-u'(c)+\beta V'(k')=0, \qquad\text{that is,}\qquad u'(c)=\beta V'(k') .(3)

Since the objective is concave in kk', the first-order condition is sufficient by Lecture 6’s Theorem 3.2: it locates the maximizer k=g(k)k'=g(k). In words, one more unit of capital carried into tomorrow costs u(c)u'(c) in utility today and is worth βV(k)\beta V'(k'), the discounted marginal value of capital tomorrow. At the optimum the two are equal.

To eliminate the unknown derivative V(k)V'(k') from (3), we use the envelope condition.

2.2 The envelope condition and the Euler equation

The Bellman equation defines V(k)V(k) as an optimized value with parameter kk. By Lecture 8’s Theorem 2.1, part 1, we hold the choice at its optimum and differentiate the objective only with respect to kk. The parameter appears only in u(f(k)k)u(f(k)-k'), so

V(k)=u(f(k)g(k))f(k)=u(c)f(k).V'(k)=u'\left(f(k)-g(k)\right)\,f'(k)=u'(c)\,f'(k) .(4)

This is the envelope condition. One more unit of capital today raises output by f(k)f'(k), and at the margin the extra output is worth u(c)u'(c) whether it is consumed or saved, because the first-order condition has equated the two uses; the response of g(k)g(k) contributes nothing to first order.

Equation (4) holds at every state, so it holds at tomorrow’s state kk' with tomorrow’s consumption c=f(k)g(k)c'=f(k')-g(k'): V(k)=u(c)f(k)V'(k')=u'(c')f'(k'). Substituting into (3),

u(ct)=βu(ct+1)f(kt+1),u'(c_{t})=\beta\,u'(c_{t+1})\,f'(k_{t+1}) ,(5)

where we have restored time subscripts, c=ctc=c_{t}, k=kt+1k'=k_{t+1}, and c=ct+1c'=c_{t+1}. This is the Euler equation of the growth problem. Its left side is the utility cost of saving one more unit today. Its right side is the benefit: the unit becomes f(kt+1)f'(k_{t+1}) units of output tomorrow, each worth u(ct+1)u'(c_{t+1}), discounted once. Substitution has eliminated VV' and left a relation between consumption at adjacent dates and the model’s primitives.

The calculation has three steps that recur throughout macroeconomics: Bellman equationfirst-order condition and envelope conditionEuler equation\boxed{\ \text{Bellman equation} \ \longrightarrow\ \text{first-order condition and envelope condition} \ \longrightarrow\ \text{Euler equation}\ }

2.3 The same Euler equation from the sequential problem

We can also derive (5) directly from the sequential formulation. Substitute ct=f(kt)kt+1c_{t}=f(k_{t})-k_{t+1} into (1), so that the objective becomes t=0βtu(f(kt)kt+1),\sum_{t=0}^{\infty}\beta^{t}u\left(f(k_{t})-k_{t+1}\right) , a function of the capital sequence alone. The variable kt+1k_{t+1} appears in exactly two terms of the sum, dated tt and t+1t+1. At an interior optimum, Lecture 6’s first-order condition in the single variable kt+1k_{t+1}, all other capital stocks held fixed, gives βtu(ct)+βt+1u(ct+1)f(kt+1)=0,-\beta^{t}u'(c_{t})+\beta^{t+1}u'(c_{t+1})f'(k_{t+1})=0 , which is (5) after dividing by βt\beta^{t}. The economics is a one-period perturbation: consume one unit less at tt, carry it forward, and consume the proceeds at t+1t+1; at an optimum the change in lifetime utility is zero to first order.

The two derivations produce the same condition because the recursive and sequential formulations describe the same problem. The Bellman equation, its first-order condition, and its envelope condition reproduce the intertemporal optimality condition obtained directly from the sequential problem, using a one-period problem with the same form at every state. The Euler equation is a relation between three consecutive capital stocks (kt,kt+1,kt+2)(k_{t},k_{t+1},k_{t+2}); the initial condition k0k_{0} pins down one end of the path, and the macroeconomics sequence supplies the condition that pins down the other, the transversality condition. We do not develop the transversality condition in this course.

2.4 Writing down a Bellman equation

Given a new dynamic problem, the procedure is: identify the state, the choice, the payoff, and the transition; then write today’s payoff plus β\beta times the value at tomorrow’s state, maximized over today’s choice. The consumption–saving problem also shows how two choices can parameterize the same recursion.

Example 2.1 (Consumption and saving at a fixed interest rate). A consumer holds wealth at0a_{t}\geq0 at the start of date tt, consumes ct[0,at]c_{t}\in[0,a_{t}], and invests the rest at gross return R>0R>0, so that at+1=R(atct).a_{t+1}=R\,(a_{t}-c_{t}) . Lifetime utility is t=0βtu(ct)\sum_{t=0}^{\infty}\beta^{t}u(c_{t}), and a0a_{0} is given.

  • State. Wealth aa. Once ata_{t} is known, nothing about the past matters for the future.

  • Choice. Consumption c[0,a]c\in[0,a].

  • Payoff. u(c)u(c).

  • Transition. a=R(ac)a'=R(a-c).

The Bellman equation is V(a)=max0ca{u(c)+βV(R(ac))}.V(a)=\max_{0\leq c\leq a}\ \left\{u(c)+\beta V\left(R(a-c)\right)\right\} . There is more than one convenient way to parameterize the choice. Since c=aa/Rc=a-a'/R, the consumer may instead choose tomorrow’s wealth a[0,Ra]a'\in[0,Ra]: V(a)=max0aRa{u(aaR)+βV(a)}.V(a)=\max_{0\leq a'\leq Ra}\ \left\{u\left(a-\frac{a'}{R}\right)+\beta V(a')\right\} . The two equations have the same solution VV; the economic problem determines the recursion, and the notation is a matter of convenience. In the growth problem we chose kk' for the same reason: it keeps the continuation value V(k)V(k') simple.

Under the assumptions of Section 2, the first-order condition in cc from the first formulation is u(c)=βRV(a),u'(c)=\beta R\,V'(a') , and the envelope condition, differentiating u(c)+βV(R(ac))u(c)+\beta V(R(a-c)) in the parameter aa at the optimal cc, is V(a)=βRV(a)=u(c).V'(a)=\beta R\,V'(a')=u'(c) . Applying the envelope condition at tomorrow’s state, V(a)=u(c)V'(a')=u'(c'), and substituting into the first-order condition gives the Euler equation u(ct)=βRu(ct+1).u'(c_{t})=\beta R\,u'(c_{t+1}) . The consumer equates the marginal utility of a unit consumed today with that of the RR units it would become tomorrow, discounted. If βR=1\beta R=1, consumption is constant over time; if βR>1\beta R>1, marginal utility falls and consumption rises. The first-year consumption theory sequence uses this equation as its starting point.

3 Why the recursion works: finite horizons and the fixed point

Finite horizons make the recursive logic explicit because they provide a last date from which to work backward. For an infinite horizon, the contraction mapping theorem determines the value function without a last date.

3.1 Finite horizons and backward induction

Suppose the world ends after date TT: the agent solves

maxt=0Tβtu(ct)subject toct+kt+1=f(kt),ct,kt+10,k0 given,\max\ \sum_{t=0}^{T}\beta^{t}u(c_{t}) \qquad\text{subject to}\qquad c_{t}+k_{t+1}=f(k_{t}),\quad c_{t},k_{t+1}\geq0,\quad k_{0}\text{ given},(6)

with no use for capital after date TT. The value function now depends on the date as well as on the state, because the agent at date tt has Tt+1T-t+1 decision dates remaining. Write Vt(k)V_{t}(k) for the largest utility from date tt on when the date-tt state is kk.

At the last date the problem is trivial. Capital left over is wasted and uu is increasing, so the agent consumes all output: VT(k)=u(f(k)).V_{T}(k)=u\left(f(k)\right) . At date T1T-1 the agent chooses kTk_{T} knowing its continuation value, VT(kT)V_{T}(k_{T}): VT1(k)=max0kf(k){u(f(k)k)+βVT(k)}.V_{T-1}(k)=\max_{0\leq k'\leq f(k)} \left\{u\left(f(k)-k'\right)+\beta V_{T}(k')\right\} . Once VTV_{T} is known, this is a one-variable problem of Lecture 6, and solving it at every kk gives the function VT1V_{T-1}. Then VT2V_{T-2} is obtained from VT1V_{T-1} in the same way, and so on down to V0V_{0}: VTVT1VT2V0.V_{T}\ \longrightarrow\ V_{T-1}\ \longrightarrow\ V_{T-2} \ \longrightarrow\ \cdots\ \longrightarrow\ V_{0} .

Proposition 3.1 (Finite-horizon Bellman recursion). For t=T1,T2,,0t=T-1,T-2,\dots,0 and every k0k\geq0, Vt(k)=max0kf(k){u(f(k)k)+βVt+1(k)},VT(k)=u(f(k)),V_{t}(k)=\max_{0\leq k'\leq f(k)} \left\{u\left(f(k)-k'\right)+\beta V_{t+1}(k')\right\}, \qquad V_{T}(k)=u\left(f(k)\right) , and a feasible capital sequence solves (6) if and only if at every date tT1t\leq T-1 its kt+1k_{t+1} attains the maximum at the state ktk_{t}.

Proof (optional). Fix tt and kk, and write W(k)W(k) for the right-hand side of the display. Every feasible plan from date tt at state kk begins with some k[0,f(k)]k'\in[0,f(k)] and continues with a feasible plan from date t+1t+1 at state kk', whose utility from t+1t+1 on is at most Vt+1(k)V_{t+1}(k'). So every plan earns at most u(f(k)k)+βVt+1(k)W(k)u(f(k)-k')+\beta V_{t+1}(k')\leq W(k), and Vt(k)W(k)V_{t}(k)\leq W(k). Conversely, let kk' attain the maximum and follow it with an optimal plan from date t+1t+1 at state kk'; that plan exists by induction downward from date TT, where the optimal plan is to consume everything. The combined plan is feasible and earns W(k)W(k), so Vt(k)W(k)V_{t}(k)\geq W(k). The two inequalities give the recursion. The same comparison shows that a plan achieves Vt(k)V_{t}(k) exactly when its first choice attains the maximum and its continuation is optimal. This proves the biconditional. ◻

Computing VT,VT1,,V0V_{T},V_{T-1},\dots,V_{0} in that order is called backward induction: it is Lecture 1’s induction, run from the last date toward the first. Each step is a static problem, and each maximum is attained by the Weierstrass theorem of Lecture 2 when the objective is continuous, since [0,f(k)][0,f(k)] is compact. The principle of optimality is also established by the argument: an optimal plan’s continuation from any date is optimal for the problem starting from the state reached on that date.

Example 3.2 (Two dates of cake eating). Let u(c)=cu(c)=\sqrt{c} and f(k)=kf(k)=k. Capital does not reproduce in this special case: kk is a stock of cake, and the agent divides it between consumption now and cake carried to the next date. Fix an upper bound k>0\bar k>0 and take the state space to be S=[0,k]S=[0,\bar k], which is invariant because every feasible choice satisfies 0kk0\leq k'\leq k. Let T=1T=1, so there are two dates. At date 11 the agent consumes everything: V1(k)=k.V_{1}(k)=\sqrt{k} . At date 00 the recursion gives V0(k)=max0kk{kk+βk}.V_{0}(k)=\max_{0\leq k'\leq k} \left\{\sqrt{k-k'}+\beta\sqrt{k'}\right\} . For k>0k>0 the objective is strictly concave and its one-sided slopes at the two endpoints point toward the interior. Its first-order condition is 12kk=β2kand hencek=β21+β2k,\frac{1}{2\sqrt{k-k'}}=\frac{\beta}{2\sqrt{k'}} \qquad\text{and hence}\qquad k'=\frac{\beta^{2}}{1+\beta^{2}}\,k , the unique maximizer by Lecture 6’s Theorem 3.1. The agent carries the fraction β2/(1+β2)\beta^{2}/(1+\beta^{2}) of the cake to date 11 and consumes the rest. Substituting back gives V0(k)=1+β2k.V_{0}(k)=\sqrt{1+\beta^{2}}\,\sqrt{k} . Thus V1V_{1} and V0V_{0} are both a constant multiple of k\sqrt{k}.

The pattern continues. If Vt+1(k)=Bt+1kV_{t+1}(k)=B_{t+1}\sqrt{k} with Bt+1>0B_{t+1}>0, the same calculation gives k=β2Bt+121+β2Bt+12k,Vt(k)=Btk,Bt2=1+β2Bt+12,BT=1.k'=\frac{\beta^{2}B_{t+1}^{2}} {1+\beta^{2}B_{t+1}^{2}}\,k, \qquad V_{t}(k)=B_{t}\sqrt{k}, \qquad B_{t}^{2}=1+\beta^{2}B_{t+1}^{2}, \qquad B_{T}=1 . Consequently, Bt2=1+β2+β4++β2(Tt).B_{t}^{2}=1+\beta^{2}+\beta^{4}+\cdots+\beta^{2(T-t)} . As the number of remaining dates grows, BtB_{t} increases to 1/1β21/\sqrt{1-\beta^{2}}, and the fraction carried forward increases to β2\beta^{2}. Section 4 obtains these limits by solving the infinite-horizon problem directly.

3.2 The infinite horizon as a fixed point

With no last date there is no VTV_{T} from which to start. Example 3.2 shows the coefficient on k\sqrt{k} and the fraction carried forward approaching limits as dates are added. In a stationary problem, one whose payoff, feasible set, and transition are the same at every date, the infinite-horizon value does not depend on the calendar. The recursion of Proposition 3.1 with Vt=Vt+1=VV_{t}=V_{t+1}=V is the Bellman equation (2). Whether an infinite-horizon VV exists, and whether it is unique, is a fixed-point question. Under bounded rewards, a contraction argument on the space of bounded functions answers it.

To state the contraction result, write a stationary problem in general notation. It has a state ss in a state space SS, a set Γ(s)\Gamma(s) of feasible actions at ss, a reward r(s,a)r(s,a), a transition s=F(s,a)s'=F(s,a), and a discount factor β(0,1)\beta\in(0,1); the growth problem is the case s=ks=k, Γ(k)=[0,f(k)]\Gamma(k)=[0,f(k)], a=ka=k', r(k,k)=u(f(k)k)r(k,k')=u(f(k)-k'), and F(k,k)=kF(k,k')=k'. Table 3.1 lists the correspondence. The Bellman equation is V(s)=supaΓ(s){r(s,a)+βV(F(s,a))}for every sS,V(s)=\sup_{a\in\Gamma(s)}\left\{r(s,a)+\beta V\left(F(s,a)\right)\right\} \qquad\text{for every }s\in S , written with a supremum so that it makes sense before anything is known about attainment.

Table 3.1. The pieces of the growth problem and their names in a general stationary dynamic problem. In the growth problem the transition is the identity in the choice, which is why kk' serves as both the choice and tomorrow’s state.
Object Growth problem General stationary problem
State capital kk sSs\in S
Feasible choices k[0,f(k)]k'\in[0,f(k)] aΓ(s)a\in\Gamma(s)
Current payoff u(f(k)k)u(f(k)-k') r(s,a)r(s,a)
Transition kk' s=F(s,a)s'=F(s,a)
Bellman equation V(k)=max{u(f(k)k)+βV(k)}V(k)=\max\{u(f(k)-k')+\beta V(k')\} V(s)=sup{r(s,a)+βV(F(s,a))}V(s)=\sup\{r(s,a)+\beta V(F(s,a))\}
Policy function k=g(k)k'=g(k) a=g(s)a=g(s)

Definition 3.3 (Bellman operator). Let B(S)B(S) be the set of bounded functions v:Sv:S\to\mathbb{R} with the sup norm v=supsS|v(s)|\lVert v \rVert_{\infty}=\sup_{s\in S}\lvert v(s) \rvert. The Bellman operator 𝒯\mathcal{T} sends a candidate value function vv to the function (𝒯v)(s)=supaΓ(s){r(s,a)+βv(F(s,a))}.(\mathcal{T}v)(s)=\sup_{a\in\Gamma(s)} \left\{r(s,a)+\beta\,v\left(F(s,a)\right)\right\} .

The number (𝒯v)(s)(\mathcal{T}v)(s) is the supremum value of a one-period choice at ss when vv values tomorrow’s state. The Bellman equation says 𝒯V=V\mathcal{T}V=V: the value function is a fixed point of 𝒯\mathcal{T}. Backward induction is iteration of 𝒯\mathcal{T}, since Vt=𝒯Vt+1V_{t}=\mathcal{T}V_{t+1} in Proposition 3.1. The operator 𝒯\mathcal{T} is the function-valued version of the map T(x)=a+βxT(x)=a+\beta x in Lecture 8’s Example 3.9: today’s reward plus β\beta times the continuation.

Theorem 3.4 (The Bellman operator is a contraction). Suppose Γ(s)\Gamma(s) is nonempty for every sSs\in S and there is M<M<\infty with |r(s,a)|M\lvert r(s,a) \rvert\leq M whenever aΓ(s)a\in\Gamma(s). Then 𝒯\mathcal{T} maps B(S)B(S) into B(S)B(S), and for all v,wB(S)v,w\in B(S), 𝒯v𝒯wβvw.\lVert \mathcal{T}v-\mathcal{T}w \rVert_{\infty}\leq\beta\,\lVert v-w \rVert_{\infty} .

Proof (optional). Every number whose supremum defines (𝒯v)(s)(\mathcal{T}v)(s) lies between Mβv-M-\beta\lVert v \rVert_{\infty} and M+βvM+\beta\lVert v \rVert_{\infty}, so |(𝒯v)(s)|M+βv\lvert (\mathcal{T}v)(s) \rvert\leq M+\beta\lVert v \rVert_{\infty} for every ss and 𝒯vB(S)\mathcal{T}v\in B(S). Now fix ss. For every aΓ(s)a\in\Gamma(s) the definition of the sup norm gives v(F(s,a))w(F(s,a))+vwv(F(s,a))\leq w(F(s,a))+\lVert v-w \rVert_{\infty}, hence r(s,a)+βv(F(s,a))r(s,a)+βw(F(s,a))+βvw.r(s,a)+\beta\,v\left(F(s,a)\right) \leq r(s,a)+\beta\,w\left(F(s,a)\right)+\beta\lVert v-w \rVert_{\infty} . The inequality holds action by action, so it survives the supremum over aΓ(s)a\in\Gamma(s): (𝒯v)(s)(𝒯w)(s)+βvw(\mathcal{T}v)(s)\leq(\mathcal{T}w)(s)+\beta\lVert v-w \rVert_{\infty}. Exchanging vv and ww gives the reverse bound, so |(𝒯v)(s)(𝒯w)(s)|βvw\lvert (\mathcal{T}v)(s)-(\mathcal{T}w)(s) \rvert\leq\beta\lVert v-w \rVert_{\infty} at every ss, and taking the supremum over ss finishes the proof. ◻

The space B(S)B(S) is complete in the sup norm, a fact we use without proof. The contraction mapping theorem therefore gives three conclusions. The Bellman equation has exactly one bounded solution. Starting from any bounded v0v_{0}, even v0=0v_{0}=0, the iterates vn+1=𝒯vnv_{n+1}=\mathcal{T}v_{n} converge to it in sup norm, with the worst-case error shrinking by the factor β\beta each time. This procedure is called value function iteration. For v0=0v_{0}=0, the iterate vnv_{n} is the value of the problem with nn dates remaining and no terminal value. Thus the infinite-horizon value is the limit of finite-horizon values, as in Example 3.2. More generally, value iteration can start from any bounded function, and the effect of that starting function vanishes at the geometric rate β\beta.

Discounting supplies the contraction modulus β\beta. As β1\beta\to1, the worst-case convergence bound becomes arbitrarily slow; at β=1\beta=1, Lecture 8’s map T(x)=a+xT(x)=a+x has no fixed point when a0a\neq0: an undiscounted constant stream of nonzero rewards has no finite value. The theorem also requires a bounded reward. In Example 3.2, S=[0,k]S=[0,\bar k] and 0kkk0\leq\sqrt{k-k'}\leq\sqrt{\bar k}, so the hypothesis holds and the finite-horizon values converge uniformly to the unique bounded fixed point. If instead the state space were all of +\mathbb{R}_{+}, the same reward would be unbounded above and this theorem would no longer apply.

4 A Bellman equation solved by hand

Value function iteration is useful for numerical work. When the primitives are special enough, the Bellman equation can be solved analytically by guess and verify: conjecture that VV has a particular functional form with unknown constants, substitute the conjecture into the Bellman equation, carry out the maximization, and check whether the result has the conjectured form again; if it does, matching constants yields equations for them. The guess proposes a candidate; substitution verifies that the candidate is a fixed point. A separate theorem is still needed to show that this fixed point is the value function and is unique in the relevant class.

Example 4.1 (Square-root cake eating). Continue the cake-eating problem of Example 3.2, with u(c)=cu(c)=\sqrt{c}, f(k)=kf(k)=k, and S=[0,k]S=[0,\bar k]. Given k0=kSk_{0}=k\in S, the agent solves max{ct,kt+1}t=0t=0βtctsubject toct+kt+1=kt,ct,kt+10.\max_{\{c_t,k_{t+1}\}_{t=0}^{\infty}} \sum_{t=0}^{\infty}\beta^{t}\sqrt{c_t} \quad\text{subject to}\quad c_t+k_{t+1}=k_t,\qquad c_t,k_{t+1}\geq0 . Its Bellman equation is V(k)=max0kk{kk+βV(k)}.V(k)=\max_{0\leq k'\leq k} \left\{\sqrt{k-k'}+\beta V(k')\right\} . The finite-horizon value functions were multiples of k\sqrt{k}, so we conjecture V(k)=BkV(k)=B\sqrt{k} with B>0B>0 and look for a constant BB that makes the equation hold at every k[0,k]k\in[0,\bar k].

The maximization. With the conjecture substituted, the objective kk+βBk\sqrt{k-k'}+\beta B\sqrt{k'} is strictly concave in kk'. For k>0k>0 its unique maximizer is interior and satisfies 12kk=βB2k,\frac{1}{2\sqrt{k-k'}}=\frac{\beta B}{2\sqrt{k'}}, so k=β2B21+β2B2k,kk=k1+β2B2.k'=\frac{\beta^{2}B^{2}}{1+\beta^{2}B^{2}}\,k, \qquad k-k'=\frac{k}{1+\beta^{2}B^{2}} . For k=0k=0, the only feasible choice is k=0k'=0, which the same formula gives.

The verification. Substituting the maximizer back, the right-hand side of the Bellman equation becomes k1+β2B2+β2B2k1+β2B2=1+β2B2k.\frac{\sqrt{k}}{\sqrt{1+\beta^{2}B^{2}}} +\frac{\beta^{2}B^{2}\sqrt{k}}{\sqrt{1+\beta^{2}B^{2}}} =\sqrt{1+\beta^{2}B^{2}}\,\sqrt{k} . The conjectured form is preserved. Matching the coefficient on k\sqrt{k} gives B=1+β2B2B=11β2.B=\sqrt{1+\beta^{2}B^{2}} \qquad\Longleftrightarrow\qquad B=\frac{1}{\sqrt{1-\beta^{2}}} .

The value and policy. The value function and its implied policy and consumption are therefore V(k)=k1β2,g(k)=β2k,c=(1β2)k.V(k)=\frac{\sqrt{k}}{\sqrt{1-\beta^{2}}}, \qquad g(k)=\beta^{2}k, \qquad c=(1-\beta^{2})k . The agent carries the fixed fraction β2\beta^{2} of the remaining cake to the next date. These are the limits found in Example 3.2. The optimal stock path is kt=β2tk0k_{t}=\beta^{2t}k_{0}, so the remaining cake converges to zero.

Substituting the policy into the Bellman equation verifies the solution directly: kg(k)+βV(g(k))=(1β2)k+ββ2k1β2=k1β2=V(k).\sqrt{k-g(k)}+\beta V\left(g(k)\right) =\sqrt{(1-\beta^{2})k} +\frac{\beta\sqrt{\beta^{2}k}}{\sqrt{1-\beta^{2}}} =\frac{\sqrt{k}}{\sqrt{1-\beta^{2}}}=V(k).

The Euler check. Since f(k)=1f'(k)=1 and ct+1=β2ctc_{t+1}=\beta^{2}c_{t}, βu(ct+1)f(kt+1)=β2β2ct=12ct=u(ct).\beta u'(c_{t+1})f'(k_{t+1}) =\frac{\beta}{2\sqrt{\beta^{2}c_{t}}} =\frac{1}{2\sqrt{c_{t}}} =u'(c_{t}) . Finally, VV is bounded on [0,k][0,\bar k] and the reward is bounded by k\sqrt{\bar k}. The contraction theorem therefore shows that this fixed point is the unique bounded solution of the Bellman equation, and value function iteration from the finite-horizon problems converges to it.