Dynamicprogramming
In the preceding chapters we have seen some elegant design principles—such as divide-andconquer, graph exploration, and greedy choice—that yield definitive algorithms for a variety of important computational tasks. The drawback of these tools is that they can only be used on very specific types of problems. We now turn to the two sledgehammers of the algorithms craft, dynamicprogrammingandlinearprogramming, techniquesofverybroadapplicability that can be invoked when more specialized methods fail. Predictably, this generality often comeswithacostinefficiency.