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: E=DTIME(2O(n))=ULSIZE(2O(n))E=DTIME(2^{O(n)})=U_L-SIZE(2^{O(n)}). (By corollary 2)

Recall that SIZE(2n/n)SIZE(2^n/n) includes every Boolean function on nn variables, making non-uniform inclusion ESIZE(2O(n))E\subseteq SIZE(2^{O(n)}).

Corresponding randomized complexity class BPPBPP.

Theorem 33 (Impagliazzo and Wigderson). If there exists LEL\in E s.t. for every nn and every Boolean circuit CC computing LL on input length nn, the size of CC must be 2Ω(n)2^{\Omega(n)}, then P=BPPP=BPP.

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 MM be a probabilistic Turing machine and LL a language.

  • MM computes LL with zero-sided error if for all xx we have Pr[M(x)=?]14\Pr[M(x)=?]\le\frac{1}{4}, that M(x){yes,?}M(x)\in\{yes,?\} when xLx\in L, and that M(x){no,?}M(x)\in\{no,?\} when x∉Lx\not\in L.
  • MM computes LL with one-sided error if for all xLx\in L we have Pr[M(x)=yes]34\Pr[M(x)=yes]\ge\frac{3}{4} and for all x∉Lx\not\in L we have M(x)=noM(x)=no.
  • MM computes LL with two-sided error if for all xLx\in L we have Pr[M(x)=yes]34\Pr[M(x)=yes]\ge\frac{3}{4} and for all x∉Lx\not\in L we have Pr[M(x)=no]34\Pr[M(x)=no]\ge\frac{3}{4}.

📖Definition 20. Let T:NNT:\mathbb N\rarr\mathbb N and S:NNS:\mathbb N\rarr\mathbb N be functions with T(n)nT(n)\ge n.

  • Then ZPTIME(T(n))ZPTIME(T(n)), RTIME(T(n))RTIME(T(n)) and BPTIME(T(n))BPTIME(T(n)) are the classes of languages computed by a O(T(n))O(T(n)) time-bounded probabilistic Turing machine with zero-sided error, one-sided error and two-sided error respectively.
  • ZPSPACE(S(n))ZPSPACE(S(n)), RSPACE(S(n))RSPACE(S(n)) and BPSPACE(S(n))BPSPACE(S(n)) are the classes of languages computed by a O(S(n))O(S(n)) 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 NSPACE(S(n))NSPACE(S(n))!

Define log-space/polynomial time bounded classes:

ZPL=ZPSPACE(logn)RP=RSPACE(logn)BPL=BPSPACE(logn)ZPP=ZPTIME(nO(1))RP=RTIME(nO(1))BPP=BPTIME(nO(1))ZPL=ZPSPACE(\log n)\\ RP=RSPACE(\log n)\\ BPL=BPSPACE(\log n)\\ ZPP=ZPTIME(n^{O(1)})\\ RP=RTIME(n^{O(1)})\\ BPP=BPTIME(n^{O(1)})

Trivially, LZPLRLBPLL\subseteq ZPL\subseteq RL\subseteq BPL; PZPPRPBPPP\subseteq ZPP\subseteq RP\subseteq BPP.

It’s also easy to see that RLNLRL\subseteq NL and RPNPRP\subseteq NP.

Simple upper bound for BPPBPP (not tight): similar to theorem 10, BPPPSPACEBPP\subseteq PSPACE.

For BPLBPL, BPLDSPACE(log3/2n)BPL\subseteq DSPACE(\log^{3/2}n).

Success Amplification

Error probability of 1/41/4 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 X1,,XkX_1,\cdots,X_k be independent Boolean variables s.t. Pr[Xi=1]ϵ\Pr[X_i=1]\ge\epsilon. Then

Pr[i:Xi=0]<exp(kϵ)\Pr[\forall i:X_i=0]\lt\exp(-k\epsilon)

By independence,

Pr[i:Xi=0]=iPr[Xi=0]<(1ϵ)kexp(kϵ).\Pr[\forall i:X_i=0]=\prod_i\Pr[X_i=0]\lt(1-\epsilon)^k\le\exp(-k\epsilon).

(by 1+xexp(x)1+x\le\exp(x))

Apply this to zero-sided and one-sided errors:

  • Define XiX_i to indicate whether trial ii gives the correct output.
  • Instead of having error probability 1/41/4, we actually assume that error probability for once is less than 11p(n)1-\frac{1}{p(n)} and still achieve error probability exp(q(n))\exp(-q(n)) for all by running k=p(n)q(n)k=p(n)q(n) trials, which is polynomial number.

For two-sided error:

🤔Lemma 4 (Chernoff-Hoeffding Bound). Let XX be the sum of kk independent Boolean random variables. Assume μLE[X]μH\mu_L\le\mathbb E[X]\le\mu_H, t>0t>0. Then

Pr[X<μLt]exp(2t2/k),Pr[X>μH+t]exp(2t2/k).\Pr[X<\mu_L-t]\le\exp(-2t^2/k),\\ \Pr[X>\mu_H+t]\le\exp(-2t^2/k).

We define the random indicator XiX_i to indicate whether trial ii gave correct output. We assume that Pr[Xi=1]12+ϵ\Pr[X_i=1]\ge\frac{1}{2}+\epsilon and kk is odd. Let X=i=1kXiX=\sum_{i=1}^kX_i, we have E[X]k2+kϵ\mathbb E[X]\ge\frac{k}{2}+k\epsilon. Applying Chernoff-Hoeffding bound, we have

Pr[X<k2]=Pr[X<μLkϵ]exp(2(kϵ)2/k)=exp(2kϵ2)\Pr[X<\frac{k}{2}]=\Pr[X<\mu_L-k\epsilon]\le\exp(-2(k\epsilon)^2/k)\\ =\exp(-2k\epsilon^2)

using μL=k2+kϵ\mu_L=\frac{k}{2}+k\epsilon. Instead of have error probability 1/41/4, we assume error probability for once just less than 1/21/p(n)1/2-1/p(n) and achieve error probability exp(q(n))\exp(-q(n)) by running k=p(n)2q(n)2k=\frac{p(n)^2q(n)}{2} independent trials.

These analysis applies to both polynomial-time bounded and log-space bounded randomized complexity classes.

Polynomial Identity Testing

Don’t know:

  1. Whether randomized classes have complete problem;
  2. 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 CC with nn inputs and mm outputs consists of the following:

  1. A directed acyclic graph D=(V,A)D=(V,A) where the in-degree of every node is either 00 or 22.
  2. A labeling \ell for the nodes VV.
  3. A choice of mm outputs gates o1,,omVo_1,\cdots,o_m\in V.

Nodes VV corresponds to gates, edges AA corresponds to wires. Nodes of in-degree 00 are input gates. The labeling function satisfies \forall gates gg:

  1. If fanin of gg is 00, (g){1,x1,,xn}\ell(g)\in\{1,x_1,\cdots,x_n\}.
  2. If fanin of gg is 22, (g){+,×,}\ell(g)\in\{+,\times,-\}.

故意不说人话……就是把多项式分解成多层二元运算。一个多项式就相当于只有一个输出口的算术电路。

Such an arithmetic circuit compute a polynomial pR[x1,,xn]p\in R[x_1,\cdots,x_n] for any Abelian ring RR. 阿贝尔环

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 P(x1,,xn)Z[x1,,xn]P(x_1,\cdots,x_n)\in\mathbb Z[x_1,\cdots,x_n].

Question: Is P(x)0P(x)\equiv0?

A simple randomized algorithm: simply choose number a1,,an{1,2,,4m}a_1,\cdots,a_n\in\{1,2,\cdots,4m\} independently and uniformly at random, where mm is the size of the given formula, evaluate P(a1,,an)P(a_1,\cdots, a_n) and answer accordingly.

Using Schwartz-Zippel lemma to analyze error probability.

🤔Lemma 5 (Schwartz-Zippel lemma). Let F\mathbb F be a field, let P(x1,,xn)F[x1,,xn]P(x_1,\cdots, x_n)\in\mathbb F[x_1,\cdots,x_n] be a non-zero polynomial of total degree at most dd. Let SFS\subseteq\mathbb F, and pick a1,,anSa_1,\cdots, a_n\in S independently and uniformly at random. Then

Pr[P(a1,,an)=0]dS.\Pr[P(a_1,\cdots,a_n)=0]\le\frac{d}{|S|}.

Proof by induction on nn.

So the error probability is decided by mm, at most 1/41/4.

🎯Theorem 45. AFITcoRPAFIT\in coRP.

没太懂这一部分

Sample from 1,,m1,\cdots,m is equivalent to sample kk times from 1,,2log2m1,\cdots,2^{\lceil\log_2m\rceil}. k=ω(logn)k=\omega(\log n).

ACIT

aka arithmetic circuit identity testing

Instance: Arithmetic circuit computing the polynomial P(x1,,xn)Z[x1,,xn]P(x_1,\cdots,x_n)\in\mathbb Z[x_1,\cdots,x_n].

Question: Is P(x)0P(x)\equiv0?

Circuit of size mm has at most mm multiplication gates. The degree of the polynomial computed is at most 2m2^m. The same approach as in arithmetic formula calls for draw random number from 1,,2m+21,\cdots,2^{m+2}. (exponential!)

To remedy this, we switch to modular arithmetic with randomly chosen prime modulus. Use prime number theorem to analyze error probability.

Let π(x)\pi(x) be the number of prime number less than xx. By prime number theory,

π(x)xlnx.\pi(x)\sim\frac{x}{\ln x}.

🤔Lemma 6. For all m>1m>1, we have π(2m)2mm\pi(2^m)\ge\frac{2^m}{m}.

🤔🎯Theorem 35. ACITcoRPACIT\in coRP.

Det kan jeg ikke forstår

An Alternative Characterization of Time Bounded Classes

We have alternative characterization of BPPBPP. Also there are similar alternatives of ZPPZPP and RPRP.

Proposition 4. Let LL be a language. Then LBPPL\in BPP iff there is a polynomial qq and another language LPL'\in P s.t. x\forall x:

xLPry{0,1}q(x)[x,yL]34x∉LPry{0,1}q(x)[x,y∉L]34x\in L\Rarr\Pr_{y\in\{0,1\}^{q(|x|)}}[\langle x,y\rangle\in L']\ge\frac{3}{4}\\ x\not\in L\Rarr\Pr_{y\in\{0,1\}^{q(|x|)}}[\langle x,y\rangle\not\in L']\ge\frac{3}{4}

We say that the randomized computation uses q(x)q(|x|) random bits.

Using success amplification a randomized algorithm using RR random bits and having error probability less than 1/41/4 can be transformed to a randomized algorithm using kRkR random bits and having error probability less than exp(k/8)\exp(-k/8) by running kk trials and taking the majority vote.

Randomized Computation and the Polynomial-time Hierarchy

By definition, RPNPRP\subseteq NP.

But we don’t know whether BPPNPBPP\subseteq NP or NPBPPNP\subseteq BPP.

We just guess: BPP=PBPP=P thus BPPNPBPP\subseteq NP.

But we can prove that BPPBPP is contained in the second level of polynomial-time hierarchy.

🎯Theorem 36. BPPΣ2PΠ2PBPP\subseteq \Sigma_2^P\cap\Pi_2^P.

Prove that BPPΣ2PBPP\subseteq\Sigma_2^P. From this also we get BPPΠ2PBPP\subseteq\Pi_2^P.

  • Let LBPPL\in BPP. We have a polynomial q(n)q(n) and a language LPL'\in P s.t. for all xx we have

    xLPry{0,1}q(x)[x,yL]112q(x),x∉LPry{0,1}q(x)[x,yL]<112q(x).x\in L\Rarr\Pr_{y\in\{0,1\}^{q(|x|)}}[\langle x,y\rangle\in L']\ge1-\frac{1}{2q(|x|)},\\ x\not\in L\Rarr\Pr_{y\in\{0,1\}^{q(|x|)}}[\langle x,y\rangle\in L']<1-\frac{1}{2q(|x|)}.

  • Let m=q(x)m=q(|x|). For given xx, we define Sx={y{0,1}mx,yL}S_x=\{y\in\{0,1\}^m|\langle x,y\rangle\in L'\}. Thus, for all xx we have

    xLSx(112m)2m,x∉LSx<12m2m.x\in L\Rarr|S_x|\ge(1-\frac{1}{2m})2^m,\\ x\not\in L\Rarr|S_x|<\frac{1}{2m}2^m.

    Claim that xLx\in L iff

    u1,,um{0,1}mr{0,1}m:i=1mx,uirL,\exist u_1,\cdots, u_m\in\{0,1\}^m\forall r\in\{0,1\}^m:\\ \bigvee_{i=1}^m\langle x,u_i\oplus r\rangle\in L',

    where uiru_i\oplus r denote the coordinate-wise exclusive-or. 什么是坐标或运算?

  • This shows that LΣ2PL\in\Sigma_2^P since this can be done in polynomial time.

It remains to prove the predicate is equivalent to i=1muiSx={0,1}m\bigcup_{i=1}^mu_i\oplus S_x=\{0,1\}^m.

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). BPPP/polyBPP\subseteq P/poly.

证明也不太懂