Presentation 1: Prepared by Group 15 Aka (Blue Team)
Presentation 1: Prepared by Group 15 Aka (Blue Team)
Presentation
Dynamic Programming (dp)
1
16 December, 2024
Ebrahim
Introduction to Dynamic
Programming (dp)
what happen ?
• Browsers store data like images and
scripts in cache to avoid downloading the
same resources repeatedly.
• Saves time and resources by reusing
previously downloaded data.
What is Dynamic
Programming (dp) ?
Definition
• Dynamic Programming (DP) is not an algorithm or
data structure.
• It is a problem-solving technique that solves
optimization problems by:
⚬ Breaking them into smaller overlapping sub-
problems.
⚬ Storing the results of sub-problems for reuse.
Key Concepts:
• Overlapping Sub-problems
• Optimal Substructure
Key Concepts of Dynamic
Programming
calculating fib(n-1) and fib(n- shortest path from A to C and • Tabulation (Bottom-Up
f(n- f(n-
f(n)
1) 2)
prev prev curre
1 2 nt
Memoization vs. Tabulation in
Fibonacci Sequence
Feature Memoization Tabulation