sol4 - Massachusetts Institute of Technology Handout 10...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Massachusetts Institute of Technology Handout 10 6.854J/18.415J: Advanced Algorithms Friday, October 9, 2009 David Karger Problem Set 4 Solutions Friday, October 9, 2009 Problem 1. First, we go through the elements in Y . For all d ij given in Y , we reduce r i by d ij and c j by d ij . In other words, we set r i = r i j d ij and c j = c j i d ij , where d ij is given in Y . Next, we construct a graph. We create vertices for each of the rows R i and columns C j along with a source s and sink t . We draw edges from the source to each of the rows R i with capacity equal to the adjusted row sum. That is to say, we draw the edge ( s,R i ), with u ( s,R i ) = r i . Then we draw edges ( C j ,t ) from each of the column vertices C j to the sink t with capacities u ( C j ,t ) = c j . Finally, we draw edges from all rows R i to columns C j with u ( R i ,C j ) = provided that d ij wasnt given in Y . If d ij was given, we do not draw the edge ( R i ,C j ). For example, suppose Y is empty. Then we can draw the graph as follows: R 1 R 2 R p mmm s C 1 C 2 C q mmm t r 1 r 2 r p c 1 c 2 c q Claim 0.1 Consider a flow f on the graph. This flow corresponds to a solution to the matrix and all the constraints if and only if f = i r i and is feasible. Proof. ( ) Suppose there is a solution { d ij } to the matrix. Then we claim that f ( s,R i ) = r i , f ( R i ,C j ) = d ij , and f ( C j ,t ) = c j provides a feasible flow. It is fairly obvious that f = i r i , as we saturated all the edges leaving s . Next, we just need to show that the flow is feasible. Consider the vertex representing the row R i . We know that j d ij = r i as we satisfy our matrix constraints. Thus, if we send r i flow to R i , we can send (exactly) the d ij flow necessary along the edge ( R i ,C j ) (these edges have infinite capacity). Thus, we are in accord with the capacity and conservation conditions. Similarly for C j . 2 Handout 10: Problem Set 4 Solutions ( ) This direction is also trivial. Just reverse argument from above. If were given a flow, we let d ij = f ( R i ,C j ), then we argue that that is a matrix solution. If we have a flow with f = i r i , then we must be saturating all edges ( s,R i ) and ( C j ,t ). Therefore, we must have j d ij = j ( R i ,C j ) = r i for all i . Similarly, we have i d ij = c j for all j , and the solution is valid. Thus, we can just find a solution to the matrix by finding a max flow on the graph. If the max flow f is not equal to i r i , then there is no solution. If it is, then we proceed to verify each d ij as being protected or unprotected....
View Full Document

This note was uploaded on 11/24/2009 for the course CS 6.854/18.4 taught by Professor Davidkarger during the Fall '09 term at MIT.

Page1 / 8

sol4 - Massachusetts Institute of Technology Handout 10...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online