Homework 4

Due Thursday, October 20
5 points.
  1. (1 points) How do you find an augmenting path in the Edmonds-Karp algorithm for maximal flows?

  2. (1 point) What is an amortized run time?

  3. (2 points) What is the amortized run time for an increment operation in a binary counter? Explain your answer.

  4. (1 point) Suppose you implement a data structure using an array. Whenever you add an entry and the array is not big enough you create a new array whose size is one entry larger than the old array. Then you copy the entries from the old array to the new array before adding the new entry. What is the run time for this operation?

  5. (1 point) Suppose you implement a data structure using an array as in the previous problem except that when you create the new array its size is twice the size of the old array. What is the amortized run time for this operation?