Question

1) What is dynamic programming? How it is different than divide and conquer solutions? Which of...

1) What is dynamic programming? How it is different than divide and conquer solutions? Which of the problems can be solved with dynamic programming?

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Following is the answer:

Dynamic Programming

  • Dynamic Programming is a technique for solving problems with overlapping subproblems.
  • Each sub-problem is solved only once and the result of each sub-problem is stored in a table.
  • These sub-solutions may be used to obtain the original solution and the technique of storing the sub-problem solutions is known as memoization.
  • Dynamic Programming is like recursion and reuse.
  • Dynamic Programming is similar to Divide and Conquer when it comes to dividing a large problem into sub-problems.
  • But here, each sub-problem is solved only once.
  • There is no recursion in dynamic programming.
  • That is why we store the result of sub-problems in a table so that we don't have to compute the result of the same sub-problem again and again.

While in divide and conquer, It works by dividing the problem into sub-problems, and conquer each sub-problem recursively and combine these solutions.

We face many complex problems where the repetitions of the same subproblem in the recursion take place. To avoid multiple calculations of the subproblem and to save computation time, dynamic programming is used, in which problems are solved by breaking down problems into simpler subproblems, solving each of those subproblems just once, and storing their solutions and reuse it.

example:

  • Fibonacci numbers
  • Binomial Coefficient
  • Longest Common Subsequence
  • Longest Repeated Subsequence
Add a comment
Know the answer?
Add Answer to:
1) What is dynamic programming? How it is different than divide and conquer solutions? Which of...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT