Quiz Questions

[Note: this webpage last modified Tuesday, 26-Apr-2011 15:53:06 EDT]

This page collects sample quiz questions, or questions from past quizzes.

  1. Choose 4 out of 5, due by email by May 7. Take home quiz, so please no sharing (except with Jeff).
    1. Explain why there can be no one way functions if P=NP.
    2. True or False, there exists a computable pseudorandom generators that are secure against any computable function. Why?
    3. Suppose G is a pseudorandom generator that is secure against an algorithm A. Suppose G takes (log(n))2 bits and stretches that to n bits, and that A takes n bits as input. Give an algorithm that uses G to determine the majority output of A over all its possible inputs (that will be either 0 or 1). What is the running time of your algorithm?
    4. Explain the definition of a pseudorandom generator and how it can be used in an encryption scheme. Hint, think of the one time pad.
    5. Suppose we knew that there is an EXP-complete function f so that the following holds. For any poly-time randomized algorithm A, A fails to invert f with probability at least 1-1/nc for all constants c. Does this mean that f is a one way function? Why?
  2. (2 Points)

    (a) What is the probability of tossing 10 coins and getting 0 heads?

    (b) What is the probability of tossing 10 coins and getting exactly 1 heads?

  3. (4 Points)

    (a) Suppose you flip n coins. What is the expected number of times that you will see two coins in a row that are either both heads or both tails?

    (b) Use Markov's inequality to give a bound on the probability that more than 3*(n-1)/4 times you will see either two heads in a row or two tails in a row.

  4. (4 Points)

    (a) Let A be a randomized algorithm that solves a BPP problem and that runs in time n2. Give a randomized algorithm A' that solves the same problem and has a probability of error less than 1/2n.

    (b) Prove your algorithm has at most this probability of error.

    (c) What is the running time of A'?