ArticleslgStudy

computer science

Stochastic dynamic programming

Stochastic dynamic programming is a computer science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Stochastic dynamic programming rather than just read about it. In short: Originally introduced by Richard E. Bellman in (Bellman 1957), stochastic dynamic programming (SDP) is a technique for modelling and solving problems of decision making under uncertainty.

Stochastic dynamic programming — main illustration
Stochastic dynamic programming — illustration

Key takeaways

  • Stochastic dynamic programming belongs to computer science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Stochastic dynamic programming to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Stochastic dynamic programming from memory before moving on to harder problems.

Reference excerpt

Originally introduced by Richard E. Bellman in (Bellman 1957), stochastic dynamic programming (SDP) is a technique for modelling and solving problems of decision making under uncertainty. Closely related to stochastic programming and dynamic programming, stochastic dynamic programming represents the problem under scrutiny in the form of a Bellman equation. The aim is to compute a policy prescribing how to act optimally in the face of uncertainty.

A motivating example: Gambling game A gambler has $2, she is allowed to play a game of chance 4 times and her goal is to maximize her probability of ending up with a least $6. If the gambler bets $ b {\displaystyle b} on a play of the game, then with probability 0.4 she wins the game, recoups the initial bet, and she increases her capital position by $ b {\displaystyle b} ; with probability 0.6, she loses the bet amount $ b {\displaystyle b} ; all plays are pairwise independent. On any play of the game, the gambler may not bet more money than she has available at the beginning of that play. Stochastic dynamic programming can be employed to model this problem and determine a betting strategy that, for instance, maximizes the gambler's probability of attaining a wealth of at least $6 by the end of the betting horizon. Note that if there is no limit to the number of games that can be played, the problem becomes a variant of the well known St. Petersburg paradox.

Formal background Consider a discrete system defined on n {\displaystyle n} stages in which each stage t = 1 , … , n {\displaystyle t=1,\ldots ,n} is characterized by

an initial state s t ∈ S t {\displaystyle s_{t}\in S_{t}} , where S t {\displaystyle S_{t}} is the set of feasible states at the beginning of stage t {\displaystyle t} ; a decision variable x t ∈ X t {\displaystyle x_{t}\in X_{t}} , where X t {\displaystyle X_{t}} is the set of feasible actions at stage t {\displaystyle t} – note that X t {\displaystyle X_{t}} may be a function of the initial state s t {\displaystyle s_{t}} ; an immediate cost/reward function p t ( s t , x t ) {\displaystyle p_{t}(s_{t},x_{t})} , representing the cost/reward at stage t {\displaystyle t} if s t {\displaystyle s_{t}} is the initial state and x t {\displaystyle x_{t}} the action selected; a state transition function g t ( s t , x t ) {\displaystyle g_{t}(s_{t},x_{t})} that leads the system towards state s t + 1 = g t ( s t , x t ) {\displaystyle s_{t+1}=g_{t}(s_{t},x_{t})} . Let f t ( s t ) {\displaystyle f_{t}(s_{t})} represent the optimal cost/reward obtained by following an optimal policy over stages t , t + 1 , … , n {\displaystyle t,t+1,\ldots ,n} . Without loss of generality in what follow we will consider a reward maximisation setting. In deterministic dynamic programming one usually deals with functional equations taking the following structure

f t ( s t ) = max x t ∈ X t { p t ( s t , x t ) + f t + 1 ( s t + 1 ) } {\displaystyle f_{t}(s_{t})=\max _{x_{t}\in X_{t}}\{p_{t}(s_{t},x_{t})+f_{t+1}(s_{t+1})\}}

… excerpt ends here. Continue reading the full article.

Worked examples

Example 1 — a first encounter with Stochastic dynamic programming

Start with the simplest possible case. Write down what Stochastic dynamic programming claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Stochastic dynamic programming before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Stochastic dynamic programming ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Stochastic dynamic programming

In research
Stochastic dynamic programming appears in computer science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Stochastic dynamic programming in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Stochastic dynamic programming is common in secondary-school and first-year university syllabi. It links to neighbouring topics Dynamic programming, Optimal control, Optimization algorithms and methods, so understanding it makes those chapters shorter.
In everyday life
Look for Stochastic dynamic programming outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.

Affiliate

Preply — study more efficiently by working with a personal tutor. 50% off.

How to study Stochastic dynamic programming in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Stochastic dynamic programming means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Stochastic dynamic programming out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Stochastic dynamic programming in simple terms?

Originally introduced by Richard E. Bellman in (Bellman 1957), stochastic dynamic programming (SDP) is a technique for modelling and solving problems of decision making under uncertainty.

Why does Stochastic dynamic programming matter?

Because it connects several computer science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Stochastic dynamic programming?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Stochastic dynamic programming.

Tags

  • Dynamic programming
  • Optimal control
  • Optimization algorithms and methods
  • Stochastic optimization

Keep exploring