[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.

A decrease-by-a-constant algorithm typically processes its input one element at a time, accumulating a solution as it goes. Such algorithms are often naturally written using iteration rather than recursion.

1. Typical recurrence

The typical recurrence for an algorithm in this class is

which has the solution (see SolvingSums)

For most reasonable functions f, this will just be Theta(n f(n)). So the key to getting a fast decrease-by-a-constant algorithm is to keep the cost of each iteration small.

2. Examples


CategoryAlgorithmNotes


2014-06-17 11:58