0% found this document useful (0 votes)
6 views

Lecture 1.6 Introduction to Dynamic Programming

The document provides an introduction to dynamic programming, emphasizing the principle of saving and reusing computations to avoid redundancy. It discusses the Fibonacci sequence as an example, comparing recursive and dynamic programming approaches, and outlines the characteristics of the dynamic programming paradigm. Additionally, it touches on the historical context of dynamic programming, highlighting Richard Bellman's contributions in the 1950s.

Uploaded by

rdxsingh01
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views

Lecture 1.6 Introduction to Dynamic Programming

The document provides an introduction to dynamic programming, emphasizing the principle of saving and reusing computations to avoid redundancy. It discusses the Fibonacci sequence as an example, comparing recursive and dynamic programming approaches, and outlines the characteristics of the dynamic programming paradigm. Additionally, it touches on the historical context of dynamic programming, highlighting Richard Bellman's contributions in the 1950s.

Uploaded by

rdxsingh01
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 9

note page

Introduction to Dynamic Programming

Neelima Gupta
ngupta@cs.du.ac.in

Neelima Gupta MCSC 101: Design and Analysis of Algorithms January 24, 2022 1/5
Gospel of Dynamic Programming

Do not repeat the same work: Save and Reuse

Neelima Gupta MCSC 101: Design and Analysis of Algorithms January 24, 2022 2/5
Fibonacci Sequence: Recursion VS DP

F [n] = F [n − 1] + F [n − 2], F [1] = F [2] = 1

Neelima Gupta MCSC 101: Design and Analysis of Algorithms January 24, 2022 3/5
Fibonacci Sequence: Recursion VS DP

F [n] = F [n − 1] + F [n − 2], F [1] = F [2] = 1

Neelima Gupta MCSC 101: Design and Analysis of Algorithms January 24, 2022 3/5
Fibonacci Sequence: Recursion VS DP

F [n] = F [n − 1] + F [n − 2], F [1] = F [2] = 1

Neelima Gupta MCSC 101: Design and Analysis of Algorithms January 24, 2022 3/5
Fibonacci Sequence: Recursion VS DP

F [n] = F [n − 1] + F [n − 2], F [1] = F [2] = 1

What is the time complexity of the top-down approach?


Neelima Gupta MCSC 101: Design and Analysis of Algorithms January 24, 2022 3/5
Fibonacci Sequence: Recursion VS DP

F [n] = F [n − 1] + F [n − 2], F [1] = F [2] = 1

What is the time complexity of store


What is the time complexity of the top-down approach? and reuse?
Neelima Gupta MCSC 101: Design and Analysis of Algorithms January 24, 2022 3/5
DP Paradigm

Recursion with highly overlapping subproblems.


Total number of subproblems is small (polynomial).
Table to Save and Re-USe.
Order to generate the table in a Systematic Way.

Neelima Gupta MCSC 101: Design and Analysis of Algorithms January 24, 2022 4/5
Dynamic Programming history

Richard Bellman: Pioneered the systematic study of dynamic


programming in 1950s.
Etymology
Dynamic programming = planning over time.
Secretary of Defense had pathological fear of mathematical
research.
Bellman sought a ‘dynamic’ adjective to avoid conflict.

Neelima Gupta MCSC 101: Design and Analysis of Algorithms January 24, 2022 5/5

You might also like