lec19 - MIT OpenCourseWare http://ocw.mit.edu 6.006...

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

View Full Document Right Arrow Icon

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

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: MIT OpenCourseWare http://ocw.mit.edu 6.006 Introduction to Algorithms Spring 2008 For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms . Lecture 19 Dynamic Programming I of IV 6.006 Spring 2008 Lecture 19: Dynamic Programming I: Memoization, Fibonacci, Crazy Eights, Guessing Lecture Overview Fibonacci Warmup Memoization and subproblems Shortest Paths Crazy Eights Guessing Viewpoint Readings CLRS 15 Dynamic Programming (DP) Big idea: :hard yet simple Powerful algorithmic design technique Large class of seemingly exponential problems have a polynomial solution (only) via DP Particularly for optimization problems (min / max) (e.g., shortest paths) * DP controlled brute force * DP recursion + re-use Fibonacci Numbers F 1 = F 2 = 1; F n = F n 1 + F n 2 Naive Algorithm follow recursive definition fib( n ): if n 2: return 1 else return fib( n 1) + fib( n 2) = T ( n ) = T (...
View Full Document

This note was uploaded on 09/24/2010 for the course CS 6.006 taught by Professor Erikdemaine during the Spring '08 term at MIT.

Page1 / 5

lec19 - MIT OpenCourseWare http://ocw.mit.edu 6.006...

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

View Full Document Right Arrow Icon
Ask a homework question - tutors are online