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

13y ago
This answer is:
User Avatar
More answers
User Avatar

Aanya Verma

Lvl 6
1y 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.

This answer is:
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


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.


Advantages and disadvantages Dynamic programming?

...........................Advantages and Disadvantages of Dynamc Programming..................Dynamic programming provide a polynomial time solution.also used in that problem in which repetition may occur.Recall that the Dynamic Programming method is applicable when an optimal solution can be obtained from a sequence of decisions......................................................................................By Adnantufail islamia college peshawar.


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


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?


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?


What is the similar property between dynamic programming and greedy approach?

Both are using Optimal substructure , that is if an optimal solution to the problem contains optimal solutions to the sub-problems


What is the relationship between linear programming problem and transportation problem?

you learn linear programming before you learn the transportation problem.


Distinguish between integer programming problem and linear programming problem?

Integer programming is a subset of linear programming where the feasible region is reduced to only the integer values that lie within it.


Why algorithm needs to solve programming problem?

This is the definition of an algorithm - a list of orders of how to solve a given programming problem.