s02lec20

# s02lec20 - 15.053 Tuesday, April 30 Dynamic Programming...

This preview shows pages 1–3. Sign up to view the full content.

1 15.053 Tuesday, April 30 z Dynamic Programming Recursion Principle of Optimality Handouts: Lecture Notes 2 Dynamic Programming z Transforms a complex optimization problem into a sequence of simpler ones. z Usually begins at the end and works backwards z Can handle a wide range of problems z Relies on recursion, and on the principle of optimality z Developed by Richard Bellman 3 Recursion example z There are 11 people in a room. How many ways can one select exactly 6 of them? z Let f(n,k) denote the number of subgroups of size k out of n people. We want f(11,6) 1 2 3 4 5 6 7 8 9 10 11 The number of subgroups containing “1” is f(10,5). The number of subgroups not containing “1” is f(10,6). 4 f(n,k) = f(n-1,k-1) + f(n-1, k) f(n,n)=f(n,0)=1 1 1 1 1 1 1 1 1 1 1 2 1 3 3 1 4 6 4 1 5 10 10 5 1 6 15 20 15 6 1 7 21 35 35 21 7 1 8 28 56 70 56 28 8 1 5 Dynamic Programming Example z Suppose that there are 30 matches on a table, and the person who picks up the last match wins. At each alternating turn, my opponent or I can pick up 1, 2 or 3 matches. Assuming that I go first, how can I be sure of winning the game? z (Discuss with partner). 6 DP Example. z I win if there are 1, 2, or 3 matches z Backing up one step, I lose if there are 4 matches. z Backing up another step, I win if there are 5, 6, or 7 matches. z Backing up another step, I lose if there are 8 matches. z Conclusion. I lose if there are 4K matches. I win otherwise.

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
7 Determining the strategy using DP z n = number of matches left (n is the state/stage ) z f(n) = 1 if you can force a win at n matches. f(n) = 0 otherwise f(n) = optimal value function. At each state/stage you can make one of three decisions: take 1, 2 or 3 matches.
This is the end of the preview. Sign up to access the rest of the document.

## This note was uploaded on 12/20/2011 for the course BUS 15.053 taught by Professor Prof.jamesorlin during the Spring '05 term at MIT.

### Page1 / 5

s02lec20 - 15.053 Tuesday, April 30 Dynamic Programming...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online