

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!


CSE 202 Homework 4 Network Flow and NP problem sample solutions
Solution This problem can be solved using a straightforward application of network flows. Consider an n n matrix with column sums of ci and row sums ri and unknown elements mi;j. Define a flow network in the following way: a source vertex s with edges to n verticies, vi , with capacities, ri. Similarly, define a sink vertex t with edges to n verticies ui with capacities ci. Then define n^2 verticies, xi;j , with edges (vi ; xi;j ) and (xi;j ; uj ) all of capacity k. An integral maximum flow on this network determines a solution to the matrix problem where the flow along (xi;j ; vi ) = (xi;j ; uj ) = mi;j. (Note that since all capacities are integers the flow algorithms discussed in CLR will return integral flow values) Proof: First, consider a solution to the row-column sum problem. This is a valid flow since no capacities are exceeded:
i mi;j^ =^
i f^ (xi;j^ ;^ vi^ )^ =^ ri^ which is the capacity of all (only one) inputs to vi (similarly for the columns). Further, all mi;j < k , and all flows (vi ; xi;j ) < k and (xi;j ; uj ) < k , so these flows are not exceeded. Second, there exists a cut in the network, G s with value
i ri^. Therefore, we have a valid flow and a cut of the same value and therefore each must be a max-flow/min-cut.
Part (a) proof: Let G = (V ; E ). First, we demonstrate a clique in G(k^ )^ of size l k^ where l is the size of the maximum clique in G. Consider the set of verticies, C 0 = f(v 1 ; v 2 ; : : : ; vk ) : vi 2 C g, where C is a maximum clique in G. Each vertex in C 0 is adjacent to every other vertex since for (v 1 ; : : : ; vk ) and (u 1 ; : : : ; uk ) an edge exists if any ui 6 = vi. The size of C 0 is l k^ and forms a clique in G(k^ )^. We show that there is no larger clique inductively. First, since G (1)^ = G, it is clear for k = 1. Now, assume it is true for all i < k. Consider a largest clique C k in G(k^ )^. Let Ca = f(a; v 2 ; : : : ; vk )j(a; v 2 ; : : : ; vk ) 2 C k^ g for a 2 V. By induc- tion, jCa j l k^ ^1. For a 6 = b, either (a; b) 2 E or for every (a; v 2 ; l dots; vk ) 2 Ca and every (b; u 2 ; : : : ; uk ) 2 Cb , (v 2 ; : : : ; vk ) and (u 2 ; : : : ; uk ) are connected in G(k^ 1)^. If a and b are not connected in G, we will take each vertex of Cb and replace its first component with a. The resulting set of vertices is still a clique of G(k^ 1)^ of the same size since the projections of Ca and Cb onto their last (k 1) components are disjoint. ea replace Cb are indepen first vertex in a tuple of size k , a. The tuple-verticies that begin with a must form a clique on the re- maining k 1 elements (and there are l k^ ^1 of those by the induction). Further, for some other prefix, b, if (a; b) 2 G, then the verticies prefixed by BOTH a and b must form a clique on the remaining verticies. That is, they must share the cliques on (k 1)-tuples. Therefore, if the prefixes are drawn from m verti- cies, and the largest clique is l , then m l edges are missing and m l vertices
must share (k 1)-tuple cliques with another vertex giving us a maximum of m (m l ) l (k^ 1)^ = l l (k^ 1)^ = l k^ verticies in the k -tuple clique.
Part (b)
Given an polynomial c-approximation for MAX-CLIQUE, we can generate a e (for any constant e) approximation by running it on graph G (k^ )^ , where e > c^1 =k and then taking the k -th root of the answer returned. This remains polyno- mial time because the problem is only blown up by a polynomial factor, k = l g (c)=l g (e) which is a constant.