算法和计算复杂度 6 Randomized Computation
What if Turing machine models have access to a source of randomness?
This would allow to compute more in same time/space, at the price of possibly not giving correct answer with small probability.
Current consensus: Randomization only gives
- Polynomial saving in time
- Constant factor saving in space
Because of hardness-based pseudo-random generator.
Exponential time: . (By corollary 2)
Recall that includes every Boolean function on variables, making non-uniform inclusion .
Corresponding randomized complexity class .
Theorem 33 (Impagliazzo and Wigderson). If there exists s.t. for every and every Boolean circuit computing on input length , the size of must be , then .
Probabilistic Turing Machines
Give a probabilistic Turing machine an extra read-only and read-once tape which is pre-initialized with uniform and independent random bits. The tape head is allow to only stop or move forward.
Thus everything related to the Turing machines becomes a random variable.
Different kinds of Errors
Zero-sided error aka Las Vegas computation: Turing machine halt in a state “?” with small probability and require correct answer otherwise.
One-sided error: Turing machine may produce false negatives.
Two-sided error: Turing machine may produce false negatives and false positives.
📖Definition 19. Let be a probabilistic Turing machine and a language.
- computes with zero-sided error if for all we have , that when , and that when .
- computes with one-sided error if for all we have and for all we have .
- computes with two-sided error if for all we have and for all we have .
📖Definition 20. Let and be functions with .
- Then , and are the classes of languages computed by a time-bounded probabilistic Turing machine with zero-sided error, one-sided error and two-sided error respectively.
- , and are the classes of languages computed by a space-bounded probabilistic Turing machine that always halt having zero-sided error, one-sided error and two-sided error respectively.
For space bounded randomized classes, we assume that the Turing machine always halts! Because otherwise these three classes would end up containing !
Define log-space/polynomial time bounded classes:
Trivially, ; .
It’s also easy to see that and .
Simple upper bound for (not tight): similar to theorem 10, .
For , .
Success Amplification
Error probability of is large, but we can reduce it by independently running multiple times.
For zero-sided error, we won’t stop until we get non-unknown answer.
For one-sided error, if some trial accepts, we accept. otherwise we reject.
For two-sided error, we decided the answer by the majority of trials.
🤔Lemma 3. Let be independent Boolean variables s.t. . Then
By independence,
(by )
Apply this to zero-sided and one-sided errors:
- Define to indicate whether trial gives the correct output.
- Instead of having error probability , we actually assume that error probability for once is less than and still achieve error probability for all by running trials, which is polynomial number.
For two-sided error:
🤔Lemma 4 (Chernoff-Hoeffding Bound). Let be the sum of independent Boolean random variables. Assume , . Then
We define the random indicator to indicate whether trial gave correct output. We assume that and is odd. Let , we have . Applying Chernoff-Hoeffding bound, we have
using . Instead of have error probability , we assume error probability for once just less than and achieve error probability by running independent trials.
These analysis applies to both polynomial-time bounded and log-space bounded randomized complexity classes.
Polynomial Identity Testing
Don’t know:
- Whether randomized classes have complete problem;
- Any hierarchy results for randomized classes.
PIT
Polynomial Identity Testing (PIT): Testing whether a polynomial is identically zero.
PIT problem is efficiently solvable in randomized polynomial time but not known to be solvable deterministically in polynomial time.
📖Definition 21 (Arithmetic circuit). An arithmetic circuit with inputs and outputs consists of the following:
- A directed acyclic graph where the in-degree of every node is either or .
- A labeling for the nodes .
- A choice of outputs gates .
Nodes corresponds to gates, edges corresponds to wires. Nodes of in-degree are input gates. The labeling function satisfies gates :
- If fanin of is , .
- If fanin of is , .
故意不说人话……就是把多项式分解成多层二元运算。一个多项式就相当于只有一个输出口的算术电路。
Such an arithmetic circuit compute a polynomial for any Abelian ring . 阿贝尔环
Usually we consider arithmetic circuits w.r.t. ring.
AFIT
aka Arithmetic formula identity testing
A variant of PIT: input polynomial is given by an arithmetic formula.
Instance: Arithmetic formula computing the polynomial .
Question: Is ?
A simple randomized algorithm: simply choose number independently and uniformly at random, where is the size of the given formula, evaluate and answer accordingly.
Using Schwartz-Zippel lemma to analyze error probability.
🤔Lemma 5 (Schwartz-Zippel lemma). Let be a field, let be a non-zero polynomial of total degree at most . Let , and pick independently and uniformly at random. Then
Proof by induction on .
So the error probability is decided by , at most .
🎯Theorem 45. .
没太懂这一部分
Sample from is equivalent to sample times from . .
ACIT
aka arithmetic circuit identity testing
Instance: Arithmetic circuit computing the polynomial .
Question: Is ?
Circuit of size has at most multiplication gates. The degree of the polynomial computed is at most . The same approach as in arithmetic formula calls for draw random number from . (exponential!)
To remedy this, we switch to modular arithmetic with randomly chosen prime modulus. Use prime number theorem to analyze error probability.
Let be the number of prime number less than . By prime number theory,
🤔Lemma 6. For all , we have .
🤔🎯Theorem 35. .
Det kan jeg ikke forstår
An Alternative Characterization of Time Bounded Classes
We have alternative characterization of . Also there are similar alternatives of and .
Proposition 4. Let be a language. Then iff there is a polynomial and another language s.t. :
We say that the randomized computation uses random bits.
Using success amplification a randomized algorithm using random bits and having error probability less than can be transformed to a randomized algorithm using random bits and having error probability less than by running trials and taking the majority vote.
Randomized Computation and the Polynomial-time Hierarchy
By definition, .
But we don’t know whether or .
We just guess: thus .
But we can prove that is contained in the second level of polynomial-time hierarchy.
🎯Theorem 36. .
Prove that . From this also we get .
Let . We have a polynomial and a language s.t. for all we have
Let . For given , we define . Thus, for all we have
Claim that iff
where denote the coordinate-wise exclusive-or.
什么是坐标或运算?This shows that since this can be done in polynomial time.
It remains to prove the predicate is equivalent to.
Randomized Computation and Boolean Circuits
Everything that can be computed in polynomial-time by randomized algorithm can also be computed using Boolean circuits.
🎯Theorem 37. (Adleman’s Theorem). .
证明也不太懂