CSE 431/531 Homework 6 Due date: May 4, 2016 Lecturer: Shi Li Your University ID: Your Name: Problems Max. Score Your Score 1 10 2 10 3 15 4 15 Total Score 40 Problem 1 (10 points). Consider the following network flow instance (G = (V, E), c, s, t). The current s-t flow f is also indicated in the figure. (The first number on each edge e is f (e) and the second number is c(e). ) Draw the residual graph Gf , with residual capacities on edges. 5/5 4 2 6 0/ 11/13 1/3 8/8 4/ 2/ s 3/4 2 /1 10 t 6 /1 14 Problem 2 (10 points). Consider a bipartite graph G = (L ∪ R, E), where |L| = |R| = n. For every X ⊆ L of vertices, define N (X) = {v ∈ R : ∃u ∈ X s.t. (u, v) ∈ E}. Prove the following statement: there is a matching of size b between L and R in G, if and only if for every set X ⊆ L, we have |N (X)| ≥ |X| − n + b. Problem 3 (15 points). In the global min-cut problem, we are given a connected graph G = (V, E), we want to find the minimum size set F ⊆ E such that (V, E \ F ) is disconnected. Show that how to solve the global min-cut problem by solving O(n) maximum-flow instances. (In the course slides, you can find an algorithm that solves O(n2 ) maximum-flow instances.) Problem 4 (15 points). Suppose we are given a set of n boxes; each box i is specified by its height hi , width wi , and depth di . A box i can be placed inside another box j if hi < hj , wi < wj and di < dj , i.e, the height, width, and depth of box i are respectively smaller than the height, width, and depth of box j (rotations are not allowed). Boxes can be nested recursively. That is, we can place box i in box j, and then place box j in box k. However, we are not allowed to put box i and box j directly in box k (without putting i inside j or putting j inside i), no matter how large box k is. We call a box visible if it is not inside another box. Let b ≥ 1 be an integer. Design an efficient algorithm to check if the boxes can be nested so that the number of visible boxes is at most b. For example, if we have 5 boxes with dimensions 1 (3, 1, 1), (1, 2, 2), (4, 3, 3), (2, 4, 4), (5, 5, 5) respectively, then, we can nest the boxes so that there are only 2 visible boxes: 1 → 3 → 5 and 2 → 4. Hint: reduce the problem to the circulation of demands with lower bound problem. For every box i, you can create two vertices vi and ui and an edge ei = (vi , ui ). Both the lower bound and the upper bound on f (ei ) are 1. (This problem comes from Problem 3 in http://jeffe.cs.illinois.edu/teaching/algorithms/notes/25-maxflowext.pdf.) 2