CS331 Advanced Data Structures – Spring 2016 Homework 7 – 50 points Due: Apr. 13 1. (15 points) (a) Find the maximum flow from s to t in Graph 1 (shown on the next page). Show each augmenting path you use and the resulting residual graph after every other augmenting path (and after the last one if you use an odd number of augmenting paths). Show the final flow graph as well. (b) Specify a minimum cut which corresponds to the maximum flow you found in part (a). Verify that the s-t cut ({s, C, F, G, H}, {A, B, D, E, I, t}) satisfies the equation v(f ) = f (out) (A) − f (in) (A). (c) Suppose you could increase the capacity of one edge in Graph 1. Which such increase would result in the greatest increase in the maximum flow for the graph? Explain how the minimum cut form part (b) helps in finding this edge and show the new flow. 2. (10 points) The Sudzy Soap Company has 8 different sites around the state, and have hired 8 independent inspectors to visit the sites and ensure that all safety codes are being followed. Each site should be visited by one inspector and each inspector should visit only one site. Sudzy has a strict mileage policy, however, and will only allow an inspector to visit a site if it is no more than 30 miles of his/her home (the CEO of Sudzy is rather cheap and doesn’t like paying for gas mileage). The following chart shows the distances between each inspector’s home and the Sudzy Soap sites: Inspectors A B C D E F G H 1 52 1 61 49 55 44 12 49 2 15 69 24 64 31 70 64 33 Sudzy Soap Site 3 4 5 6 59 40 27 65 32 55 59 6 71 50 17 57 71 42 9 46 47 5 40 60 23 56 54 26 13 67 57 33 66 14 31 63 7 49 41 61 56 65 27 25 48 8 44 65 64 22 10 61 54 30 (a) Design a bipartite graph to model this problem and show that all 8 sites cannot be inspected under the current mileage limitations. (b) What is the minimum value for the mileage limit so that all sites can be inspected? 3. (10 points) (a) Find the maximum number of edge-disjoint paths from s to t in Graph 2. Specify a set of such paths. (b) Redo part (a) but now use the undirected version of Graph 2. 4. (10 points) Let G = (V, E) be a tree graph with root s with finite capacities assigned to each edge. Suppose we add an additional vertex t and edges with infinite capacity from all leaves in G to t. Find an O(|V |) algorithm to determine the maximum flow from s to t. 5. (5 points) Graphs can have more than one maximum flow. Let N (G) be the number of maximum flows for graph G = (V, E). Show that for any positive integer k you can find a graph where N (G)/|V | > k. Graph 1 4 5 D H G H 2 @ @ 6@ H HH3 @ 3 @ @ H 3 @ 4 @1 H @ A 6 HH@ @ @ R @ R @ R @ j H 5 1 6 s t E H * @ 6@ 2 10 @ @8 3 1 @ @ 4 ? @ @ R @ R @ 1 9 C F I 7 B Graph 2 - D G HH * @ H HH @ H HH@ ? H@ R @ j H - E - H - t s B @ @ 6@ @ @ @ @ @ @ @ @ R @ R @ @ R @ C F I A