Homework 7

[Note: this webpage last modified Friday, 04-Feb-2011 19:44:51 EST]

This homework assignment will be handed out on Wednesday October 6 and is due by the beginning of class on the following Wednesday, so by 3pm Wednesday October 13. REMEMBER that your solutions should be explained in complete sentences such that your classmates will understand the solution (and can verify your proofs are correct) even if they have not solved the problems themselves.

  1. HW Polices.

    1. Type your HW (in word, latex, text file, etc.) and send to me by email.

    2. At the beginning of your HW, list who you collaborated with. List "none" if none.

    3. Do NOT share electronically. You must type your own solutions. You can discuss the problems with each other, but you may only discuss them. You may not write out solutions together.

    4. You MAY NOT search the internet, textbooks, etc. for solutions to the problems. The following are the ONLY sources of information that you may use in solving the problems: the textbook for this course (draft available from here ), Computational Complexity: A Modern Approach, and wikipedia articles on basic math/probability/etc. You may discuss the problems with each other and with myself, but must obey the previous item in doing so.

      You may use NOTHING ELSE that is online or other textbooks. You have already received warnings about this! ANY violations of this policy for the rest of the semester will result in you FAILING the course and being brought before the appropriate committee on campus for handing academic misconduct.

  2. (20 Points) BPPBPP are the class of problems that can be solved by a two-sided error randomized algorithm that has an "oracle" to a BPP problem. That is, a problem Pi is in BPPBPP if there is a poly-time randomized machine M and another BPP problem O (O for oracle) such that (i) if x is a "yes" instance of Pi then Prr[MO(x, r) = 1] is at least 2/3, and (ii) if x is a "no" instance of Pi then Prr[MO(x, r)=1] is at most 1/3.

    Show that BPPBPP = BPP. So, for a BPPBPP problem, you need to create a single BPP randomized machine that solves the problem (with probability at least 2/3 on every input.

  3. This problem was not on the version I handed out on Wednesday, but you need to do it. The goal of this problem is to compute the probability that if we flip 2t independent fair coins in a row, for some integer t>=1, that at some point there are at least t heads in a row. To do this, we first count the number of possible ways that this can happen (and then divide by 22t).

    1. (2 Points) Determine the number of possible ways that the first "t heads in a row" can occur as the first coin flips. For t=3, one example is (H,H,H,T,H,T) and another is (H,H,H,H,T,T).

    2. (3 Points) Determine the number of possible ways that the first "t heads in a row" can occur as the 2nd through t+1st coin flips. For t=3, one example is (T,H,H,H,T,H) and another is (T,H,H,H,H,H).

    3. (10 Points) Now determine the number of possible ways that there can be at least t heads in a row in a sequence of 2t coin flips.

      Hint: Break this event up into t+1 disjoint events, compute the number of ways for each of these, then add them up. You have already computed 2 of these for Parts a) and b).

      What is the probabilty of getting at least t heads in a row at some point in the 2t coin flips? Is the probability greater than, less than, or equal to 1/2?

  4. (10 Points Extra Credit) Pick some randomized algorithm, that you can find online or in a textbook, and explain the randomized algorithm. You should include less than about 1 page explaining it in your homework. Then you will present the algorithm to the class at some point over the next few weeks. I will give you at least 2 days notice about when you will present your algorithm. You will have about 10 minutes to present the algorithm.

  5. Removed from HW, a nice problem, but you don't need to do it. Just like we defined BPPBPP and NPNP, we can also define classes of problems NPBPP (problems that have efficient verifiers if they get to have an oracle to a BPP problem for free), and BPPNP (problems that have randomized algorithms that are correct if they get to have an oracle to an NP problem for free).

    Show that NPBPP is contained in BPPNP.

  6. Removed from HW, a nice problem, but you don't need to do it. Show that if NP is contained in BPP, then NPNP is contained in BPP. You will need to use the previous two parts.