answersLogoWhite

0


Best Answer

Dynamic programming is a technique for solving problem and come up an algorithm. Dynamic programming divide the problem into subparts and then solve the subparts and use the solutions of the subparts to come to a solution.The main difference b/w dynamic programming and divide and conquer design technique is that the partial solutions are stored in dynamic programming but are not stored and used in divide and conquer technique.

User Avatar

Wiki User

14y ago

Still curious? Ask our experts.

Chat with our AI personalities

FranFran
I've made my fair share of mistakes, and if I can help you avoid a few, I'd sure like to try.
Chat with Fran
TaigaTaiga
Every great hero faces trials, and you—yes, YOU—are no exception!
Chat with Taiga
EzraEzra
Faith is not about having all the answers, but learning to ask the right questions.
Chat with Ezra
More answers
User Avatar

Aanya Verma

Lvl 6
2y ago

To address a variety of optimization issues, dynamic programming is a well-liked algorithmic method. It is especially useful for problems that exhibit overlapping subproblems and optimal substructure. There are two main properties that characterize a good dynamic programming problem: optimal substructure and overlapping subproblems.

Overlapping Subproblems:

If an issue can be divided into smaller subproblems that are solved more than once, it has overlapping subproblems. In other words, if we solve the same subproblem multiple times, we are wasting computational resources.

For example, consider the problem of computing the nth Fibonacci number. We can compute the nth Fibonacci number using the formula F(n) = F(n-1) + F(n-2). However, this approach involves recomputing many of the same subproblems multiple times. For instance, when computing F(n-1) and F(n-2), we are recomputing the values of F(n-3), F(n-4), and so on.

Dynamic programming solves this problem by storing the solutions to subproblems in a table or an array. This way, we can avoid recomputing the same subproblems multiple times and instead retrieve their values from the table. This is known as memoization and is a key aspect of dynamic programming.

Optimal Substructure:

A problem exhibits optimal substructure if an optimal solution to the problem can be constructed from optimal solutions to its subproblems. In other words, if we can break down the problem into smaller subproblems, and we know the optimal solution to each subproblem, then we can use these solutions to build the optimal solution to the original problem.

For example, consider the problem of finding the shortest path between two points in a weighted graph. If we know the shortest path between two intermediate points in the graph, we can use this information to determine the shortest path between the original two points. This is so that the shortest path between intermediate locations can be determined, which is a subproblem of the main problem of finding the shortest path between two points.

In summary, a good dynamic programming problem exhibits both optimal substructure and overlapping subproblems. The optimal substructure property allows us to break down the problem into smaller subproblems and construct an optimal solution from optimal solutions to its subproblems. The overlapping subproblems property allows us to avoid recomputing the same subproblems multiple times and instead store their solutions in a table or array. We can create effective algorithms to address a variety of optimization issues by taking advantage of these characteristics.

User Avatar

Add your answer:

Earn +20 pts
Q: What are the two properties that characterise a good dynamic programming problem?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What are the two applications of dynamic programming?

1)Multistage graph 2)Travelling salesman problem


How can the coin change problem be solved using dynamic programming?

The coin change problem can be solved using dynamic programming by breaking it down into smaller subproblems and storing the solutions to these subproblems in a table. This allows for efficient computation of the optimal solution by building up from the solutions to simpler subproblems.


Advantages and disadvantages Dynamic programming?

Dynamic programming is a method for solving complex problems by breaking them down into simpler subproblems and solving each subproblem only once, storing the solutions in a table to avoid redundant calculations. The advantages of dynamic programming include efficient solution to complex problems, optimal substructure, and the ability to solve problems with overlapping subproblems. However, dynamic programming can be challenging to implement, requires careful problem decomposition, and may have high space complexity due to storing solutions in a table.


What is difference between linear and dynamic programming?

Dynamic programming (DP) has been used to solve a wide range of optimizationproblemsWhen solving a problem using linear programming, specific inequalities involving the inputs are found and then an attempt is made to maximize (or minimize) some linear function of the inputs.


What is the minimum coin change problem and how is it typically approached in the field of computer science?

The minimum coin change problem is a mathematical problem where the goal is to find the fewest number of coins needed to make a certain amount of change. In computer science, this problem is typically approached using dynamic programming algorithms, such as the greedy algorithm or the dynamic programming algorithm, to efficiently find the optimal solution.


Advantages of dynamic programming?

Dynamic programming enables you to develop sub solutions of a large program.the sub solutions are easier to maintain use and debug.And they possess overlapping also that means we can reuse them.these sub solutions are optimal solutions for the problem


How can one effectively implement dynamic programming in problem-solving techniques?

To effectively implement dynamic programming in problem-solving techniques, break down the problem into smaller subproblems, store the solutions to these subproblems in a table, and use these solutions to solve larger subproblems. This approach helps avoid redundant calculations and improves efficiency in finding optimal solutions.


What is dynamic programming?

Dynamic programming is a technique for solving problem and come up an algorithm. Dynamic programming divide the problem into subparts and then solve the subparts and use the solutions of the subparts to come to a solution.The main difference b/w dynamic programming and divide and conquer design technique is that the partial solutions are stored in dynamic programming but are not stored and used in divide and conquer technique.


What is the relation between problem and programming?

Problem -> Programming Programming can be a solution to a problem. If you have a problem and it can be solved by a computer program, so you can create such a program - so you can solve this problem by programming.


What do you understand by linear programming problem?

1. What do you understand by Linear Programming Problem? What are the requirements of Linear Programming Problem? What are the basic assumptions of Linear Programming Problem?


How can the traveling salesman problem be efficiently solved using dynamic programming?

The traveling salesman problem can be efficiently solved using dynamic programming by breaking down the problem into smaller subproblems and storing the solutions to these subproblems in a table. This allows for the reuse of previously calculated solutions, reducing the overall computational complexity and improving efficiency in finding the optimal route for the salesman to visit all cities exactly once and return to the starting point.


What do you understand by linear programming?

1. What do you understand by Linear Programming Problem? What are the requirements of Linear Programming Problem? What are the basic assumptions of Linear Programming Problem?