Docsity

Assignment 4 Problems - Analysis of Algorithms | CS 325, Assignments of Algorithms and Programming

Toggle sidebar
bg1
CS325 Assignment #4, Summer 2009, OSU
This assignment is due on Wednesday, 7/29/2009 at the beginning of class.
For this assignment, you will be allowed to hand-draw your graphs if they are
very neat.
Consider the flow network G= (V, E), depicted below.
s
a b
c t
0/2
0/3
0/3
0/1
0/10/2
edge label:
flow/capacity
1. Run the Edmunds-Karp algorithm to find a max-flow. For each itera-
tion of the algorithm, show the following (refer to the Ford-Fulkerson
example linked on the course web page for an example of what these graphs
should look like):
(a) (4 points) The graph G, the current flow f, and the capacity for each
edge ce. Specifically, edges should be labeled with f(e)/ce, i.e. flow
/ capacity.
(b) (4 points) The residual graph with respect to the current flow, Gf.
(c) (2 points) List the path from sto tin Gfthat your are augmenting,
and the bottleneck capacity in the path.
2. (1 point) What is the value of the flow v(f)? Recall that it is the total
flow out of s.
3. (2 points) Run BFS in the final residual graph starting from sto find the
min-capacity sโˆ’tcut (S, T ). Your answer should consist of a picture of
the cut, and a list of which nodes are in S and T.
4. (1 point) What is the capacity of the cut? Recall the capacity of a cut is
C(S, T ) = X
xโˆˆS,yโˆˆT
cxy
1
pf2

Partial preview of the text

Download Assignment 4 Problems - Analysis of Algorithms | CS 325 and more Assignments Algorithms and Programming in PDF only on Docsity!

CS325 Assignment #4, Summer 2009, OSU

This assignment is due on Wednesday, 7/29/2009 at the beginning of class. For this assignment, you will be allowed to hand-draw your graphs if they are very neat.

Consider the flow network G = (V, E), depicted below.

s

a b

c t

0/

0/

0/1^ 0/

0/2 0/

edge label: flow/capacity

  1. Run the Edmunds-Karp algorithm to find a max-flow. For each itera- tion of the algorithm, show the following (refer to the Ford-Fulkerson example linked on the course web page for an example of what these graphs should look like):

(a) (4 points) The graph G, the current flow f , and the capacity for each edge ce. Specifically, edges should be labeled with f (e)/ce, i.e. flow / capacity. (b) (4 points) The residual graph with respect to the current flow, Gf. (c) (2 points) List the path from s to t in Gf that your are augmenting, and the bottleneck capacity in the path.

  1. (1 point) What is the value of the flow v(f )? Recall that it is the total flow out of s.
  2. (2 points) Run BFS in the final residual graph starting from s to find the min-capacity s โˆ’ t cut (S, T ). Your answer should consist of a picture of the cut, and a list of which nodes are in S and T.
  3. (1 point) What is the capacity of the cut? Recall the capacity of a cut is

C(S, T ) =

xโˆˆS,yโˆˆT

cxy

where cxy is the capacity of edge (x, y), and the sum is taken over only edges going from a node in S to a node in T.

  1. (2 point) You will be given between 0 and 2 points for the overall visual quality of your diagrams.