CS252 Algorithms Wednesday, 9 November 2022 + Later today - Scores up to date, grade status update sent out - If you want your exam before Friday, you can come get it during my Thursday office hours (or if you can catch me some other time Thursday--which might be difficult) + Friday - Wrap-up on network flows - look at the flight scheduling problem in 7.9 - Beginning of "fun miscellaneous algorithms week" (start with the Art Gallery Problem as an entry into Computational Geometry) + Monday - Exam posted - More fun miscellaneous algorithms ==== + Network flows, continued - Definitions: flow network, source, sink, capacity flow, residual graph, augmenting path - Max flow algorithm (Ford-Fulkerson) - Questions: does it terminate?; does it maximize the flow? how long does it take? - Definitions: cut, min cut - Theorem: max-flow, min-cut + Let's try some applications - Bipartite matching as a very simple example - Rooms & classes during 3A - Maximize number of classes with a room - Maximize the number of students with a room + Problem set #6 - Write up the rooms & classes problem - K&T ====== + Algorithm (Ford-Fulkerson) Initialize f to be f(e) = 0 for all e in E Initialize residual graph G_f accordingly while there exists a path P from s to t in the G_f: let "bottleneck" of P be the minimum edge capacity in P push bottleneck's worth of flow onto all edges in P and update f and G_f accordingly