Dynamic programming - People
Chapter6DynamicprogrammingInthepreceding chapterswehaveseensomeelegantdesignprinc iples such asdivide-and-conquer, graphexploration,andgreedychoice thatyieldde nitivealgorithmsfora varietyofimportantcomputationaltasks. Thedrawback ofthesetoolsis thattheycanonlybeusedonveryspeci ctypesofproblems. We nowturntothetwosledgehammersofthealgorit hmscraft,dynamicprogrammingandlinearprog ramming, techniquesof , thisgeneralityoftencomeswitha costinef ,revisitedAttheconclusionofourstudyofsho rtestpaths(Chapter4),weobservedthatthepr oblemisespeciallyeasyindirectedacyclicgr aphs(dags).Let's recapitulatethiscase, becauseit liesattheheartof a dagis thatitsnodescanbelinearized; thatis, theycanbearrangedona linesothatalledgesgofromlefttoright( ).To seewhythishelpswithshortestpaths, supposewewantto gureoutdistancesfromnodeStotheothernodes . Forconcreteness, let's focusonnodeD. Theonlyway togettoit is daganditslinearization(topologicalorderi ng).
S.Dasgupta,C.H.Papadimitriou,andU.V.Vazirani 171 Figure 6.2 The dag of increasing subsequences. 5 2 8 6 3 6 9 7 In this example, the arrows denote transitions between consecutive elements of the opti-
Download Dynamic programming - People
Information
Domain:
Source:
Link to this page:
Please notify us if you found a problem with this document: