CS271 Radomess & Computatio, Sprig 2018 Problem Set 2 Solutios Poit totals are i the margi; the maximum total umber of poits was 52. 1. Probabilistic method for domiatig sets 6pts Pick a radom subset S of vertices by icludig each vertex of V i S idepedetly with probability p (a value to be chose later). Let T U be the set of vertices i U that are either i S or adjacet to a vertex of S. The clearly S T is a domiatig set for U. Note that a vertex u U belogs to T iff either it or ay of its (at least d) eighbors belogs to S, which happes with probability at most (1 p). Hece the expected size of the domiatig set is E( S T ) = E( S ) + E( T ) p + (1 p) (p + e p() ). Now we choose p so as to miimize this expressio. Differetiatig the term i the paretheses, we see that we wat to take e p() = 1 l(), or p =. Pluggig this ito the above expressio gives E( S T ) log()+1, so we deduce that there must exist a domiatig set of at most this size. Ideed, sice the size of a domiatig set must be a iteger, we kow there exists a domiatig set of size log()+1. 2. Locally 2-colorable graphs (a) Let the r.v. X deote the umber of edges i G. Sice X is the sum of ( idicator r.v. s Xe (oe for each possible edge e), we have by liearity of expectatio EX = ( p = 8( 1). Moreover, sice the X e are idepedet, Var(X) = e Var(X e) = ( p(1 p) < EX. Now Chebyshev s iequality gives Pr[X > 10( 1)] Pr [ X EX > 1 4 EX] Var(X) (EX/4) 2 = 16 EX = 2 1. This fractio is less tha 1 4 for all 9. (b) Fix a colorig; suppose it has r red vertices ad r gree vertices. Let the r.v. Y deote the umber of violated edges. The by liearity EY = ( ) ( r 2 + r ) 2 )p. This expressio is miimized whe r = /2 (assumig is eve), givig EY 2 ( ) /2 2 p = 4(. Now applyig the Cheroff boud to Y with δ = 4 gives Pr[Y 1] Pr[Y 1 4 EY ] exp( 1 2 ( 4 )2 4( ) = exp ( 9 8 ( ). (c) Call a 2-colorig good if it has at most 2 violated edges. Part (b) bouds the probability that ay give colorig is good. Takig a uio boud over all 2 possible colorigs, we get where the last iequality holds for all 9. Pr[ a good colorig for G] 2 exp ( 9 8 ( ) 1 4, Commo Issues: May people forgot to take the uio boud over the 2 possible colorigs. Part (b) oly applies to oe fixed colorig, so this is ecessary.
(d) Let the r.v. Z deote the umber of k-cycles i G. The we ca write Z = C Z C, where the sum is over all possible k-cycles C ad Z C is the idicator r.v. for the evet that C is a cycle i G. Sice C cosists of k edges, we have Pr[Z C = 1] = p k. Also, the umber of possible C is ( ) k! ) k 2k ; here is the umber of ways of choosig the vertices i C, while k! is the umber of vertex orderigs ( k ad 2k accouts for the choice of startig poit ad the sese of traversal of the cycle. By liearity of expectatio, we have EZ = C EZ C = ( ) k! k 2k pk (p) k = 16 k. The expected umber of cycles of legth at most 1 8 log is thus bouded by 1 8 log k= 16 k 16 15 16 1 8 log = 16 15 < 2. (e) By part (d) ad Markov s iequality, we have that Pr[Z 8 ] 1 4. So with probability at least 4, G has at most 8 cycles of legth at most 1 8 log. Now if we delete a (arbitrary) edge from each of these cycles (a total of at most 8 edges), we are left with a graph whose shortest cycle is loger tha 1 8 log. But this implies that ay iduced subgraph o up to 1 8 log vertices is cycle-free, ad hece certaily 2-colorable. (f) Takig a uio boud over the evets i parts (a), (c) ad (e), we deduce that, with positive probability (at least 1 4 ), the radom graph G has all of those properties simultaeously. For such a G, let G be the graph obtaied by deletig at most 8 edges from G, as i part (e). The G has all the followig properties: (i) G has at most 10( 1) edges (by part (a)); (ii) G is ot 2-colorable eve if we delete ay 2 8 edges (by part (c); ote that whe deletig edges to remove cycles we may remove some violated edges); (iii) the iduced subgraph o ay 1 8 log vertices of G is 2-colorable (by part (e)). Fially, observe that (very crudely) 2 8 > 1 1 2 ( 1), which by (i) is at least 20 of the umber of edges i G. Commo Issues: May people failed to take a uio boud over parts (a), (c) ad (e), istead claimig these evets were idepedet. May people also forgot to accout for the 8 edges that were deleted via part (c).. A threshold for isolated vertices (a) For i = 1,...,, let X i be the idicator radom variable for the evet that vertex i is isolated, ad let X = i X i be the umber of isolated vertices. To show that p = l is a threshold, we eed to show the followig two facts: 1. if p l, the Pr[X > 0] 0 as. 2. if p l, the Pr[X > 0] 1 as. [Here, as i lectures, for fuctios f(), g(), f g meas that f()/g() as, ad f g meas that f()/g() 0 as.] Clearly EX = (1 p) 1 =: µ. Note that 8pts l µ = l + ( 1) l(1 p) l ( 1)p. (1) [Here f g meas that f()/g() 1 as.] Thus, as, we have µ 0 if p l ad µ if p l For p l. we immediately have by Markov s iequality that which establishes Fact 1 above. Pr[X > 0] = Pr[X 1] µ 0 as,,
To establish Fact 2, for p l we eed to use the secod momet method, as follows: Pr[X = 0] Pr[ X µ µ] VarX µ 2. Thus it is sufficiet to show that VarX µ 2 0. To do this, ote that EX 2 = i EX 2 i + i j E[X i X j ] = µ + ( 1)E[X i X j ]. Also, for ay i j we have E[X i X j ] = (1 p) 2, ad thus ( 1)E[X i X j ] µ 2 /(1 p). Hece sice µ ad p 0. This establishes Fact 2. VarX µ 2 µ + µ2 /(1 p) µ 2 µ 2 = 1 µ + p 0, ( 1 p (b) If we set p = c l the the above calculatios carry over essetially uchaged. I particular, from (1) above we see that µ 0 if c > 1 ad µ if c < 1. Thus by Markov s iequality we still get that Pr[X > 0] 0 i the former case. Ad i the latter case the calculatio i ( still holds as well, so we get Pr[X = 0] 0 i this case. This shows that the threshold is sharp; the Note i the problem set tells you that the width of the scalig widow is actually 1. 4. Plated cliques ad cryptography (a) Cosider the set of pairs (C, G) where C is a set of k vertices, ad G is a graph. Each pair uiquely correspods to a specific derivatio of a graph i G,1/2, where G is the graph chose accordig to G,1/2, ad C is the set of k vertices chose to become a clique. Clearly each pair is equally likely, arisig with probability ( k) 12 (, where the first term is the probability of selectig C, ad the secod is the probability of choosig G, sice all graphs are equally likely i G,1/2. For a give graph G, the umber of pairs (C, G) which would give rise to it is f(g )2 (k, sice C must be oe of the cliques of G, ad give the choice of C, G ca have ay subset of the ( k edges betwee vertices i C. Thus Pr [G ] = f(g )2 (k ( ) 12 ( k = f(g ) Pr[G ] µ. Commo Issues: May people simply claimed that the umber of graphs G that could have give rise to a graph G (i G,1/ is f(g )2 (k. This is ot true: to see a silly example, let G be a graph cosistig of two disjoit k-cliques; the the umber of graphs that could have give rise to G is 2 2 (k 1. To see why the 1 is there, ote that for either choice of the clique to add, there are 2 ( k possible graphs that could have yielded G ; however, we are double-coutig the graph G, sice that graph could have give rise to G uder either choice of which clique to add (because o ew edges are eeded). Whe coutig, oe must be careful to avoid double-coutig! (b) By Chebyshev s iequality, we have Pr[G is α-bad] Pr[ f(g) µ > ( α 1)µ] E(f 2 ) µ 2 ( α 1) 2 = O(c log ) ( α 1) 2, where i the last step we used the give upper boud o E(f 2 ) µ 2. For large eough, this last expressio is bouded above by 2α+c+ɛ for ay ɛ > 0. (c) For B j defied as i the hit, we have Pr [G is α-bad] = Pr [G B j ]
(j+1)α/2 Pr[G B j ] (j+1)α/2 Pr[f(G) > jα/2 ] (j+1)α/2 jα+c+ɛ = α/2+c+ɛ jα/2 = α/2+c+ɛ O( α ) = O( α/2+c+ɛ ). The secod lie here follows from part (a), ad the fourth lie from part (b). (d) We assume that Pr [E holds for G] = Ω( r ). Now ote that Pr[E holds for G] Pr[E holds for G ad G is ot α-bad] α Pr [E holds for G ad G is ot α-bad] α ( Pr [E holds for G] Pr [G is α-bad] ) ( ) = α Ω( r ) O( α/2+c+ɛ ). (The secod lie here uses part (a), ad the last lie part (c).) Fially, we are free to choose α so that α/2 c ɛ > r, which implies that the egative term i the above fial expressio is o( r ). We coclude that Pr[E holds for G] = Ω( r α ) = Ω( r ), as desired. Commo Issues: May people failed to take a uio boud over the two evets (E holds i G) ad (G is ot α-bad), istead claimig icorrectly that these evets were idepedet. 5. More o ubalacig lights (a) Sice z 0 the required iequality, for ay fixed α > 0, is equivalet to z z α 2 α. Differetiatig the left-had side ad settig to zero, we get a turig poit at z = α, ad sice the secod derivative is egative this must be a maximum. There are o other turig poits i z 0, so the global maximum value is 2 α, as desired. For ay radom variable Z, applyig the above iequality to Z ad takig expectatios we get E( Z ) ( ) 2 E(Z 2 ) E(Z4 ). α α This holds for ay α > 0, so we may choose α to maximize the right-had side. (We may also assume that E(Z 2 ) 0; otherwise Z = 0 with probability 1.) Differetiatig, we see that the optimal α is α = E(Z4 ). Pluggig this i ad tidyig up gives the claimed boud. E(Z 2 ) (b) Settig Z = S i part (a), we eed to evaluate E(S 2 ) ad E(S 4 ). First we have E(S 2 ) = i E(X 2 i ) + i j E(X i X j ) =.
To see this, ote that E(Xi = 1 sice X i is ±1-valued; ad E(X i X j ) = E(X i )E(X j ) = 0 sice the X i are 4-wise idepedet (ad hece certaily pairwise idepedet). By similar cosideratios we have E(S) 4 = E(Xi 4 ) + 1 ( ) 4 E(Xi 2 Xj 2 ) = + ( 1) = 2 2. 2 2 i i j Note that all other terms have expectatio zero because of 4-wise idepedece ad the fact that E(X i ) = 0. (The 1 4 2( = arises as the umber of ways of partitioig the two copies of Xi ad X j amog the four factors.) Pluggig these two values ito the boud from part (a) gives /2 E( S ) ( 2 1/2. (c) First, suppose we use the radomized algorithm of Lecture 5, except that ow the coi tosses used to determie the colum switch settigs are oly 4-wise idepedet. The aalysis i Lecture 5 relied 2 oly o the fact that E( Z i ) is asymptotically at least π, where Z i = j=1 X ij is the sum of light values for row i. Sice the X ij are also 4-wise idepedet, we may substitute the result of part (b) to deduce that E( Z i ) is asymptotically at least, ad hece the asymptotic expected excess is 1 /2 1. (Note that 2 0.58 while π 0.80.) Now recall from Lecture 10 that we ca costruct a family of r d-wise idepedet fair coi flips usig radom polyomials of degree d 1 over a field of size q = O(r). (Say q = 2 m, where m = log 2 r.) I our preset applicatio, r = ad d = 4. The umber of poits i this sample space (i.e., the umber of such polyomials) is oly q d = O( 4 ), so istead of ruig the radomized algorithm we may exhaustively try all sample poits i polyomial time. We are guarateed to fid at least oe sample poit for which the excess is at least the above expected value. (d) We use the costructio i the hit. First, let s check that E( S ) = 1. Note that if v = (0,..., 0, 0) the Y i = 0 for all i, so S =. Similarly, if v = (0,..., 0, 1) the Y i = 1 for all i, so S =. Now cosider ay other value of v, ad let v j be its leftmost o-zero etry (so j k). For each i {0, 1,..., 1}, let i deote the iteger whose biary expasio differs from that of i oly i positio j. The it is clear that Y i = 1 Y i, ad hece X i = X i. Thus the cotributios to S cacel out i pairs, ad S = 0. Puttig all this together we get E( S ) = 1 2 k+1 ( + ) = 1. To see that the Y i (ad hece the X i ) are -wise idepedet, ote first that, by the same argumet as above, Pr[Y i = 0] = Pr[Y i = 1] = 1 2 for all i. Now fix ay three distict itegers i 1, i 2, i {0, 1,... 1}; we eed to show that Pr[Y i1 = a 1 Y i2 = a 2 Y i = a ] = 1 8 for ay triple of values a j {0, 1}. The sample poits (vectors v) correspodig to this triple are solutios to the equatios Bv T = a T, where a = (a 1, a 2, a ), ad B is the (k + 1) matrix whose rows are b i1, b i2 ad b i. We claim that the rows of B are liearly idepedet over GF [2]; for if ot the some combiatio of them would have to sum to 0, ad sice all have 1 i the last positio this meas that some pair must sum to 0, which is ot possible sice all three rows are distict. Liear idepedece meas that the system of equatios has full rak, so the dimesio of the set of solutios is k + 1 = k 2, i.e., the umber of solutios is 2 k 2. Sice this is idepedet of the triple a, all eight triples must have the same probability, 1 8.