{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

s02lec20 - 15.053 Tuesday April 30 Dynamic Programming...

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

View Full Document Right Arrow Icon
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.
Image of page 1

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

View Full Document Right Arrow Icon
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.
Image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern