Sie sind auf Seite 1von 4

# Haroon Ashraf Assignment - 2

1. In Hungarian algorithm during the first step we start by providing y(v) = 0 and y(u) =N. Every edge e(u,v), y(u)+y(v)>=w(e) During the dual adjustment step the edges will become tight. Then the weight of maximum weighted matching will be same as the sum of y values of L and R nodes of bipartite graph. The free vertices of R are not changed during this step and the value will remain 0 throughout the algorithm. Free vertices of L will also reduce during each dual adjustment step. In order for maximum weighted matching to happen the weight of the matching should be equal to the sum of Y values of L and R. There for Y values of L should be also zero for all free vertices. Hence all free vertices in L and R have y value zero. We stop when y values of free vertices of L are zero to get maximum matching. The y values of free vertices are reduced by same amount in every steps throughout the algorithm. 2. Decide whether you think each of the following statements are true or false. Justify your answers. a. Let G be an arbitrary flow network with a source s, a sink t and a positive integer capacity c(e) on each edge. If f is a maximum s-t flow in G, then f saturates every edge out of s with flow, i.e., for all edges e out of s, we have f(e)=c(e). Solution: - False. If find a maximum flow f using the ford Fulkerson algorithm, there will be edges with capacity left because the bottleneck value of an s-t path determines the flow than can be send. Example
a 3 S T 5 b 2

Here the flow for the path SaT is 2 since bottleneck of the path is 2 and the flow for path SbT is 4. The maximum flow is 4+2 that is 6. We can see that Sa and bT edges the capacity is not saturated. b. Let G be an arbitrary flow network with a source s, a sink t and a positive integer capacity c(e) on each edge. Let (A, B) be a minimum s-t cut w.r.t. these capacities. Now suppose we add 1 to every capacity, then (A,B) is still a minimum s-t cut w.r.t. these new capacities, i.e., c(e)=c(e)+1 for every edge e. False Example
a 4 4 S c 3 d 4 10 T 3

3
b

The maximum flow possible here are 9. The minimum cut would be 3. If we increase capacity by 1 the maximum flow would be 11 and minimum cut would be one.

3. Algorithm 1) Determine the minimum S-T cut using max-flow/min cut theorem and fordfulkerson algorithm. Let it be x 2) Increase the capacity of all the edges in X by a unit. Let e1,e2 en be the edges of x and for each ei in x we increase the capacity by 1

3) Let new graph be Gi , Run the ford Fulkerson algorithm after each increase 4) Compute the minimum cut. Let it be Xi. Clearly Xi is not same as X since we have increased the capacities and the edges in X are no more the bottlenecks 5) If volume of X and Xi are equal for any of i, then Xi is also a minimum cut. But X and Xi are different hence not unique 6) Graph will have unique minimum cut if volume of X in G is less than Xi for all i in new graph Gi 7) The whole algorithm just takes non exponential time since ford Fulkerson takes polynomial time and other steps can be completed in K steps and hence it completes in polynomial time 4. Algorithm 1) Create a flow network as follows. We have to sets of vertices V and W which represents clients and the base station. 2) All the base stations in W set which are in range of r for the clients in V sets we connect them by an arc of capacity 1. 3) Construct a source S and sink T. The source S is connected to the clients by arcs of capacity 1 and sink is connected to base stations by arcs of capacity L. 4) All clients will be connected to base stations when we have an s-t path of value n since there are n clients. 5) For each connection possible between node and base we send one unit of flow. Thus each client is connected to base if the edge has flow as 1. 6) Compute the maximum flow on the graph using ford Fulkerson algorithm which takes polynomial time 7) The whole algorithm just takes non exponential time and hence it completes in polynomial time

5. 1) Create a flow network as follows. We have to sets of vertices B and A which represents balloons and the set of atmospheric conditions to be measured 2) Construct a source S and sink T. Source S is connected to the A (conditions) with K weight 3) We connect the condition to the balloon with arcs of unit capacity and the balloons to the sink by arcs of weight 2 since a balloon can measure only atmost 2 measurements 4) The maximum flow is calculated using ford Fulkerson algoirthm
A B

1 K

t
K K 1 1 2 1 2