Amortization practice [00T8]

These questions are courtesy of Jeff Erickson.

Suppose we are maintaining a data structure under a series of n operations. Let f(k) denote the actual running time of the kth operation. For each of the following functions f, determine the resulting amortized cost of a single operation. For amortized costs other than \Theta (1), be sure to argue why your cost is also a lower bound, i.e. why it is not possible to do any better. Hints:

  • Start by either making tables of values and looking for patterns, and/or trying to write down a mathematical expression for the total cost f(1) + f(2) + \dots + f(n).
  • If you notice a pattern, you could try proving it using the accounting method.
  • Alternatively, if you are able to write down a mathematical expression for an upper bound on the total cost and simplify it, divide by n to get the amortized cost of a single operation.

Context

Amortized Analysis problems [00T7]