admin ps1 back next monday today conditional expectations pairwise independence max cut defn of problem thm: randomized 1/2-approx algo pf algo pick E+1 random cuts select best cut correctness E[max cut] = |E|/2 markov => each random cut yields \ge E/2 w/p \ge 1/(E+1) time total work E^2 [[each cut takes linear time to proces, take E cuts]] parallel time polylog(E,n) [[run each cut in parallel, once the cut is chosen, counting the cut is easy in parallel]] space n [[need to write down the randomness for each cut, can reuse space if done sequentially]] Q. derandomize this algorithm? conditional expectations single cut: pick R_1,\ldots,R_n\in\bits^n randomly S=\{i: R_i=0\} T=\{i: R_i=1\} draw binary tree on \vec{r}, with leaves with cut values [[expected value of walk on tree is good]] idea: walk down tree defn: P(r_1,\ldots,r_i)=\E[ cut | R_1=r_1, ... , R_i=r_i ] eg, P(\nulls)=\E[cut]=E/2 P(\vec{r})=fixed deterministic value lem: P(r_1,\ldots,r_i)=\E_{R_{i+1}} P(r_1,\ldots,r_i,R_{i+1}) cor: \exists r_{i+1} st P(r_1,\ldots,r_i,r_{i+1})\ge P(r_1,\ldots,r_i) [[this suggests an algorithm]] lem: for r_1,\ldots,r_i, define S_i:=\{j\le i: r_j=0\} define T_i:=\{j\le i: r_j=1\} P(r_1,\ldots,r_i)=cut(S_i,T_i)+1/2 * cut(V-(S_i\cup T_i),V) [[ie, edges w/ \ge one unfixed node]] rmk: easily computable second term is independent of r_1,\ldots,r_i lem: P(r_1,\ldots,r_i,1)-P(r_1,\ldots,r_i,0)=cut(S_i,{i+1})-cut(T_i,{i+1}) algo: S,T=\emptyset for i=1,...,n if cut(S,{i})>cut(T,{i}) put i into T else put i into S [[this is the natural greedy algo]] correctness: as above time: O~(m) work [[each edge is counting at most once]] \Omega(n) parallel time [[requires lots of sequential choices]] \Omega(n) space [[have to store the choices made]] Q. derand algo in small space? in parallel? pairwise independence defn: X_1,\ldots,X_n pairwise indepen if for all i\ne j, X_i, X_j are independent [[often also require X_i to be uniform]] recall: \E[|cut|] =\sum_{(i,j)\in E} \Pr[(i,j) is cut] [[linearity of expectation]] =\sum_{(i,j)\in E} \Pr[R_i\ne R_j] =E/2 obs: this is still true if R_i are pairwise independent goal: construct pairwise independent space with little randomness derandomize via enumeration defn: h:[N]\times [H]\to[M] is a pairwise independent hash function if for all i, h(i,U_H) is uniform on [M] for all i\ne j, h(i,U_H) is independent of h(j,U_H) h is *explicit* if computable in polytime, ie, poly(\log N,\log H) rmk: hash functions are practical [[need to have random functions in real life, but need to remember which random function used]] [[this requires a small sample space so writing the function down does not require too many random bits]] Q. how to construct? recall: \F is a field if addition multiplication all non-zero elements have a multiplicative inverse eg, not Z modulo 6 Z modulo 4=2^2 eg \Q,\R,\C \F_p=\Z/

for p prime \F_p[x]/ for f\in\F_p[x] irreducible =\F_q for q=p^k if f=degree k fact: any p^k has finite field of this size can find irred f deterministically in time poly(k,p) randomly in time poly(k,\lg p) given f all field operations are done in poly(k,\lg p) steps prop: h:\F\times \F^2\to \F given by h(x,(a,b))=ax+b is pairwise independent and explicit pf suffices that Pr_{a,b}[h_{a,b}(x)=a \and h_{a,b}(y)=b]=1/F^2 =(# lines through (x,a),(y,b))/(total # of lines) =1/F^2 rmk: uses 2\log F bits of randomness fully random function is F\log F bits cor: h:\bits^\ell\times \bits^{2\ell}\to \bits pairwise independent Pf, take \F_{2^\ell}=\bits^\ell, and truncate output Cor: 1/2 approx to maxcut in O~(mn^2) work polylog(m,n) parallel time logspace pf need n pairwise independent bits, take \ell=\log n use 2\lg n random bits enumerate over n^2 possible cuts [[can be done in logspace, and in parallel]] Rmk: can use random degree k polynomials for (k+1)-wise independence