CSL 356: Analysis and Design of Algorithms Ragesh Jaiswal CSE, IIT Delhi Network Flow: Application Min-flow with lower bounds Network Flow: Applications Problem (Min-flow with lower bounds): Given a network graph where each edge e has an integer capacity lower bound l(e). Find an s-t flow with minimum value such that following constraints are met: Lower bound: For all edge e, f(e) ≥ l(e). Flow conservation: For all v≠s,t, fin(v) = fout(v). 1 1 s 100 50 1 t 1 Network Flow: Applications Let f be an s-t flow (not necessarily minimum such flow) such that all the lower bounds are met. Consider the graph G’ where all the edges are reversed and a reversed edge e has a capacity of (f(e) – l(e)). Let f ’ be maximum value t-s flow in G’. Note we have usual capacity constraints now. l(e) f(e)-l(e) Network Flow: Applications Let f be an s-t flow (not necessarily minimum such flow) such that all the lower bounds are met. Consider the graph G’ where all the edges are reversed and a reversed edge e has a capacity of (f(e) – l(e)). Let f ’ be maximum value t-s flow in G’. Claim 1: g=(f-f ’) is a “lower bound” s-t flow. Network Flow: Applications Let f be an s-t flow (not necessarily minimum such flow) such that all the lower bounds are met. Consider the graph G’ where all the edges are reversed and a reversed edge e has a capacity of (f(e) – l(e)). Let f ’ be maximum value t-s flow in G’. Claim 1: g=(f-f ’) is a “lower bound” s-t flow. Proof: Lower bound: For all edges e, g(e)=(f(e) – f ’(e)) ≥ l(e). Flow conservation: For all v≠s,t, gin(v) = gout(v). Network Flow: Applications Let f be an s-t flow (not necessarily minimum such flow) such that all the lower bounds are met. Consider the graph G’ where all the edges are reversed and a reversed edge e has a capacity of (f(e) – l(e)). Let f ’ be maximum value t-s flow in G’. Claim 1: g=(f-f ’) is a “lower bound” s-t flow. Claim 2: g=(f-f ’) is a “lower bound” s-t flow of minimum value. Network Flow: Applications Let f be an s-t flow (not necessarily minimum such flow) such that all the lower bounds are met. Consider the graph G’ where all the edges are reversed and a reversed edge e has a capacity of (f(e) – l(e)). Let f ’ be maximum value t-s flow in G’. Claim 1: g=(f-f ’) is a “lower bound” s-t flow. Claim 2: g=(f-f ’) is a “lower bound” s-t flow of minimum value. Proof: For the sake of contradiction assume there is a flow g’ that is a s-t lowerbound flow and v(g’) < v(g). Consider the flow f ’’ = (f – g’). (f is large enough to ensure that for all e, f(e)-g’(e)>0.) Claim 2.1: f ’’ is a t-s flow in G’. Claim 2.2: v(f ’’) > v(f ’). Network Flow: Applications Maximum Cohesiveness Network Flow: Applications Problem (Maximum cohesiveness): Given a graph G=(V,E), find a non-empty subset S of vertices such that e(S)/|S| is maximized. e(S): Number of edges that have both end vertices in S. e(S)/|S| = 1 Network Flow: Applications We will give an algorithm that checks if there is subset with cohesiveness at least ∆. We will then use this algorithm to find the subset with maximum cohesiveness. Note the algorithm will run in polynomial time. We construct the following network graph G’. There is a vertex corresponding to every vertex in G. There is a vertex vij corresponding to each edge in G. There is a source s and a sink vertex t. Vertex vij has edges to vertex i and j. This has capacity ∞. There is an edge from s to all vertices vij. These edges have capacity 1. There is an edge from every vertex v to t with capacity ∆. Network Flow: Applications We construct the following network graph G’. There is a vertex corresponding to every vertex in G. There is a vertex vij corresponding to each edge in G. There is a source s and a sink vertex t. Vertex vij has edges to vertex i and j. These have capacity ∞. There is an edge from s to all vertices vij. These have capacity 1. There is an edge from every vertex v to t with capacity ∆. 12 1 3 2 2 3 34 5 35 4 G 1 24 s 1 23 ∞ G’ 45 4 5 ∆ t Network Flow: Applications Let (A,B) be a min-cut in G’. Let S be the vertices on the right that are in B. Claim 1: If vij is in A, then both i and j are in A. Claim 2: If i and j is in A, then vij is in A. Claim 3: c(A,B) = |E| - e(S) + |S|*∆ Claim 4: There is a subset S with cohesiveness > ∆ if and only if the min-cut in G’ has capacity < |E|. 12 1 3 2 2 3 34 5 35 4 G 1 24 s 1 23 ∞ G’ 45 4 5 ∆ t End
© Copyright 2025 Paperzz