Assignments should be submitted as described in HWinstructions.html (for written assignments). Due: 20 Sep 2004, by 5 pm.
n2 + n + 1 is O(n2), using definition 1 directly. Give constants c and N that satisfy the definition.
n2 - n - 1 is Theta(n2), using definition 3 directly. Give constants c1, c2, and N that satisfy the definition.
log2 n, for an input of size n. If the the time taken on input of size m is s seconds, then what is the running time on an input of size 4m? (Your answer will be some function of s.)
n insertions into a vector, if the capacity of the vector were made three time the current capacity, whenever an insertion would cause the current capacity to be exceeded. Assume that the initial capacity is 1.
Last modified: 14 Sep 2004