0% found this document useful (0 votes)
18 views1 page

Tut 10 Solution

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
18 views1 page

Tut 10 Solution

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

Birla Institute of Technology and Science-Pilani, Hyderabad Campus

Second Semester 2023-2024


Tutorial-10
Course No CS F364 Course Title: Design and Analysis of Algorithm
Date:15/4/23

General Instructions: Argue logically. Write it in a manner that explains your logic very
clearly. Do not miss steps in between.
Q1.Decide whether the following statement is true or false. If you think it is true then argue why it is so
and if it is false then give a counterexample and explain the example.

1. If f is a maximum s − t flow in G then f satuartes every edge out of s with flow fe = ce .


2. Let G be an arbitrary flow network, with a source s, a sink t, and a poitive integer capacity ce on
every edge e; and let (A, B) be a minimum s − t cut with respect to these capacities {ce : e ∈ E}.
Now suppose we add 1 to every capacity; then (A, B) is still a minimum s − t cut with respect to
these new capacities {1 + ce : e ∈ E}.

Q2 Given a directed graph with one single source vertex s and one single sink vertex t. Describe an
algorithm that finds the maximum number of edge-disjoint paths from s to t. Prove the correctness of
your algorithm.
Q3 [Compre 2022-23] We would like an efficient algorithm for the following task:
Input: A directed graph G = (V, E), where each edge has capacity 1; vertices s, t ∈ V , where s is the
source and t is the sink; a number k ∈ N.
Goal: Find k edges that, when deleted, reduce the maximum s-t flow in the graph by as much as possible.
Consider the following approach:

ˆ Step 1: Compute a maximum (s, t)-flow f for G.


ˆ Step 2: Let Gf be the residual graph for G with flow f .
ˆ Step 3: Define a set S of vertices by (something).
ˆ Step 4: Define a set T of edges by (something).
ˆ Step 5: Return any k edges in T .

1. How could we define the sets S and T in steps 3–4, to get an efficient algorithm for this problem?
2. Is there an algorithm to implement step 1 in O(|V ||E|) time or less? If yes, what algorithm should
we use? If no, why not? Either way, justify your answer.

Solution (a). S = {v ∈ V : v is reachable from s in Gf }. T = {(v, w) ∈ E : v ∈ S, w ∈ / S}. (or: T =the


edges that cross the cut (S, V − S).) Because (S, V − S) is a minimum (s, t)-cut, and by the min-cut
max-flow theorem, its capacity is value (f ). If we remove any k edges from T , then the capacity of the cut
(S, V − S) will drop to value (f ) − k, and it will be a minimum (s, t)-cut in the modified graph. Therefore,
by the min-cut max-flow theorem, the value of the maximum in the modified graph will be value (f ) − k.
(Deleting k edges can’t reduce the value of the maximum flow more than that, so this is optimal.)
(b). Yes. Ford-Fulkerson: the value of the max flow is at most |V | − 1 (since there are at most |V | − 1
edges out of s, each of which can carry at most 1 unit of flow), so Ford-Fulkerson does at most |V | − 1
iterations, and each iteration takes O(|E|) time.
1

You might also like