ADS
Algorithms and Data Structures
Loading...
Searching...
No Matches
Optimization

The problems of optimization (knapsack, intervals). More...

Topics

 Theory of optimization
 CoinChange.h
 The change with the fewest coins (introduction of chapter 14).
 CoinGame.h
 The game of the coins in a line.
 FractionalKnapsack.h
 The real (fractional) knapsack of section 14.1.
 GridPaths.h
 Two problems of dynamic programming on a matrix of \( m \) rows and \( n \) columns, each cell solved from its neighbors above and to the left.
 HouseProblems.h
 Two problems of dynamic programming on a row of \( n \) houses, where the choice of each house depends only on the one of its neighbor.
 IntervalCover.h
 The cover of a segment by intervals.
 Intervals.h
 Greedy algorithms on intervals \( [ a_i , b_i ) \) of the line.
 Knapsack.h
 The 0-1 knapsack of section 13.6.
 KnapsackVariants.h
 The relatives of the knapsack in which an item can be taken many times, and the counting versions of the knapsack, all solved by the dynamic programming on the capacity of the 0-1 knapsack of section 13.6, in pseudopolynomial time.
 LinearPartition.h
 The linear partition problem (also the painter's partition, or the bottleneck partition of a chain).
 OptimalSearchTree.h
 The optimal binary search tree.
 SequenceProblems.h
 Problems of optimization on a sequence, solved by a scan or by the dynamic programming of the longest increasing subsequence.
 ShortestJobFirst.h
 Shortest Job First (exercise 14.5).
 StockTrading.h
 The largest gain of buying and selling a stock with at most \( k \), or with exactly \( k \), transactions, given its prices on \( n \) days.
 WeightedIntervals.h
 The independent set of weighted intervals of section 13.2.

Detailed description

The problems of optimization (knapsack, intervals).

The definitions, the invariants and the costs of the area are in Theory of optimization.