0% found this document useful (0 votes)
4 views8 pages

5 Dynamic Programming - OBST - Coin Change

Dynamic Programming (DP) is a method for solving complex problems by dividing them into smaller, overlapping subproblems and storing their solutions to enhance efficiency. It employs two main techniques: the Top-Down Approach (Memoization) which stores solutions to avoid recalculations, and the Bottom-Up Approach (Tabulation) which builds solutions iteratively from the smallest subproblems. DP is widely used in fields like computer science, operations research, and artificial intelligence for optimization tasks.

Uploaded by

siddmehta21
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views8 pages

5 Dynamic Programming - OBST - Coin Change

Dynamic Programming (DP) is a method for solving complex problems by dividing them into smaller, overlapping subproblems and storing their solutions to enhance efficiency. It employs two main techniques: the Top-Down Approach (Memoization) which stores solutions to avoid recalculations, and the Bottom-Up Approach (Tabulation) which builds solutions iteratively from the smallest subproblems. DP is widely used in fields like computer science, operations research, and artificial intelligence for optimization tasks.

Uploaded by

siddmehta21
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

Dynamic Programming

Introduction to Dynamic Programming

Dynamic Programming (DP) is a technique for solving complex problems by breaking them down into
smaller, overlapping subproblems. It stores solutions to subproblems to avoid redundant
calculations, making it efficient for optimization problems.

DP is useful in problems where the goal is to find the most optimal solution among all possible
solutions. It is commonly applied in areas such as computer science, operations research, and
artificial intelligence.

Techniques to Solve Dynamic Programming Problems

1. Top-Down Approach (Memoization)

• This approach starts solving the problem by breaking it into subproblems.

• If a subproblem is already solved, return the stored solution instead of recalculating.

• This technique is called Memoization because previously computed values are stored in a
lookup table.

2. Bottom-Up Approach (Tabulation)

• This approach solves the problem iteratively by first solving the smallest subproblems and
gradually building up the solution for the main problem.
• The subproblem results are stored in a table (array) and used to compute larger solutions.

• This avoids recursive function overhead, making it more efficient.

You might also like