Friday, March 21, 2008 * Undirected PATH is in RL * BPP is in Simga_2 P intersect Pi_2 P UNDIRECTED PATH IS IN RL A simple random walk algorithm. We start at the source s. We choose an edge at random among all adjacent edges, and repeat. For technical reasons, we have a self-loop edge for every node. Convergence Lemma: If G is connected, then lim_{t -> infinity} p_t(u) = d_u/(2|E|). We prove the convergence lemma later. First, we use it to show that Undir-PATH is in RL. Consider the asymptotic situation. On average, the walk returns to u every 2|E|/d_u steps. But notice that this return is independent from asymptotics. So the expected time between two successive visits to a node u is 2|E|/d_u. Now let us consider the time taken to go from s to t. There is a path from s to t. Consider the first edge out from s. Expected time taken before that edge is used is (d_u/2)*(2|E|/d_u) = |E|. We repeat this for every edge on the path to get a time of |E|n. Now, our randomized algorithm. Run a random walk for 2|E|/n steps. If you reach t within this time, return "reachable". Otherwise, return "not reachable". Easily doable in logspace. In RL. Proof of Convergence Lemma: Let delta_t(u) denote p_t(u) - d_u/(2|E|). In each step, the delta_t(u)'s get redistributed, so the sum of the absolute values cannot increase. If delta_t(u)'s of opposite signs meet, they reduce. Can show that reduction happens in finite steps. End Proof BPP IN SIGMA_2 P INTERSECT PI_2 P Let L be a language in BPP. Then, by the amplification lemma we know that there exists a Turing machine M such that: x is in L => Pr_y[M(x,y) accepts] >= 1 - 1/2^n x is not in L => Pr_y[M(x,y) rejects] >= 1 - 1/2^n M is poly-time, and so |y| is poly(|x|). Let |y| be m. Then, for a given x in L, M accepts for 2^m - 2^{m-n} of the random strings and rejects for only at most 2^{m-n} of the random strings; and vice versa if x is not in L. Let the accepted random strings be A_x and the rejected by R_x. Claim: x is in L iff there exists m strings z_1, ..., z_m such that {y XOR z_i: y in A_x, 1 <= i <= m} = {0,1}^m. Proof: By a simple counting argument. Suppose x is not in L. Then, |A_x| is at most 2^{m-n}. The size of {y XOR z_i} for each i is at most 2^{m-n}. Since m is poly(n), m < 2^n; thus the total size, over all i, is at most m2^{m-n} < 2^m. Suppose x is in L. Then, consider a random choice of z_1, ..., z_m. Fix a w in {0,1}^m. What is the probability that w in {0,1}^m is not y XOR z_i for any choice of y or z_i? Let us calculate this. Consider A_x. It has at least 2^m - 2^{m-n} strings in it. For each of these strings y there is a choice of z such that y XOR z = w. Thus, the probability that w is in A_x XOR z_1 is at least (2^{m} - 2^{m-n})/2^m = 1 - 1/2^n. So the probability w is not in A_x XOR z_i for any of the i's is at most (1/2^n)^m. The number of strings w is 2^m. So the probability that there exists one string w that is not covered is at most 2^m/2^{nm} < 1. Hence, the claim is proved. End Proof Sigma_2 P algorithm for L. For input x: (1) Guess z_1, z_2, ..., z_m using an OR-branch. (2) Generate all w of length m using AND-branch. (3) Check that {w XOR z_j | 1 <= j <= m} intersects A_x by running M(x, w XOR z_j) for all 1 <= j <= m. The last step can be done deterministically in poly-time by simulating M. The first quantifier is OR and the second is AND. So L is in Sigma_2 P. L is in Pi_2 P because we can do the same for x not in L.