Define potential function .

- = 2 * num[T] - size[T]
- = 0 immediately after expansion
- approaches size[T] when T gets full
- num[T] size[T]/2, so

Thus, the sum of the amortized costs of n TableInsert operations is an upper bound on the sum of the actual costs.