CS 600 Solutions to Homework 4



6.2 First construct a graph as follows:



1. Create a vertex for each shift and each department.
2. Add a source and a sink.
3. Connect the sink to each "shift" vertex with the lower bound equal to the lower bound of the number of nurses for the shift and upper bound infinity.
4. Connect each "department" vertex to the sink with the lower bound equal to the lower bound of the number of nurses for the department and upper bound infinity.
5. Connect each "shift" vertex to each "department" vertex with the weights given in the matrix. For example, vertecx shift 1 is connected to vertex departmnent 1 with lower bound 6 and upper bound 8.
6. Find the minimum source to sink flow. The flow through "shift" to "department" arc gives the number of nurses to be assigned for the corresponding "shift" and "department".

You can also solve this particular instance of the problem as a feasible flow problem (think about it).

6.3

1. Construct a new network N by replacing each edge {i,j} of G with two arcs in opposite directions each with capacity $u_{i,j}$.
2. Add a vertex to N, and call it t.
3. Connect all the subordinates to t with an arrow with infinite capacity.
4. Apply Edmonds-Karp to find a max flow from p to t.
5. This max flow gives you a min cut, which is one set of links you need to remove to break the communications between the commander and the subordinates with the minimum efforts.
The min cut is the set of arcs that separate the vertices reachable from p from the ones which can reach t in the final residual network.



To prove that it is a min effort cut, use proof by contradiction for example. That is assume that it is not a min effort cut and derive a contradiction.



6.14

First replace each edge of the network with two arcs in opposite directions each with the given capacity for the edge. Thus for example edge {1,2} is replaced by arcs (1,2) and (2,1) each with capacity 4.
Then apply Edmonds-Karp algorithm to find a max flow from 1 to 7.
The rest are similar to 6.3 step 5.