Saint Louis University |
Computer Science 314
|
Dept. of Math & Computer Science |
Topics: Network Flow
Related Reading: Chapters 26 of CLRS
Due:
10:00am, Monday, 1 December, 2014
Please make sure to strictly adhere to the stated course procedures regarding the format of your submitted homework. In particular, your name should not appear on anything other than the cover page, and your solution for each problem must be in a separate packet, labeled appropriately with your assigned codename.
You must also adhere to the policies on academic integrity, paying particular attention to the limits on collaboration.
Consider the following graph:
You are to simulate the Edmonds-Karp algorithm for computing the
maximum flow from s to t. To succinctly
describe the process, list each augmenting path that is used, in
the order considered by the algorithm, including the sequence of
vertices on the path (e.g., sefgt) and the amount of flow
that is augmented along that path.
Let f be a maximum flow for a network G, and let e be some edge of the graph for which the nonzero flow, f(e), is equal to the edge capacity, c(e). Assuming that you have already computed the maximum flow f for G:
Explain how to efficiently compute a new maximum flow f + for a graph G + that results when increasing the capacity of edge e by 1 unit.
Explain how to efficiently compute a new maximum flow f - for a graph G - that results when decreasing the capacity of edge e by 1 unit.
One of the network flow applications that we examined during class was a contest problem titled "Collector's Problem" (linked here). During class I sketched the following reduction from that problem to network flow.
You are to demonstrate your understanding of this reduction by completing the following tasks:
Draw the precise graph that results from the second test case given in the programming contest sample output, including all edge capacities.
Clearly identify the flow across each edge of that example network for some maximum flow. (Note that the maximum flow might not be unique.)
You are in charge of creating a schedule for the employees of
your store. You have w employees who work at the store, and
you have s shifts that must be covered during the week, with a
requirement that there be two employees for each
shift. Furthermore, you have created a survey in which each
employee has indicated which shifts he or she would be able to
work, and an absolute limit on the maximum number of shifts
that he or she is willing to work. For the purpose of notation,
we number the shifts
Your goal is to produce a feasible assignment of employees to shifts respecting the employee's constraints (or to determine that it is impossible). Explain how to reduce this problem to maximum flow, making sure to outline:
Professor Wishful claims that if cut
Note: It should be clear that the capacity of that cut is larger in G+ than in G, but the question is whether the cut itself (i.e., the division of nodes) remains the minimum cut in G+.
Assume that you have a network that is designed to move k units of
flow from source s to destination t, with each edge having
capacity 1. An attacker is able to destroy the
After the attack, your job is to report back to your boss the complete set of all vertices that are unreachable from s. As your only tool, you are allowed to call ping(v) for any vertex v, to determine if that vertex is currently reachable from s. So clearly, you could use |V| ping calls to analyze the connectivity. However, we wish for you to develop a more efficient algorithm.
Give an algorithm that determines all vertices that are unreachable
from s using only