CS 411 Fall 2025 > Outline for November 10, 2025
CS 411 Fall 2025
Outline
for November 10, 2025
Outline
Iterative Improvement [L Ch 10 Intro]
- What It Is
- Note: I consider Iterative Improvement in a somewhat more general form than the text.
- Way of dealing with optimization
- Finding an optimal solution [considered in the text].
- Finding a good enough solution.
- Finding the best solution that resources (e.g., time) allow.
- Method:
- Find a feasible solution.
- Repeat: if possible, improve the feasible solution.
- Stop when some condition is met.
- When to Stop
- When no improvements can be found [considered in the text].
- When a good enough solution has been found.
- Resource exhaustion (e.g., time limit).
- Challenges
- Finding a feasible solution to start with
- Sometimes we can start with a trivial solution (all zeroes?).
- What improvements do we allow?
- Distinguishing a local optimum from a global optimum.
- Does “no improvements found” mean “we have an optimal solution”?
- Finding a feasible solution to start with
Maximum Flow [L 10.2]
- Introduction
- Flow network:
- A digraph.
- A postitive integer on each arc: the arc’s capacity.
- There is exactly one source: vertices with no arcs entering.
- There is exactly one sink: vertices with no arcs leaving.
- Feasible flow in a flow network:
- An assignment of a nonnegative number to each arc: the flow on that arc.
- The flow on each arc is at most the arc’s capacity.
- Flow conservation requirement: for each vertex other than the source and the sink, the total flow on entering arcs is equal to the total flow on leaving arcs.
- Value of a feasible flow: the total flow leaving the source (= the total flow entering the sink).
- Maximum Flow Problem: given a flow network, find a feasible flow with the greatest possible value.
- Flow network:
- Augmenting-Path Method
- Initial flow is zero on every arc.
- Repeat
- In the digraph, find a directed path from the source to the sink: an augmenting path. If one cannot be found, then stop.
- Increase the flow on each arc in this path by the minimum of the capacities of all the arcs.
- Create a revised flow network showing how the resulting flow can be modified. Reduce capacities, eliminate arcs whose capacity is now zero, and add back arcs as necessary.
- Max-Flow Min-Cut Theorem
- When the Augmenting-Path Method is finished, the vertices reachable from the source vs. those that are not, form a cut. The total capacity of the arcs across this cut, from the source side to the sink side, equals the value of the flow that has been constructed.
- Theorem (Max-Flow Min-Cut Theorem). The maximum value of a feasible flow is equal to the minimum capacity of a cut.
- Finding an Augmenting Path
- Augmenting paths are easy to find, but some ways of finding them result in the A-P method performing poorly.
- A good way: BFS beginning at source.
- Analysis
- It is known that, if augmenting paths are found via BFS, then at most \(\frac{|V|\cdot|E|}{2}\) augmentations are required, if capacities are all integers.
- Let basic ops be single-item operations. A BFS using adjacency lists is \(\Theta(|V|+|E|) = \Theta(|E|)\) for a connected graph.
- Result: A-P method is \(\Theta(|V|\cdot|E|^2)\).