Are you sure?
This action might not be possible to undo. Are you sure you want to continue?
Lecture 3: Linearity Testing
Lecturer: Prahladh Harsha Scribe: Joshua A. Grochow
In today’s lecture we’ll go over some preliminaries to the coding theory we will need
throughout the course. In particular, we will go over the WalshHadamard code and the
BlumLubyRubinfeld linearity test. In the following lecture we will use these tools to show
that NP ⊆ PCP[poly, O(1)] (recall that our goal is ultimately to bring the polynomial
amount of randomness down to a logarithmic amount). A common feature throughout the
course is that we will use codes to construct PCPs and viceversa, construct useful codes
from PCPs.
3.1 Coding Theory – Preliminaries
Coding theory is the study of how to communicate reliably over a noisy channel. The most
common setting is as follows: A message m is put through an encoder E, yielding a value
E(m), also called the codeword (typically much longer than m). The codeword E(m) is
then sent through the noisy channel and arrives at the other end with some noise introduced
η by the channel as E(m) + η. The decoder D then takes E(m) + η as input, and ideally
outputs m as long as the noise is not too much. (Note that it is expected of the decoder
that when applied to E(m) it outputs m.)
Formally, a code is speciﬁed by an encoding function C : ¦0, 1¦
k
→ ¦0, 1¦
n
; the outputs
of C are called codewords. The rate of the code C is k/n, i.e. the ratio of input bits to
codeword bits. Heuristically, this is the amount of information of the input message per bit
of the codeword.
An important notion in coding theory is that of the distance between two codewords;
here (and typically) we use either the Hamming distance ∆(x, y) = #¦i[x
i
= y
i
¦ or the
normalized (Hamming) distance δ(x, y) = ∆(x, y)/n (where n = [x[ = [y[).
The distance d of a code C is the minimum distance between two distinct codewords,
i.e., min
x=y
¦∆(C(x), C(y))¦. For a code of distance d, if the number of bits ﬂipped is
strictly less than d/2 (i.e., weight(η) ≤ d/2), then E(m) +η can be uniquely decoded to m.
A code C : ¦0, 1¦
k
→ ¦0, 1¦
n
with distance d is called an (n, k, d)
2
code, where n is the size
of the codewords, k the size of the input, d the distance of the code, and 2 the size of the
alphabet ¦0, 1¦.
A code C is called linear if for all x and y, if x and y are codewords then so is x + y
(where addition is performed bitwise modulo 2 – i.e. XOR)
1
. To indicate that a (n, k, d)
2

code is also linear, we use the notation [n, k, d]
2
code (with square brackets). The word
“code,” is commonly used to refer to both the encoding function C (as stated above), as
well as the set of all codewords Im(C).
Typically, the most signiﬁcant tradeoﬀ in coding theory is that between the rate and
distance of a code. For example, given a particular rate, we might ask what is the best
1
Note that if we work over a larger alphabet than binary – e.g. over a larger ﬁnite ﬁeld, we require the
additional constraint that x is a codeword then so are all scalar multiples of x (i.e., αx)
31
distance that can be achieved.
3.1.1 Algorithmic Questions and Sublinear Time Algorithms
There are three main algorithmic questions that arise in coding theory:
1. Complexity of encoding;
2. Error detection: given r ∈ ¦0, 1¦
n
, decide if r is a codeword; and
3. Error correction: given r ∈ ¦0, 1¦
n
, ﬁnd x ∈ ¦0, 1¦
k
minimizing ∆(r, C(x)).
In this course, we will interested in these questions in the context of sublinear time
algorithms. We need to be speciﬁc what we mean by sublinear time. Note that a sublinear
time algorithm A to compute a function f ¦0, 1¦
k
→ ¦0, 1¦
n
doesn’t have enough time to
read it’s input or write it’s output. We get over this by accessing the input and writing the
output by oracle access. That is, an oracle machine A is a sublinear time algorithm for f if
A
x
(j) = f(x)
j
where f(x)
j
is the jth bit of f(x). Note that j need only be log n bits, so
can be read entirely in sublinear time. More formally,
• The input is represented implicitly by an oracle. Whenever the sublinear time algo
rithm wants to access the j
th
bit of the input string x (for some j ∈ [k]), it queries
the input xoracle for the j
th
bit and obtains x
j
.
Figure 1: Sublinear Time Algorithms
• The output is not explicitly written by the algorithm, instead it is only implicitly
given by the algorithm. Formally, on being queried for index i of the output string
f(x) (for some i ∈ [n]), the algorithm outputs the bit f(x)
i
. Thus, the algorithm itself
behaves as an oracle for the string f(x), which in turn has oracle access to the input
oracle x.
• Since the algorithm does not read the entire input x, we cannot expect it compute
the output f(x) exactly. We instead relax our guarantee on the output as follows:
On input x ∈ ¦0, 1¦
k
, the algorithm must compute f(x
) exactly for some x
∈ ¦0, 1¦
k
that is close to the actual input x. In other words, the algorithm computes functions
on some approximation to the input instead of the input itself.
32
Property testing, for those familiar with it, is typically done in this framework. Figure 1
gives a pictorial description of a sublinear time algorithm with the above mentioned relax
ations.
Now we’ll consider the algorithmic questions of coding theory in the sublinear time
framework. Let’s consider the questions above one by one:
1. For a code to have good errorcorrecting properties, most bits of the codeword needs
to depend on most messagebits. Taking this into account, it does not seem reasonable
to expect a “good” code to have sublinear time encoding. (However, there has been
some recent work in the area of locally encodable codes by relaxing some of the error
correction properties of the code).
2. Error detection: in this context, error detection is known as local testing. That is,
given r ∈ ¦0, 1¦
n
, test if either r is a codeword or r is far from every codeword (similar
to the gap problems we saw earlier, and also to property testing).
3. Error correction is known as local decoding in this context. Given j, the decoder
queries some bits of a noisy codeword C(x) + η and outputs the jth bit of x. more
formally, we say a code is locally decodable if there exists a local decoder Dec such
that for all x and r where ∆(r, C(x)) < , the decoder satisﬁes
∀i ∈ ¦1, . . . , k¦, Pr[Dec
r
(i) = x
i
] ≥
3
4
.
If there is such a decoder for a given code C and it makes fewer than q queries, then
we say C is (q, )locally decodable.
Obviously, sublinear time algorithms in general, and local decoding and local testing
algorithms in particular, will be randomized algorithms.
Note that local decoding is only required to work when the input is suﬃciently close to a
codeword, whereas local testability determines whether a given string is close to a codeword
or far from any codeword. Thus the local decodability of a code says nothing about its local
testability.
3.2 The WalshHadamard Code and Linearity Testing
Now onto our ﬁrst code, the WalshHadamard code. This will be the main tool in proving
that NP has exponential size PCPs, i.e. NP ⊆ PCP[poly, O(1)]. There are two dual views
of the WalshHadamard code: on the one hand, WH(x) is the evaluation of every linear
function at x; on the other hand, it consists of the dot product of x with every ∈ ¦0, 1¦
n
.
A function f ¦0, 1¦
k
→ ¦0, 1¦ is linear if ∀x, y, f(x + y) = f(x) + f(y).
For example, for any a ∈ ¦0, 1¦
k
, the function
a
(x) =
a
i
x
i
mod 2 (i.e. the dot
product of a and x as vectors over GF(2)) is a linear function. In fact, L
k
= ¦
a
[a ∈ ¦0, 1¦
k
¦
is the set of all linear boolean functions. (Proof: observe that the space of linear functions
is a vector space, and has the same dimension as L
k
.)
The WalshHadamard code WH : ¦0, 1¦
k
→ ¦0, 1¦
2
k
is then deﬁned as WH(x) =
x
,
i.e. WH(x) is the truth table of
x
. More formally, for any a ∈ ¦0, 1¦
k
, the ath bit of the
WalshHadamard codeword WH(x) is WH(x)
a
=
x
(a).
33
Since any two distinct linear functions disagree on exactly half the set of inputs (i.e,
Pr
a
[
x
(a) =
y
(a)] = 1/2, for x = y), the fractional distance of the WalshHadamard codes
is 1/2. Thus the WalshHadamard code is a [k, 2
k
, 2
k−1
]code. It has very good distance,
but poor rate.
It is useful to note that there are two dual views of the WalshHadamard code based on
the fact that WH(x)
a
=
x
(a) =
a
(x). Thus, WH(x) is both the evaluation of the linear
function
x
at every point as well as the evaluation of every linear function at the point x.
Note that the WH code has the special property that the input bits x
i
are in fact a subset
of the codeword bits, since x
i
=
x
(e
i
). Codes with this property are called systematic codes.
3.2.1 Local Decodability of the WalshHadamard Code
Decoding the WalshHadamard code is very simple. Given a garbled codeword f : ¦0, 1¦
k
→
¦0, 1¦, which is δclose to some WalshHadamard codeword, the decoder Dec works as
follows: (The decoder Dec has oracle access to the function f)
Dec
f
: “On input z,
1. Choose r ∈
R
¦0, 1¦
k
2. Query f(z + r) and f(r)
3. Output f(z + r) −f(r)
Claim 3.1. If f : ¦0, 1¦
k
→ ¦0, 1¦ is δclose to WH(x), then,
Pr[Dec
f
(z) =
x
(z)] ≥ 1 −2δ, ∀x ∈ ¦0, 1¦
k
.
Proof. Since f is δclose to
x
, we have that for a random r, the probability that f(z +r) =
x
(z + r) is at least 1 − δ, and so is the probability that f(r) =
x
(r). If both of these
conditions hold, then Dec
f
(z) =
x
(z), by the linearity of
x
. Thus Pr
r
[Dec
f
(z) =
x
(z)] ≥
1 −2δ.
Since the decoder only makes two queries, the WalshHadamard code is 2locally decod
able.
3.2.2 Local Testability of the WalshHadamard Code: Linearity Testing
To locally test the WH code, we wish to test whether a given truth table is the truth table
of a linear function. The problem of local testing of the WH code is more commonly called
linearity testing. Formally, given f ¦0, 1¦
k
→ ¦0, 1¦ we want to test whether it is a linear
function (WH codeword) or far from linear.
The test is, as in the WH decoder, quite simple: pick y and z uniformly at random from
¦0, 1¦
k
and check that f(z) + f(y) = f(z + y). This test was proposed and ﬁrst analyzed
by Blum, Luby and Rubinfeld [BLR93].
BLRTest
f
: “ 1. Choose y, z ∈
R
¦0, 1¦
k
independently
2. Query f(y), f(z), and f(y + z)
3. Accept if f(y) + f(z) = f(y + z).
34
Obviously if f is linear, this test will pass with probability 1. The question is, can there
be function that are far from linear but still pass this test with high probability? No, as
shown in the following
Theorem 3.2. If f is δfar from linear, then
Pr[BLRTest
f
accepts ] ≤ 1 −δ.
The above theorem is tight since a random function is 1/2far from linear, and passes
the BLRTest with probability exactly 1/2.
The original proof of Blum, Luby and Rubinfeld [BLR93] is a combinatorial proof of
a weaker version of the above theorem, but we will give an algebraic proof, as similar
techniques will arise later in the course. This algebraic proof is due to Bellare, Coppersmith,
h˚astad, Kiwi and Sudan [BCH
+
96]. Before proceeding to the proof, we will ﬁrst need to
equip ourselves with some basics of Boolean Fourier analysis.
3.2.3 Fourier Analysis
First, rather than working over ¦0, 1¦ as the output of a linear function, it will be convenient
to treat the output space as ¦+1, −1¦ (the roots of unity) under multiplication. Thus the
Boolean 0 corresponds to 1 in this setting, and the Boolean 1 corresponds to 1. Linearity
now takes the form: f ¦0, 1¦
n
→ ¦+1, −1¦ is linear if f(x + y) = f(x)f(y).
Consider the family of functions T = ¦f : ¦0, 1¦
k
→ R¦ and equip T with an addition
(f + g)(x) = f(x) + g(x). It is clear that T is a vector space over the reals. Furthermore,
the characteristic functions ¦δ
a
[a ∈ ¦0, 1¦
k
¦ are a basis, where δ
a
(x) = 1 if x = a and 0
otherwise. Thus T has dimension 2
k
.
We will now show that the linear functions of the form χ
a
(x) = (−1)
a(x)
= (−1)
P
a
i
x
i
( mod 2)
also form a basis for T. For this, it is fruitful to deﬁne an inner product on T as follows:
'f, g` = Exp
x∈{0,1}
k [f(x)g(x)] =
1
2
k
x∈{0,1}
k
f(x)g(x).
(It is an easy exercise to check that this is in fact an inner product.) Note that there are
already 2
k
= dimT functions of this form, so all we need to do is show that they are linearly
independent.
We begin by examining a few basic properties of the functions χ
a
. First, note that
Property 1. χ
a
(x + y) = χ
a
(x)χ
a
(y)
i.e. χ
a
is linear, as mentioned previously. Second,
Property 2. χ
a+b
(x) = χ
a−b
(x) = χ
a
(x)χ
b
(x)
i.e. χ
a
(x) is also linear in a; this should come as no surprise, because of the duality of
a
(x) as both a linear function of a and of x.
The ﬁrst property we will need that is not entirely obvious is that
Property 3.
Exp
x
[χ
a
(x)] =
1 if a = 0
0 otherwise
35
Proof. If a = 0, this clearly holds. If a = 0, then by permuting the indices we may assume
that a
1
= 0 without loss of generality. Then we have
2
k
Exp
x
[χ
a
(x)] =
x
(−1)
P
a
i
x
i
=
x:x
1
=1
(−1)
P
a
i
x
i
+
x:x
1
=0
(−1)
P
a
i
x
i
Then, since (−1)
a(0y)
= −(−1)
a(1y)
, these two sums exactly cancel out.
We then have,
Property 4.
'χ
a
, χ
b
` =
1 if a = b
0 otherwise
.
This follows from the above via 'χ
a
, χ
b
` = E
x
[χ
a
(x)χ
b
(x)] = E
x
[χ
a−b
(x)], and then
applying the above fact.
Thus, the χ
a
form not only a basis for T, but also an orthonormal basis for T. Since
the χ
a
form an orthonormal basis, for any f ∈ T we may write f =
a
ˆ
f
a
χ
a
for 'f, χ
a
` =
ˆ
f
a
∈ R. These
ˆ
f
a
are called the Fourier coeﬃcients of f.
Observer that if the normalized distance δ(f, χ
a
) = , then
ˆ
f
a
= 1(1−)+(−1) = 1−2,
so the Fourier coeﬃcients capture the normalized distance from linear functions.
Now we come to one of the most basic useful facts in Fourier analysis:
Property 5 (Parseval’s identity). 'f, f` =
ˆ
f
2
a
Proof. Writing f in terms of the basis χ
a
, we get:
'f, f` = '
a
ˆ
f
a
χ
a
,
b
ˆ
f
b
χ
b
`
=
a,b
ˆ
f
a
ˆ
f
b
'χ
a
, χ
b
` (by linearity of ', `)
=
a
ˆ
f
2
a
where the last line follows from the previous because the χ
a
form an orthonormal basis.
Corollary 3.3. In particular, if f is a Boolean function, i.e. ±1valued, then
ˆ
f
2
a
= 1.
3.2.4 Proof of Soundness of BLRTest
Finally, we come to the proof of the soundness of the BlumLubyRubinfeld linearity test:
Proof of Theorem 3.2. Suppose f is δfar from any linear function. Note that we can rewrite
the linearity condition f(x)f(y) = f(x + y) as f(x)f(y)f(x + y) = 1, since f is ±1valued.
Then
Pr
x,y
[BLRTest accepts f] = Pr
x,y
[f(x)f(y)f(x + y) = 1]
36
Note that for any random variable Z with values in ¦+1, −1¦, Pr(Z = 1) = Exp[
1+Z
2
],
since if Z = 1, then (1 + Z)/2 = 1 and if Z = −1, then (1 + Z)/2 = 0, so (1 + Z)/2 is an
indicator variable for the event Z = 1. Thus we have
Pr
x,y
[BLRTest accepts f] = Exp
x,y
1 + f(x)f(y)f(x + y)
2
=
1
2
+
1
2
Exp
x,y
[f(x)f(y)f(x + y)]
Now, writing out f in terms of its Fourier coeﬃcients, we get
Pr
x,y
[BLRTest accepts f] =
1
2
+
1
2
Exp
x,y
a,b,c
ˆ
f
a
ˆ
f
b
ˆ
f
c
χ
a
(x)χ
b
(y)χ
c
(x + y)
=
1
2
+
1
2
Exp
x,y
a,b,c
ˆ
f
a
ˆ
f
b
ˆ
f
c
χ
a
(x)χ
b
(y)χ
c
(x)χ
c
(y)
Then, we apply linearity of expectation and the fact that x and y are independent to get:
Pr
x,y
[BLR accepts f] =
1
2
+
1
2
a,b,c
ˆ
f
a
ˆ
f
b
ˆ
f
c
Exp
x
[χ
a
(x)χ
c
(x)] Exp
y
[χ
b
(y)χ
c
(y)]
=
1
2
+
1
2
a,b,c
ˆ
f
3
a
≤
1
2
+
1
2
max
a
(
ˆ
f
a
)
a
ˆ
f
2
a
=
1
2
+
1
2
max
a
(
ˆ
f
a
) (by Parseval’s identity)
= 1 −δ
where the last line follows from the fact that f is δfar from linear, so its largest Fourier
coeﬃcient can be at most 1 −2δ, as noted previously.
References
[BCH
+
96] Mihir Bellare, Don Coppersmith, Johan H˚astad, Marcos A. Kiwi, and
Madhu Sudan. Linearity testing in characteristic two. IEEE Transactions on
Information Theory, 42(6):1781–1795, November 1996. (Preliminary version in
36th FOCS, 1995). doi:10.1109/18.556674.
[BLR93] Manuel Blum, Michael Luby, and Ronitt Rubinfeld. Self
testing/correcting with applications to numerical problems. J. Computer and
System Sciences, 47(3):549–595, December 1993. (Preliminary Version in 22nd
STOC, 1990). doi:10.1016/00220000(93)90044W.
37
an oracle machine A is a sublinear time algorithm for f if Ax (j) = f (x)j where f (x)j is the jth bit of f (x). Whenever the sublinear time algorithm wants to access the j th bit of the input string x (for some j ∈ [k]). we will interested in these questions in the context of sublinear time algorithms. We need to be speciﬁc what we mean by sublinear time. Complexity of encoding.distance that can be achieved. 1}k minimizing ∆(r. Figure 1: Sublinear Time Algorithms • The output is not explicitly written by the algorithm. 1}k that is close to the actual input x. on being queried for index i of the output string f (x) (for some i ∈ [n]).1. C(x)). instead it is only implicitly given by the algorithm. We instead relax our guarantee on the output as follows: On input x ∈ {0. We get over this by accessing the input and writing the output by oracle access. Formally. ﬁnd x ∈ {0. 3. we cannot expect it compute the output f (x) exactly. it queries the input xoracle for the j th bit and obtains xj . Error detection: given r ∈ {0. In other words. Note that a sublinear time algorithm A to compute a function f {0. the algorithm outputs the bit f (x)i . 1}n . the algorithm computes functions on some approximation to the input instead of the input itself. More formally. That is. the algorithm must compute f (x ) exactly for some x ∈ {0. 1}k → {0. In this course. 1}n . • The input is represented implicitly by an oracle. so can be read entirely in sublinear time. Error correction: given r ∈ {0. 32 . Thus. • Since the algorithm does not read the entire input x. the algorithm itself behaves as an oracle for the string f (x). and 3. 1}n doesn’t have enough time to read it’s input or write it’s output. 1}k . Note that j need only be log n bits. which in turn has oracle access to the input oracle x. decide if r is a codeword.1 Algorithmic Questions and Sublinear Time Algorithms There are three main algorithmic questions that arise in coding theory: 1. 2.
More formally. 1} is linear if ∀x. Given j. There are two dual views of the WalshHadamard code: on the one hand. For a code to have good errorcorrecting properties. 1}k → {0. is typically done in this framework. we say a code is locally decodable if there exists a local decoder Dec such that for all x and r where ∆(r. 33 . and also to property testing). most bits of the codeword needs to depend on most messagebits. there has been some recent work in the area of locally encodable codes by relaxing some of the errorcorrection properties of the code). 1}k → {0. . the decoder queries some bits of a noisy codeword C(x) + η and outputs the jth bit of x. (However. A function f {0. given r ∈ {0. and has the same dimension as Lk . Taking this into account. i. . 2. (Proof: observe that the space of linear functions is a vector space. That is.e. error detection is known as local testing. for any a ∈ {0. 3.) k The WalshHadamard code W H : {0. f (x + y) = f (x) + f (y). more formally. Note that local decoding is only required to work when the input is suﬃciently close to a codeword. the ath bit of the WalshHadamard codeword W H(x) is W H(x)a = x (a).e. i. 1}2 is then deﬁned as W H(x) = x . C(x)) < . . it does not seem reasonable to expect a “good” code to have sublinear time encoding. N P ⊆ P CP [poly. Let’s consider the questions above one by one: 1. then we say C is (q. 4 If there is such a decoder for a given code C and it makes fewer than q queries. . 3. the WalshHadamard code. For example. and local decoding and local testing algorithms in particular. Obviously. the decoder satisﬁes 3 ∀i ∈ {1. it consists of the dot product of x with every ∈ {0.Property testing. on the other hand. In fact. will be randomized algorithms. the dot product of a and x as vectors over GF (2)) is a linear function.2 The WalshHadamard Code and Linearity Testing Now onto our ﬁrst code. 1}k . Pr[Decr (i) = xi ] ≥ . Now we’ll consider the algorithmic questions of coding theory in the sublinear time framework. the function a (x) = ai xi mod 2 (i. This will be the main tool in proving that N P has exponential size PCPs. Error correction is known as local decoding in this context. for those familiar with it.e. 1}n . 1}k } is the set of all linear boolean functions. for any a ∈ {0. y. 1}k . W H(x) is the truth table of x . whereas local testability determines whether a given string is close to a codeword or far from any codeword. 1}n . Lk = { a a ∈ {0. Thus the local decodability of a code says nothing about its local testability. W H(x) is the evaluation of every linear function at x. O(1)]. Error detection: in this context. test if either r is a codeword or r is far from every codeword (similar to the gap problems we saw earlier. k}. sublinear time algorithms in general. Figure 1 gives a pictorial description of a sublinear time algorithm with the above mentioned relaxations. )locally decodable.
2. 3. It has very good distance. 1}k independently 2. then. 2k−1 ]code.1 Local Decodability of the WalshHadamard Code Decoding the WalshHadamard code is very simple. we have that for a random r.2. If f : {0. Thus the WalshHadamard code is a [k. as in the WH decoder. and so is the probability that f (r) = x (r). Luby and Rubinfeld [BLR93]. This test was proposed and ﬁrst analyzed by Blum. 34 . Pr[Decf (z) = x (z)] ≥ 1 − 2δ. the decoder Dec works as follows: (The decoder Dec has oracle access to the function f ) Decf : “On input z. the probability that f (z + r) = x (z + r) is at least 1 − δ. Choose y. Choose r ∈R {0. 3. 1} is δclose to W H(x). 1}. then Decf (z) = x (z). Proof. BLRTestf : “ 1. 1}k and check that f (z) + f (y) = f (z + y). Codes with this property are called systematic codes. 2k . Accept if f (y) + f (z) = f (y + z). If both of these conditions hold. 1}k . 1. z ∈R {0. by the linearity of x . W H(x) is both the evaluation of the linear function x at every point as well as the evaluation of every linear function at the point x. Output f (z + r) − f (r) Claim 3. Pra [ x (a) = y (a)] = 1/2. ∀x ∈ {0. the fractional distance of the WalshHadamard codes is 1/2. since xi = x (ei ). but poor rate. Thus. f (z). the WalshHadamard code is 2locally decodable. 1} we want to test whether it is a linear function (WH codeword) or far from linear. 1}k 2.e.Since any two distinct linear functions disagree on exactly half the set of inputs (i. The problem of local testing of the WH code is more commonly called linearity testing. Note that the WH code has the special property that the input bits xi are in fact a subset of the codeword bits. Query f (y).2 Local Testability of the WalshHadamard Code: Linearity Testing To locally test the WH code.1. given f {0. Query f (z + r) and f (r) 3. for x = y). Since f is δclose to x . Thus Prr [Decf (z) = x (z)] ≥ 1 − 2δ. 1}k → {0. which is δclose to some WalshHadamard codeword. Formally. 1}k → {0. and f (y + z) 3. Since the decoder only makes two queries. Given a garbled codeword f : {0. we wish to test whether a given truth table is the truth table of a linear function. It is useful to note that there are two dual views of the WalshHadamard code based on the fact that W H(x)a = x (a) = a (x). The test is. quite simple: pick y and z uniformly at random from {0. 1}k → {0.
Expx [χa (x)] = 1 if a = 0 0 otherwise 35 .1}k (It is an easy exercise to check that this is in fact an inner product. this test will pass with probability 1. −1} is linear if f (x + y) = f (x)f (y). First. Thus the Boolean 0 corresponds to 1 in this setting. Property 2. The question is.1}k [f (x)g(x)] = 1 · 2k f (x)g(x). We begin by examining a few basic properties of the functions χa . Before proceeding to the proof.e.2. it will be convenient to treat the output space as {+1. 1}n → {+1. can there be function that are far from linear but still pass this test with high probability? No. x∈{0. a The ﬁrst property we will need that is not entirely obvious is that Property 3. The original proof of Blum. 3. Furthermore. Linearity now takes the form: f {0. as mentioned previously.Obviously if f is linear. Second. The above theorem is tight since a random function is 1/2far from linear. where δa (x) = 1 if x = a and 0 otherwise. as shown in the following Theorem 3. note that Property 1. 1}k → R} and equip F with an addition (f + g)(x) = f (x) + g(x). 1}k } are a basis. the characteristic functions {δa a ∈ {0. h˚ astad. For this. 1} as the output of a linear function. rather than working over {0. Kiwi and Sudan [BCH+ 96]. P We will now show that the linear functions of the form χa (x) = (−1) a (x) = (−1) ai xi ( mod 2) also form a basis for F. because of the duality of (x) as both a linear function of a and of x. If f is δfar from linear. we will ﬁrst need to equip ourselves with some basics of Boolean Fourier analysis. as similar techniques will arise later in the course. Coppersmith. Thus F has dimension 2k . Luby and Rubinfeld [BLR93] is a combinatorial proof of a weaker version of the above theorem.e. Consider the family of functions F = {f : {0. χa (x) is also linear in a.2. χa+b (x) = χa−b (x) = χa (x)χb (x) i. then Pr[BLRTestf accepts ] ≤ 1 − δ. This algebraic proof is due to Bellare.3 Fourier Analysis First. this should come as no surprise. χa is linear. and passes the BLRTest with probability exactly 1/2. g = Expx∈{0. It is clear that F is a vector space over the reals. −1} (the roots of unity) under multiplication. and the Boolean 1 corresponds to 1. so all we need to do is show that they are linearly independent. χa (x + y) = χa (x)χa (y) i. but we will give an algebraic proof. it is fruitful to deﬁne an inner product on F as follows: f.) Note that there are already 2k = dim F functions of this form.
Corollary 3. the χa form not only a basis for F. but also an orthonormal basis for F. then by permuting the indices we may assume that a1 = 0 without loss of generality.b ˆ ˆ fa fb χa . χa = ˆ ˆ fa ∈ R. b ˆ fb χb = a. These fa are called the Fourier coeﬃcients of f . f. · ) ˆ2 fa a = where the last line follows from the previous because the χa form an orthonormal basis. Then Pr [BLRTest accepts f ] = Pr [f (x)f (y)f (x + y) = 1] x. otherwise This follows from the above via χa .e. ˆ Observer that if the normalized distance δ(f.2. this clearly holds. ±1valued. since (−1) a (0y) (−1) x:x1 =1 P ai xi + (−1) x:x1 =0 P ai xi = −(−1) a (1y) .Proof. we get: f. Since ˆ the χa form an orthonormal basis. 3. and then applying the above fact. since f is ±1valued. Now we come to one of the most basic useful facts in Fourier analysis: Property 5 (Parseval’s identity).3. χb (by linearity of ·. χb = Ex [χa (x)χb (x)] = Ex [χa−b (x)].2. these two sums exactly cancel out. Suppose f is δfar from any linear function. χb = 1 0 if a = b . Property 4. χa ) = . so the Fourier coeﬃcients capture the normalized distance from linear functions. for any f ∈ F we may write f = a fa χa for f.y x. In particular. then fa = 1(1− )+(−1) = 1−2 . If a = 0. Then we have 2k · Expx [χa (x)] = x (−1) P ai xi = Then. we come to the proof of the soundness of the BlumLubyRubinfeld linearity test: Proof of Theorem 3. Writing f in terms of the basis χa .4 Proof of Soundness of BLRTest Finally. f = a ˆ fa χa . Note that we can rewrite the linearity condition f (x)f (y) = f (x + y) as f (x)f (y)f (x + y) = 1. i. if f is a Boolean function.y 36 . Thus. If a = 0. then ˆ2 fa = 1. We then have. χa . f = ˆ2 fa Proof.
so its largest Fourier coeﬃcient can be at most 1 − 2δ. Don Coppersmith.1109/18. References [BCH+ 96] Mihir Bellare.b.c = ≤ ˆ3 fa a. 42(6):1781–1795. P r(Z = 1) = Exp[ 1+Z ].Note that for any random variable Z with values in {+1. 47(3):549–595. doi:10. then (1 + Z)/2 = 0. Johan H˚ astad. Kiwi.c 1 1 ˆ + max(fa ) 2 2 a ˆ2 fa a 1 1 ˆ + max(fa ) (by Parseval’s identity) = 2 2 a = 1−δ where the last line follows from the fact that f is δfar from linear. Selftesting/correcting with applications to numerical problems. November 1996. [BLR93] Manuel Blum. Michael Luby. J. then (1 + Z)/2 = 1 and if Z = −1. writing out f in terms of its Fourier coeﬃcients. 1990). Computer and System Sciences.y fa fb fc χa (x)χb (y)χc (x + y) x. 1995).y fa fb fc χa (x)χb (y)χc (x)χc (y) 2 2 a. Thus we have Pr [BLRTest accepts f ] = Expx.y x.c 1 1 ˆ ˆˆ = + Expx.b. December 1993. Marcos A. so (1 + Z)/2 is an indicator variable for the event Z = 1.556674. we apply linearity of expectation and the fact that x and y are independent to get: Pr [BLR accepts f ] = x. Linearity testing in characteristic two. −1}. IEEE Transactions on Information Theory. 2 since if Z = 1.c Then. 37 . and Madhu Sudan.1016/00220000(93)90044W.b.b. (Preliminary version in 36th FOCS. doi:10. and Ronitt Rubinfeld. as noted previously. (Preliminary Version in 22nd STOC.y [f (x)f (y)f (x + y)] 2 2 Now. we get 1 1 ˆ ˆˆ Pr [BLRTest accepts f ] = + Expx.y 1 + f (x)f (y)f (x + y) 2 = 1 1 + Expx.y 2 2 a.y 1 1 + 2 2 1 1 + 2 2 ˆ ˆˆ fa fb fc Expx [χa (x)χc (x)] Expy [χb (y)χc (y)] a.
This action might not be possible to undo. Are you sure you want to continue?
Use one of your book credits to continue reading from where you left off, or restart the preview.