Computability and Complexity 20-1 Computability and Complexity Andrei Bulatov Random Sources
Computability and Complexity 20-2 Random Choices We have seen several probabilistic algorithms, that is algorithms that make some random choices during the computation We have proved that those algorithms solve the corresponding problems successfully only with some probability A common assumption for those theorems is that the algorithms always make a truly random choice
Computability and Complexity 20-3 Perfect Randomness A random source is a device, which after “pushing a button” produces a (potentially infinite) sequence of bits A random source is said to be perfect if it is fair, that is it is independent, that is the value of does not depend on the values of
Computability and Complexity 20-4 Fair Sources An independent but unfair random source can be easily converted into a perfect source Let be an independent source, such that Let be defined such that Let be the sequence of defined members of Theorem (von Neumann) is a perfect random source Theorem (von Neumann) is a perfect random source
Computability and Complexity 20-5 Pseudorandom Sources Given the difficulties in implementing random sources physically, one may try to find randomness in mathematical processes A pseudorandom number generator is an algorithm that given a seed, that is a short sequence of bits, produces a very long sequence of bits that are very hard to predict. A measure of “goodness” of a random source is the complexity of the following problem Instance: A pseudorandom source P Question: Using an initial segment of the output of P predict the remaining members of the sequence with high probability (without knowing the seed)? Pseudorandomness
Computability and Complexity 20-6 Linear Sources Linear sources are the most usual type of pseudorandom sources used in the existing software Take a large number m, and two smaller numbers a and b A seed is a number Then we define Treating the numbers as sequences of bits we get a required pseudorandom sequence Theorem A linear pseudorandom source can be broken in polynomial time Theorem A linear pseudorandom source can be broken in polynomial time
Computability and Complexity 20-7 Proof First, we find A and B such that Second, we find m Define to be. Note that
Computability and Complexity 20-8 Claim. If then, for we have Take some j. Then
Computability and Complexity 20-9 Finding A Given a linear pseudorandom source compute if then A := 0 otherwise do - find the least t 1 and the corresponding d such that - find for such that - set set
Computability and Complexity Claim. The algorithm computes an A and a B such that We show that Fact. If then Indeed, for some m. Let Therefore that implies If l is such that then
Computability and Complexity Let g = GCD(m,d). Notice that Since g divides and m, it also divides for j 1 Therefore Fact. If is a solution of then, for any k, is also a solution Indeed, where
Computability and Complexity Since a is a solution of, A is also a solution, and Claim. When calculating t, if and g does not divide then Since we have
Computability and Complexity Finding m In general, m cannot be found in polynomial time. For example, if a = 1 and b = 1, then Given a linear pseudorandom source compute A and B set m := and predict that when the first incorrect prediction is made, but Make the new guess for m equal to continue predicting whenever an incorrect guess is made for, update M to