Honors Theory of Computation, Spring'99

Homework 5

-- DATE DUE: May 3, 1999
-- PROBLEMS:
  1. This simple exercise (suggested by Emily Chapman) tests your basic understanding of probabilistic computation. To determine if a binary number n is odd, the obvious algorithm is, of course, to determine the predicate LSB(n)=``the least significant bit of n is 1''. Consider the following (unusual) algorithm (on input n):
    LOOP:
    [1] Toss a coin.
    [2] If head, then output LSB(n).
    [3] If tail, let n\ass n+2 and go back to LOOP.

    • (i) Let T be the complete computation tree on input n. Determine the least fixed-point valuation ValT.
    • (ii) Does this algorithm have bounded-error? zero-error?
    • (iii) Determine the running time t(m) of this algorithm on inputs of length m, assuming LSB(n) takes lg(n) steps to compute.
    • (iv) Determine the average running time t'(m) of this algorithm.
  2. Show that
    (i) BPP is closed under complementation, union and intersection.
    (ii) RP is closed under union and intersection.
  3. Consider the following ``counting'' version of 3SAT:
    #MAJ := { <F,k> : F is a 3CNF formula with at least k satisfying assignments.} Prove that #MAJ is complete for the class PP (under Karp reducibility).