Randomness Extractors Learning Notes

Pseudorandomness Chapter 66 learning notes.

IID-Bit Sources: A simple version of this question was already
considered by von Neumann. He looked at sources that consist of
boolean random variables X1,X2,…,Xn ∈ {0,1} that are independent
but biased. That is, for every i, Pr [Xi = 1] = δ for some unknown δ.
How can such a source be converted into a source of independent, unbiased bits? Von Neumann proposed the following extractor: Break all
the variables in pairs and for each pair output 0 if the outcome was
01, 1 if the outcome was 10, and skip the pair if the outcome was 00
or 11. This will yield an unbiased random bit after 1/(2δ(1 − δ)) pairs
on average.

Statistical Difference: For random variables XX and YY taking values in U\mathcal U, their statistical difference (a.k.a. variation distance) is Δ(X,Y)maxTUPr[XT]Pr[YT]\Delta(X,Y ) \triangleq \max\limits_{T \subset \mathcal U} \left|\Pr[X ∈ T] − \Pr[Y ∈ T]\right|. We say that XX and YY are εε-close if Δ(X,Y)ε\Delta (X,Y ) ≤ ε.

Deterministic Extractors: Let C\mathcal C be a class of sources on {0,1}n\{0,1\}^n. An εε-extractor for C\mathcal C is a function Ext:{0,1}n{0,1}m\text{Ext} : \{0,1\}^n \to \{0,1\}^m such that for every XCX ∈ \mathcal C, Ext(X)\text{Ext}(X) is εε-close to UmU_m.

Properties of Statistical Difference: Let X,Y,Z,X1,X2,Y1,Y2X,Y,Z,X_1,X_2,Y_1,Y_2 be random variables taking values in a universe U\mathcal U. Then,

(1) Δ(X,Y)0\Delta (X,Y ) ≥ 0, with equality iff XX and YY are identically distributed,

(2) Δ(X,Y)1\Delta (X,Y ) ≤ 1, with equality iff XX and YY have disjoint supports,

(3) Δ(X,Y)=Δ(Y,X)\Delta(X,Y ) = \Delta(Y,X),

(4) Δ(X,Z)Δ(X,Y)+Δ(Y,Z)\Delta(X,Z) ≤ \Delta(X,Y ) + \Delta(Y,Z),

(5) for every function ff, we have Δ(f(X),f(Y))Δ(X,Y)\Delta(f(X),f(Y )) ≤ \Delta(X,Y ),

(6) Δ((X1,X2),(Y1,Y2))Δ(X1,Y1)+Δ(X2,Y2)\Delta((X_1,X_2),(Y_1,Y_2)) ≤ \Delta(X_1,Y_1) + \Delta(X_2,Y_2) if X1X_1 and X2X_2, as well as Y1Y_1 and Y2Y_2, are independent, and

(7) Δ(X,Y)=12XY1\Delta(X,Y ) = \dfrac 12 · |X − Y |_1.

Proof: Properties 141\sim 4 are obviously correct.

(5) For every function f:UUf:\mathcal U \to\mathcal U', Δ(f(X),f(Y))=maxTUPr[f(X)T]Pr[f(Y)T]=maxTUPr[Xf1(T)]Pr[Yf1(T)]maxTUPr[XT]Pr[YT]=Δ(X,Y)\Delta(f(X),f(Y ))=\max\limits_{T'\subset \mathcal U'}|\Pr[f(X)\in T']-\Pr[f(Y)\in T']|=\max\limits_{T'\subset \mathcal U'}|\Pr[X\in f^{-1}(T')]-\Pr[Y\in f^{-1}(T')]|\le \max\limits_{T\subset \mathcal U}|\Pr[X\in T]-\Pr[Y\in T]|=\Delta(X,Y).

(6)

(7) Δ(X,Y)=maxTUPr[XT]Pr[YT]=tS(Pr[X=t]Pr[Y=t])\Delta(X,Y )=\max\limits_{T \subset \mathcal U} \left|\Pr[X ∈ T] − \Pr[Y ∈ T]\right|=\sum_{t\in S} (\Pr[X=t]-\Pr[Y=t]), where S={tUPr[X=t]Pr[Y=t]}S=\{t\in \mathcal U\mid \Pr[X=t]\ge \Pr[Y=t]\}.

Due to the symmetry, we also have Δ(X,Y)=tT(Pr[Y=t]Pr[X=t])\Delta(X,Y )=\sum_{t\in T} (\Pr[Y=t]-\Pr[X=t]), where T={tUPr[X=t]<Pr[Y=t]}T=\{t\in \mathcal U\mid \Pr[X=t]< \Pr[Y=t]\}.

Thus:

Δ(X,Y)=12(tS(Pr[X=t]Pr[Y=t])+tT(Pr[Y=t]Pr[X=t]))=12XY1\Delta(X,Y )=\dfrac 12\cdot \left(\sum_{t\in S} (\Pr[X=t]-\Pr[Y=t])+\sum_{t\in T} (\Pr[Y=t]-\Pr[X=t])\right)=\dfrac 12\cdot |X-Y|_1

as desired.

\Box

Proposition: Let A(w;r)A(w;r) be a randomized algorithm such that A(w;Um)A(w;U_m) has error probability at most γγ, and let Ext:{0,1}n{0,1}m\text{Ext} : \{0,1\}^n \to \{0,1\}^m be an εε-extractor for a class C\mathcal C of sources on {0,1}n\{0,1\}^n. Define A(w;x)=A(w;Ext(x))A'(w;x) = A(w;\text{Ext}(x)). Then for every source XCX ∈ \mathcal C, A(w;X)A'(w;X) has error probability at most γ+ϵ\gamma+\epsilon.

Proof: The error probability of A(w;X)A'(w;X) is Pr[Ext(X)S]\Pr[\text{Ext}(X)\in S], where S{0,1}mS\subset \{0,1\}^m is the set of coin tosses sequences which makes A(w;Um)A(w;U_m) error. Note that Pr[UmS]γ\Pr[U_m\in S]\le \gamma.

Thus, Pr[Ext(X)S]Pr[UmS]+Δ(Ext(X),Um)γ+ϵ\Pr[\text{Ext}(X)\in S]\le \Pr[U_m\in S]+\Delta(\text{Ext}(X),U_m)\le \gamma+\epsilon.

\Box

Unpredictable-Bit Sources (a.k.a. Santha–Vazirani Sources): UnpredBitsn,δ\text{UnpredBits}_{n,δ} is the class of unpredictable-bit sources, i.e. for every ii, every x1,,xn{0,1}x_1,\ldots,x_n ∈ \{0,1\} and some constant δ>0δ > 0, satisfy δPr[Xi=1X1=x1,X2=x2,,Xi1=xi1]1δδ ≤ \Pr[X_i = 1 \mid X_1 = x_1,X_2 = x_2,\ldots,X_{i−1} = x_{i−1}] ≤ 1 − δ.

Problem 6.6 (Extracting from Unpredictable-Bit Sources):

(1) Let XX be a source taking values in {0,1}n\{0,1\}^n such that for all x,yx,y, Pr[X=x]/Pr[X=y](1δ)/δ\Pr[X = x]/\Pr[X = y] ≤ (1 − δ)/δ. Show that XUnpredBitsn,δX ∈ \text{UnpredBits}_{n,δ}.

(2) Prove that for every function Ext:{0,1}n{0,1}\text{Ext}: \{0,1\}^n \to \{0,1\} and every δ>0δ > 0, there exists a source XUnpredBitsn,δX ∈ \text{UnpredBits}_{n,δ} with parameter δδ such that Pr[Ext(X)=1]δ\Pr[\text{Ext}(X) = 1] ≤ δ or Pr[Ext(X)=0]1δ\Pr[\text{Ext}(X) = 0] ≥ 1 − δ.

Proof:

\Box

Entropy Measures: Let XX be a random variable. Then

  • the Shannon entropy of XX is:

    HSh(X)=ExRX[log21Pr[X=x]]\text{H}_{Sh}(X) =\mathop{\mathbb E}\limits_{x\mathop{\gets}\limits^{\text R} X}\left[ \log_2 \dfrac 1{\Pr[X=x]} \right]

  • the Rényi entropy of XX is:

    H2(X)=log2(1ExRX[Pr[X=x]])=log21CP(X)\text{H}_2(X)=\log_2\left(\dfrac 1{\mathop{\mathbb E}\limits_{x\mathop{\gets}\limits^{\text{R}}X} [\Pr[X=x]] }\right)=\log_2\dfrac 1{\text{CP}(X)}

  • the min-entropy of XX is:

    H(X)=minx{log21Pr[X=x]}\text{H}_\infty(X)=\min_x\left\{\log_2 \dfrac 1{\Pr[X=x]} \right\}