[FrontPage] [TitleIndex] [WordIndex

Note: You are looking at a static copy of the former PineWiki site, used for class notes by James Aspnes from 2003 to 2012. Many mathematical formulas are broken, and there are likely to be other bugs as well. These will most likely not be fixed. You may be able to find more up-to-date versions of some of these notes at http://www.cs.yale.edu/homes/aspnes/#classes.

The canonical DecreaseByConstantFactor algorithm. Given a sorted array, find an element by looking at A[n/2]. If A[n/2] equals the target, we are done. Otherwise continue searching in A[1..n/2-1] or A[n/2+1..n].

The recurrence is

which has solution T(n) = Theta(lg n).

InterpolationSearch is faster on very large inputs for some input distributions.

BinarySearchTrees are BinaryTrees organized to permit binary search.


2014-06-17 11:57