Your SlideShare is downloading. ×
0
Dynamic programming 2
Dynamic programming 2
Dynamic programming 2
Dynamic programming 2
Dynamic programming 2
Dynamic programming 2
Dynamic programming 2
Dynamic programming 2
Dynamic programming 2
Dynamic programming 2
Dynamic programming 2
Dynamic programming 2
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Dynamic programming 2

486

Published on

Published in: Technology, Education
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
486
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
34
Comments
0
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. Dynamic Programming 1
  • 2. Dynamic Programming (DP) • It is a method for solving complex problems by breaking them down into simpler sub problems. • It is applicable to problems exhibiting the properties of overlapping subproblems which are only slightly smallerand optimal substructure 2
  • 3. • When applicable, the method takes far less time than naive methods. • In terms of mathematical optimization, dynamic programming usually refers to simplifying a decision by breaking it down into a sequence of decision steps over time 3
  • 4. 4 Application domain of DP • Optimization problem: find a solution with optimal (maximum or minimum) value. • An optimal solution, not the optimal solution, since may more than one optimal solution, any one is OK.
  • 5. 5 Typical steps of DP • Characterize the structure of an optimal solution. • Recursively define the value of an optimal solution. • Compute the value of an optimal solution in a bottom-up fashion. • Compute an optimal solution from computed/stored information.
  • 6. Steps of Dynamic Programming (DP) 1)Dynamic programming design involves 4 major steps: – Develop a mathematical notation that can express any solution and subsolution for the problem at hand. – Prove that the Principle of Optimality holds. 2)Develop a recurrence relation that relates a solution to its subsolutions, using the 6
  • 7. Steps of Dynamic Programming (DP) math notation of step 1. Indicate what the initial values are for that recurrenec relation, and which term signifies the final solution. 3)Write an algorithm to compute the recurrence relation. • Steps 1 and 2 need not be in that order. Do what makes sense in each problem. 7
  • 8. Dynamic Programming (DP) • Step 3 is the heart of the design process. In high level algorithmic design situations, one can stop at step 3. In this course, however, we will carry out step 4 as well. • Without the Principle of Optimality, it won't be possible to derive a sensible recurrence relation in step 3. 8
  • 9. • When the Principle of Optimality holds, the 4 steps of DP are guaranteed to yield an optimal solution. No proof of optimality is needed. 9
  • 10. 10 Elements of DP • Optimal (sub)structure – An optimal solution to the problem contains within it optimal solutions to subproblems. • Overlapping subproblems – The space of subproblems is “small” in that a recursive algorithm for the problem solves the same subproblems over and over. Total number of distinct subproblems is typically polynomial in input size.
  • 11. Uses of dynamic programming • It is used to solve production,scheduling and employment smoothening problems. • The technique can be applied for allocating the scarce resources to different alternative uses. • The technique is useful to determine the inventory level. 11
  • 12. Uses of dynamic programming • It is used to determine optimal combination of advertising media like TV,Radio,News paper. • It can be used in replacement theory. 12

×