MAXFLOW AND MINCUT STUDY GUIDE
Maxflow, mincut, and Ford-Fulkerson basics
- What is an st-flow f? Assignment of value to every edge.
- What is an st-cut (A, B)? Partition of vertices into two sets A and B,
with s in A and t in B.
- What is the maxflow problem? What is the mincut problem?
- What is the maxflow-mincut theorem?
- How do we find an augmenting path from s to t? BFS, but with the
special rule that we don't traverse a forward edge if full or a backward edge
- Given a maxflow, how can we compute a mincut?
Try to find an augmenting path using algorithm above.
The s side of the st-cut is every vertex reachable from the source.
- How do we know that Ford-Fulkerson terminates when all capacities are integers?
- How do we know that Ford-Fulkerson computes a maxflow (assuming it terminates)?
- What are some different strategies for picking an augmenting path?
Why is DFS potentially very bad?
- Represent spare capacity on each edge, in both forward and backward directions.
- Use mutable FlowEdge instead of immutable DirectedEdge.
- Edge v->w appears in both v's adjacency list and w's adjacency list. Why?
- Fall 2011, #11
- Spring 2012, #11
- Fall 2012, #6
- Textbook 6.36
- Textbook 6.38
The instructors plan to grade the final, May 20. They have scheduled 8
hours for it. Each instructor prefers to grade only a certain subset of the 11 problems. They
have represented their preferences in a graph in which a grader is connected to a problem if
they are willing to grade it.
Each grader has a grading speed, and each problem has a grading difficulty. If a problem with
difficulty d is graded by an instructor with speed s, it will take d/s minutes to grade. There
are N problems and M instructors; S students took the exam.
Design an algorithm to determine if the instructors will be
able to finish grading within the scheduled 8 hours, respecting their grading preferences.
What is the order-of-growth worst-case running time of your algorithm
as a function of both M and N?
Assume that the speeds and difficulties are integers between 1 and 10. Also, assume that the
work for a problem can be divided among different graders.
Hint: formulate it as a maxflow problem and invoke a known algorithm for solving maxflow.
Draw the resulting flow network to illustrate your construction.
Create a digraph with one vertex for each problem and one for each grader, as shown. The source →
problem capacities represent the grading effort needed for each problem. The grader → sink
capacities represent the grading capability of each instructor in 8 hours. The problem →
grader edges are as in the input graph and have infinite capacity.
Run the Ford–Fulkerson algorithm and check whether
the value of the maxflow equals ∑(i=1, N) di
If it is equal, it means the grading effort needed for each problem can be partitioned among the instructors
without any instructor exceeding their 8-hour grading capability.
The running time is V E2
with the shortest-augmenting-path heuristic. Here V = M + N + 2
and E ≤ MN + M + N, the running time is M2
(M + N).
- Textbook 6.37