51
Property Testing and its Connection to Learning and Approximation Oded Goldreich Shafi Goldwasser Dana Ron February 13, 1998 Max-Cut Property Testing by Ori Rosen

Property Testing and its Connection to Learning and Approximation

  • Upload
    senta

  • View
    28

  • Download
    0

Embed Size (px)

DESCRIPTION

Property Testing and its Connection to Learning and Approximation. Oded Goldreich Shafi Goldwasser Dana Ron February 13, 1998 Max-Cut Property Testing by Ori Rosen. Table of Contents. Introduction Definitions Graph Partitioning Algorithm Max-Cut Approximation Algorithm - PowerPoint PPT Presentation

Citation preview

Property Testing and its Connection to Learning and Approximation

Property Testing and its Connection to Learning and ApproximationOded GoldreichShafi GoldwasserDana RonFebruary 13, 1998

Max-Cut Property Testingby Ori Rosen

Table of ContentsIntroductionDefinitionsGraph Partitioning AlgorithmMax-Cut Approximation AlgorithmProperty Testing MCIntroductionDefinition of the max-cut problem:For a graph, a maximum cut is a cut whose size is not smaller than the size of any other cut.Size cut definition:For graph G, the size of a cut is the number of edges between S, a subset of V(G), and the complementary subset.= 3IntroductionWe will see a property testing of Max-Cut.First, we are shown an algorithm that ideally finds the max-cut by cheating with additional information.The above algorithm is then modified to approximate the size of the Max-Cut without further information.Last, well see a usage of the Max-Cut algorithm to test for MC .* We will consider our graphs to be dense (with at least N2 edges), the input graph is given in terms of its adjacency matrix, and a query consists of verifying if the edge (u,v) belongs to E(G).DefinitionsEdge density definition:For a given partition (V1,V2) of V(G), we define (V1,V2) to be the edge density of the cut defined by (V1,V2)

Let (G) denote the edge density of the largest cut in G, meaning it is the largest (V1,V2) taken over all partitions of (V1,V2) of V(G).

DefinitionsG (G) = 6/42 = 6/16G (G) = ?Graph Partitioning AlgorithmWe will now see a quadratic-time graph partitioning algorithm, with running time :

Given a graph G, the algorithm returns a cut with edge density of at least (G) ()*, with probability at least 1 - .

Graph Partitioning AlgorithmLet , and let (V1,,Vl) be a fixed partition of V(G) into l sets of (roughly) equal size.The algorithm constructs a partition (V1,V2) in l iterations.In the ith iteration we construct a partition (V1i,V2i) of Vi .

Observation:Let (H1,H2) be a partition of V(G). Let v in H1 and assume that the number of neighbors of v in H2 is the same or more than in H1, meaning

Then, if we move v from H1 to H2, we cannot decrease the edge density, but we might increase it

=>Graph Partitioning Algorithm

The addition to edge density from new edges brought into the cut from moving v to H2Graph Partitioning AlgorithmExpanding on the previous observation, we will see what happens when we move (N) vertices.In contrast to moving a single vertex, the cut may decrease by O(2N2) per stage.The algorithm is oracle-aided and will work in O(1/) stages. It will be viewed as starting from a partition that matches a Max-Cut, and every stage moves O(N) vertices.The total decrease in cut size is bounded by O((1/)* 2N) = O(N).

10Let X be a subset of V(G) of size N/l (assume integer).Let W = V(G) \ X, and let (W1,W2) be a partition of W induced by (H1,H2).=>Remember, consider (H1,H2) being the Max-Cut.Assume we know for every vertex x in X, |(x)|.Define XUB (UnBalanced) to be the set of vertices that have many more (for example, ( /8)N) neighbors on one side of the partition than on the other, with respect to (W1,W2)In contrast, we define XB = X \ XUB to be the set of balanced vertices.

Graph Partitioning Algorithm

Graph Partitioning Algorithm15263748913101411151216GXWH1H2W1W2XUBXUBXBXBSIMPLE!Graph Partitioning AlgorithmAssume we partition X into (X1,X2) in the following way Vertices in XUB that have more neighbors in W1 are put in X2, and vice versa for W2 and X1.Vertices in XB are placed arbitrarily in W1 and W2.Next we create a new partition

This partition differs from (H1,H2) only in the placement of vertices in X.

Graph Partitioning Algorithm15263748913101411151216GXWH1H2W1W2XUBXUBXBXBX2X1H2H114Graph Partitioning AlgorithmReminder:=> the difference between (H1,H2) and (H1,H2) is only the change in number of edges between vertices in X and vertices in W, and between pairs of vertices in X.From the construction of XUB , the number of edges crossing the cut between vertices in XUB and W cannot decrease.

Graph Partitioning AlgorithmReminder:From the construction of Xb, the number of cut edges between Xb and W can decrease by at most

The number of cut edges between pairs of vertices in X can decrease by at most -

16Graph Partitioning AlgorithmGH1H2H2H1(H1,H2) = 34/162 (H1,H2) = 32/162 15263748913101411151216Graph Partitioning AlgorithmLet X be V1 , let (H1,H2) define a Max-cut, and let the resulting partition we received from the process we just saw be defined by (H11,H21).Assume we continue this process iteratively.During the ith iteration, we process Vi ,given the partition (H1i-1 ,H2i-1) calculated in iteration i-1.The result from this process is that (H1l ,H2l ) is smaller than (H1,H2) = (G) by no more than

GH12H2215263748913101411151216Graph Partitioning AlgorithmV2W12W22W2XBXBXBXUBV3And so onGraph Partitioning Algorithmchoose l = sets U1,,Ul each of size t = (-2 log()-1 ), where Ui is chosen uniformly in V\Vi. Let = .For each sequence of partitions of () = (where for each i, (U1i,U2i) is a partition of Ui ) do:For i = 1l, partition Vi into two disjoints V1i and V2i as follows:For each v in Vi ,If then put v in V2i .Else put v in V1i .Let V1() = V1i , and let V2() = V2i .Among all partitions (V1(), V2()), created in step (2), let (V1(), V2()) be the one which defines the largest cut, and output it.

~~Graph Partitioning AlgorithmThe algorithm we just saw has one little problem we dont know what the Max-Cut is to start from, meaning (H10,H20). Because of this, we dont know if the vertices in V1 are balanced or not.What we can do, is approximate the number of neighbors v has on each side of (W10,W20) by sampling.Graph Partitioning AlgorithmWe will see that if we uniformly choose a set of vertices U1 of size t = poly(log(1/)/) in W0 then with high probability over the choice of U1 there exists a partition (U11,U21) of U1 which is representative with respect to (W10,W20) and V1 :For all but a small fraction of vertices v in V1, the number of neighbors v has in U11, relative to the size of U1, is approx the same as the number of neighbors v has in W10, relative to the size of V(G).This approx is good enough, since when placing vertices in V1 , the most important factor is the location of the unbalanced vertices.Graph Partitioning AlgorithmIf U1 has a representative partition, then we say that U1 is good.How do we know which of the 2t partitions of U1 is the representative one (if one exists)?Easy we try them all.G15263748913101411151216V1W0U1U11U21XBXUBXUBXBV21V11Graph Partitioning AlgorithmG15263748913101411151216Graph Partitioning AlgorithmV2U12U22U2XUBXBXBXUBV22V12V3And so onGraph Partitioning AlgorithmOut of all the partitions of U1, namely (U11,U21), we only need the partition for which -

Denote this (hopefully representative partition) by (U11,U21).Let (V11,V21) be the partition of V1 which is determined by this partition of U1.Let (H11,H21) be the resulting partition of V(G).=> (H11,H21) is the same as (H10,H20) except for the placement of vertices in V1, which is as in (V11,V21).

Graph Partitioning AlgorithmIf (U11,U21) is the representative one (in respect to (W10,W20) and V1), then (H11,H21) is not much smaller than (H10,H20) = (G).Continuing like this, in the ith stage we randomly pick a set Ui , and we determine a partition Vi for each of its partitions.=>Were actually constructing (2t)l =2l*t possible partitions of V(G), one for each partition of all the Uis.Graph Partitioning AlgorithmTo show that at least one of these partitions defines a cut close to the Max-Cut, we only need to make sure that for each i, with high probability, Ui is good with respect to (W1i-1,W2i-1), where the latter partition is determined by the choice of U1 ,,Ui-1 , and their representative partitions (U11,U21),,(U1i-1,U2i-1).

Well see a lemma that formalizes the intuition we saw before on why the algorithm works.Graph Partitioning AlgorithmLemma 1:Let (H1,H2) be a fixed partition of V(G).Then with probability at least (1 - /2) over the choice of = , there exists a sequence of partitions (), such that : (V1(),V2()) (H1,H2) * .

Proof follows.Graph Partitioning AlgorithmLemma Proof:For a given sequence of partitions (), we consider the following l+1 hybrid partitions.The Hybrid (H10,H20) is simply (H1,H2).The ith hybrid partition, (H1i,H2i), has the vertices in Vi+1,,Vl partitioned as in (H1,H2) and the vertices in V1,,Vi as placed by the algorithm.

More precisely, the hybrid partition (H1i,H2i) is defined:

Where for j in {1,2},

Note that in particular (H1l,H2l) is the partition (V1(),V2()).Since the partition of each Vi is determined by the choice of Ui and its partition, the ith hybrid partition is determined by the choice of U1,,Ui and their partitions, but not by the choice nor the partitions of Ui+1,,Ul .

and

Graph Partitioning AlgorithmGraph Partitioning AlgorithmWe shall show that for every 1il, for any fixed choice and partitions of U1,,Ui-1 , with probability at least (1 /2*l) over the choice of Ui , there exists a partition (U1i,U2i) of Ui such that:

Graph Partitioning AlgorithmFor the i-1 hybrid partition (H1i-1,H2i-1), or more precisely, for the partition it induces on Wi-1, and a sample set Ui, let

We say that Ui good with respect to (W1i-1,W2i-1) and Vi if (U1i,U2i) is representative with respect to (W1i-1,W2i-1) and Vi.

Graph Partitioning AlgorithmThat is, (U1i,U2i) is such that for all but a fraction of /8 of the vertices v in Vi the following holds:

Assume that for each i, the set Ui is good with respect to (W1i-1,W2i-1) and Vi .As previously defined, we say that a vertex v is unbalanced with respect to (W1i-1,W2i-1) if

(*)Graph Partitioning AlgorithmThus, if v in Vi is an unbalanced vertex with respect to (W1i-1,W2i-1) for which (*) is satisfied, then

We are then guaranteed that when the partition (U1i,U2i) is used then v is put opposite of the majority of its neighbors in Wi-1. if v is balanced then it might be placed on either side. The same is true for the (at most N/8l) vertices for which (*) does not hold.

Graph Partitioning AlgorithmThe decrease in the size of the cut is affected only by the change of edges between Vi and Wi-1, and between pairs of vertices in Vi. In particular:The number of cut edges between unbalanced vertices in Vi for which (*) is satisfied and vertices in Wi-1 cant decrease.The number of cut edges between unbalanced vertices in Vi for which (*) is not satisfied and vertices in Wi-1 decrease by at most (/8)*|Vi|*2N N2/4l .The number of cut edges between balanced vertices in Vi and vertices in Wi-1 decrease by at most |Vi|*2* N/8 N2/4l The number of cut edges between balanced vertices in Vi decrease by at most |Vi|2 = N2/l2 N2/4l The total decrease is bounded by 3N2/4l . It remains to prove that with high probability a chosen set Ui is good (with respect to (W1i-1,W2i-1) and Vi).We first fix a vertex v in Vi.Let Ui = {u1,,ut} (Reminder Ui is chosen uniformly in Wi-1 = V \ Vi).For j in {1,2}, and for 1k t, define a 0/1 random variable, jk , which is 1 if k is a neighbor of v and k in Wji-1, and is 0 otherwise.Graph Partitioning AlgorithmGraph Partitioning AlgorithmBy definition, for each j, the sum of the jk s is simply the number of neighbors v has in Uji (= Ui Wji-1) and the probability that jk = 1 is (1/N)*|(v) Wji-1 |.By an additive Chernoff bound, and our choice of t, for each j in {1,..,k} -

Graph Partitioning AlgorithmBy Markovs inequality, for each j in {1,2}, with probability at least 1 - /4*l over the choice of Ui, for all but /8 of the vertices in Vi, equation (*) holds (for that j), and thus with probability at least 1 - /2l, Ui is good as required.

Applying the lemma 1 to a Max-Cut of G, we get:With probability at least 1 - /2 over the choice of we have, (V1(),V2()) (G) - * , where (V1(),V2()) is as defined in step 3 of the algorithm.~~~~Max-Cut Approx AlgorithmArmed with the GPA, the Max-Cut approx algorithm is quite straightforward.We uniformly choose a set S of vertices of sizem = ((l*t + log(1/))/2), and run the GPA restricted to this set.Instead of returning the largest cut, the algorithm returns S = {s1,,sm}, a multiset of m/2 ordered pairs, {(s1,s2),,(sm-1,sm)}, for which there exists a cut that maximizes the number of such pairs that are edges in the cut. This is done for technical reasons.Max-Cut Approx algorithmAs step 1 of GPA.Uniformly choose a set S={s1,,sm} of size m = (lt+log(1/)/2).For 1il, let Si = Vi S.Similar to step 2 of GPA, for each of the sequences of partitions() = , partition each Si into two disjoint sets S1i and S2i , and let Sj () = (for j = 1,2). For each partition (S1(),S2()), compute the fraction of cut edges between pairs of vertices (s2k-1,s2k). More precisely, define

Let (S1(),S2()) be a partition for which this fraction is maximized,and output (S1(),S2()).

^~~Max-Cut Approx AlgorithmLemma 2:For any fixed , with probability at least 1 /2 over the choice of S, (S1(),S2()) = (V1(),V2()) *, where (S1(),S2()) and (,) are as defined in step 4 of the Max-Cut approx algorithm.

Proof follows.^~~~~~~Max-Cut Approx AlgorithmLemma 2 proof:Consider first a particular sequence of partitions, ().The key observation is that for every s in S, and for j in {1,2}, s in Sj() s in Vj(). Thus for each sequence of partitions () we are effectively sampling from (V1(),V2()) . Furthermore, by viewing S as consisting of m/2 pairs of vertices (s2k-1,s2k), and counting the number of pairs which are on opposite sides of the partition and have an edge in between, we are able to approx the density of the cut edges.Max-Cut Approx AlgorithmFor 1km/2, let k be a 0/1 random variable which is 1 if (s2k-1,s2k) in E(G), and for jj, s2k-1 in Sj() and s2k in Sj().Then, by definition, (S1(),S2()) = 2/m km/2 k ,and the probability that k = 1 is (V1(),V2()).Hence, by an additive Chernoff bound and our choice of m -^

Max-Cut Approx AlgorithmSince there are 2l*t sequences of partitions of , with probability at least 1 /2, for every sequence of partitions (), (S1(),S2()) = (V1(),V2()) /8, and hence (S1(),S2()) = (V1(),V2()) /4.^~^~~~Property Testing MC Armed with the Max-Cut approx algorithm, we have in hand a property tester for the class MC .Graphs with cut density :MC = {G : (G) }For example, for = , MC1/4 is the group of graphs that contain a cut of at least density .Note that for > testing for -cut is trivial. (why?) For every constant 0 > , there exists a property testing algorithm for MC .

Property Testing MC - ProofLet and let

The testing algorithm runs the Max-Cut approx algorithm algorithm shown earlier, with and as input.Graph G is accepted if and only if .If (G) , then by Max-Cut approx algorithm, G is accepted with pr 1 .If G is accepted with pr > , then (G) - 2 . This implies that G is -close to some G in MC .

47Property Testing MC - ProofLet (V1,V2) be a partition of V(G) such that (V1,V2) - 2 .=> 2|V1|*|V2| ( - 2)N2If 2|V1|*|V2| N2 :To obtain G we simply add edges between vertices in V1 and vertices in V2 until (V1,V2) = (why can we do this?)In this case, dist(G,G) 2 < .Property Testing MC - ProofElse, meaning 2|V1|*|V2| < N2 : We cannot obtain G by simply adding more edges (why?).Instead, we will move vertices from the larger set (assume V1) to the smaller set (assume V2). Then we will have enough room for the extra edges.Property Testing MC - ProofAssume |V1||V1|-|V1| (/)*N=>

And now we can proceed adding edges between V1 and V2 until we reach the cut density required.

The End.