ADS
Algorithms and Data Structures
Loading...
Searching...
No Matches
algorithm Directory Reference

Files

 
AkraBazzi.h
 The recurrences of divide et impera with parts of different sizes, \( T( n ) = \sum_{i=1}^k a_i T( b_i n ) + g( n ) \), \( a_i > 0 \) and \( 0 < b_i < 1 \), which the master theorem [see MasterTheorem.h] does not cover when the \( b_i \) differ, e.g., \( T( n ) = T( n / 5 ) + T( 7 n / 10 ) + n \) of the selection in linear time.
 
BinaryCounter.h
 The binary counter of \( k \) bits of the amortized analysis: \( A[ 0 ] \) is the least significant bit, and add() increments the counter modulo \( 2^k \).
 
Hanoi.h
 The towers of Hanoi: moving \( n \) disks from the peg source to the peg dest, one at a time and never on a smaller one, with the peg middle as a spare.
 
MasterTheorem.h
 The solutions of the recurrences of section 2.9, as orders of growth \( \Theta( c^n n^p \log^q n ( \log \log n )^r ) \) [see Growth]:
 
MaximumSegments.h
 The segments (subarrays) of largest sum and their variants, of chapter 2 (A Warm-up) of the Pearls of Ferragina: the gains of a stock as the differences of its quotations, and the regions of a DNA sequence rich in C and G.
 
MonteCarlo.h
 Monte Carlo algorithms of chapter 17, quick and wrong with a bounded probability, which \( K \) independent runs lower to its \( K \)-th power:
 
Paradigms.h
 The general schemes of the techniques of design of algorithms, beyond the book, as functions of the parts that make a technique concrete.
 
SequenceQueries.h
 Questions on a sequence that a sort or a single scan answers faster than the comparison of all the pairs: the smaller items on the right of each item, the longest run with few distinct items, the longest stretch that a set of intervals leaves uncovered, and the cheapest matching of two sets of points on a line.
 
Subsequences.h
 Two problems on a sequence \( A[ 0 .. n - 1 ] \) solved by the dynamic programming of chapter 13: