a) What is the worst-case time to find a solution using breadth-first search?
b) What is the worst-case time to find a solution using depth-first search?
c) What is the worst-case space required for the queue in breadth-first search?
d) What is the worst-case space required for the stack in depth-first search?
e) Suppose T is not infinite, and that level s is the highest-numbered level in T. Then what is the worst-case space required for the queue in breadth-first search?
f) Suppose T is not infinite, and that level s is the highest-numbered level in T. Then what is the worst-case space required for the stack in depth-first search?
a) Consider the following Strassen-like divide-and-conquer approach: Instead of finding the four products ac, ad, bc, and bd, find the three products ac, bd, and (a+b)(c+d). Show that if these three products can be found, no other multiplications are necessary.
b) Sketch the resulting divide-and-conquer algorithm in pseudocode. You may assume that n is a power of 2 and that r and s are exactly n bits long.
c) Asymptotically, how many bit multiplications are necessary for your algorithm? Don't worry about the fact that the sum of two n-bit numbers might have n+1 bits instead of n bits.
a) What is the value of the optimal flow for this instance? You needn't use any particular solution algorithm here.
b) What is the minimum cut corresponding to this solution?
c) What linear programming instance corresponds to the given maximum flow instance?
d) Trace either a Ford-Fulkerson algorithm on the given minimum flow instance, or the simplex algorithm for the instance of (c). What are the nonzero values of the flow function f(u,v)? Does the value of the flow f equal the value that you gave in (a)? Does this value equal the flow across the cut that you gave in (b)?