An Introduction to Property Testing
-
Upload
raymond-abbott -
Category
Documents
-
view
32 -
download
4
description
Transcript of An Introduction to Property Testing
![Page 1: An Introduction to Property Testing](https://reader036.fdocuments.in/reader036/viewer/2022070400/568134dc550346895d9c0e2d/html5/thumbnails/1.jpg)
An Introduction to Property Testing
Andy Drucker
1/07
![Page 2: An Introduction to Property Testing](https://reader036.fdocuments.in/reader036/viewer/2022070400/568134dc550346895d9c0e2d/html5/thumbnails/2.jpg)
Property Testing: ‘The Art of Uninformed Decisions’
This talk developed largely from a survey by Eldar Fischer [F97]--fun reading.
![Page 3: An Introduction to Property Testing](https://reader036.fdocuments.in/reader036/viewer/2022070400/568134dc550346895d9c0e2d/html5/thumbnails/3.jpg)
The Age-Old Question
Accuracy or speed?
Work hard or cut corners?
![Page 4: An Introduction to Property Testing](https://reader036.fdocuments.in/reader036/viewer/2022070400/568134dc550346895d9c0e2d/html5/thumbnails/4.jpg)
The Age-Old Question
Accuracy or speed?
Work hard or cut corners?
In CS: heuristics and approximation algorithms vs. exact algorithms for NP-hard problems.
![Page 5: An Introduction to Property Testing](https://reader036.fdocuments.in/reader036/viewer/2022070400/568134dc550346895d9c0e2d/html5/thumbnails/5.jpg)
The Age-Old Question
Both well-explored. But…
![Page 6: An Introduction to Property Testing](https://reader036.fdocuments.in/reader036/viewer/2022070400/568134dc550346895d9c0e2d/html5/thumbnails/6.jpg)
The Age-Old Question
Both well-explored. But…
“Constant time is the new polynomial time.”
![Page 7: An Introduction to Property Testing](https://reader036.fdocuments.in/reader036/viewer/2022070400/568134dc550346895d9c0e2d/html5/thumbnails/7.jpg)
The Age-Old Question
Both well-explored. But…
“Constant time is the new polynomial time.”
So, are there any corners left to cut?
![Page 8: An Introduction to Property Testing](https://reader036.fdocuments.in/reader036/viewer/2022070400/568134dc550346895d9c0e2d/html5/thumbnails/8.jpg)
The Setting
Given a set of n inputs x and a property P, determine if P(x) holds.
![Page 9: An Introduction to Property Testing](https://reader036.fdocuments.in/reader036/viewer/2022070400/568134dc550346895d9c0e2d/html5/thumbnails/9.jpg)
The Setting
Given a set of n inputs x and a property P, determine if P(x) holds.
Generally takes at least n steps (for sequential, nonadaptive algorithms).
![Page 10: An Introduction to Property Testing](https://reader036.fdocuments.in/reader036/viewer/2022070400/568134dc550346895d9c0e2d/html5/thumbnails/10.jpg)
The Setting
Given a set of n inputs x and a property P, determine if P(x) holds.
Generally takes at least n steps. (for sequential, nonadaptive algorithms).
Possibly infeasible if we are doing: internet or genome analysis, program checking, PCPs,…
![Page 11: An Introduction to Property Testing](https://reader036.fdocuments.in/reader036/viewer/2022070400/568134dc550346895d9c0e2d/html5/thumbnails/11.jpg)
First Compromise
What if we only want a check that rejects any x such that ~P(x), with probability > 2/3? Can we do better?
![Page 12: An Introduction to Property Testing](https://reader036.fdocuments.in/reader036/viewer/2022070400/568134dc550346895d9c0e2d/html5/thumbnails/12.jpg)
First Compromise
What if we only want a check that rejects any x such that ~P(x), with probability > 2/3? Can we do better?
Intuitively, we must expect to look at ‘almost all’ input bits if we hope to reject x that are only one bit away from satisfying P.
![Page 13: An Introduction to Property Testing](https://reader036.fdocuments.in/reader036/viewer/2022070400/568134dc550346895d9c0e2d/html5/thumbnails/13.jpg)
First Compromise
What if we only want a check that rejects any x such that ~P(x), with probability > 2/3? Can we do better?
Intuitively, we must expect to look at ‘almost all’ input bits if we hope to reject x that are only one bit away from satisfying P.
So, no.
![Page 14: An Introduction to Property Testing](https://reader036.fdocuments.in/reader036/viewer/2022070400/568134dc550346895d9c0e2d/html5/thumbnails/14.jpg)
Second Compromise
This kind of failure is universal. So, we must scale our hopes back.
![Page 15: An Introduction to Property Testing](https://reader036.fdocuments.in/reader036/viewer/2022070400/568134dc550346895d9c0e2d/html5/thumbnails/15.jpg)
Second Compromise
This kind of failure is universal. So, we must scale our hopes back.
The problem: those almost-correct instances are too hard.
![Page 16: An Introduction to Property Testing](https://reader036.fdocuments.in/reader036/viewer/2022070400/568134dc550346895d9c0e2d/html5/thumbnails/16.jpg)
Second Compromise
This kind of failure is universal. So, we must scale our hopes back.
The problem: those almost-correct instances are too hard.
The solution: assume they never occur!
![Page 17: An Introduction to Property Testing](https://reader036.fdocuments.in/reader036/viewer/2022070400/568134dc550346895d9c0e2d/html5/thumbnails/17.jpg)
Second Compromise
Only worry about instances y that either satisfy P or are at an ‘edit distance’ of c*n from any satisfying instance. (we say y is c-bad.)
![Page 18: An Introduction to Property Testing](https://reader036.fdocuments.in/reader036/viewer/2022070400/568134dc550346895d9c0e2d/html5/thumbnails/18.jpg)
Second Compromise
Only worry about instances y that either satisfy P or are at an ‘edit distance’ of c*n from any satisfying instance. (we say y is c-bad.)
Justifying this assumption is app-specific; the ‘excluded middle’ might not arise, or it might just be less important.
![Page 19: An Introduction to Property Testing](https://reader036.fdocuments.in/reader036/viewer/2022070400/568134dc550346895d9c0e2d/html5/thumbnails/19.jpg)
Model Decisions
Adaptive or non-adaptive queries?
![Page 20: An Introduction to Property Testing](https://reader036.fdocuments.in/reader036/viewer/2022070400/568134dc550346895d9c0e2d/html5/thumbnails/20.jpg)
Model Decisions
Adaptive or non-adaptive queries?
Adaptivity can be dispensed with at the cost of (exponentially many) more queries.
![Page 21: An Introduction to Property Testing](https://reader036.fdocuments.in/reader036/viewer/2022070400/568134dc550346895d9c0e2d/html5/thumbnails/21.jpg)
Model Decisions
Adaptive or non-adaptive queries?
Adaptivity can be dispensed with at the cost of (exponentially many) more queries.
One-sided or two-sided error?
![Page 22: An Introduction to Property Testing](https://reader036.fdocuments.in/reader036/viewer/2022070400/568134dc550346895d9c0e2d/html5/thumbnails/22.jpg)
Model Decisions
Adaptive or non-adaptive queries?
Adaptivity can be dispensed with at the cost of (exponentially many) more queries.
One-sided or two-sided error?
Error probability can be diminished by repeated trials.
![Page 23: An Introduction to Property Testing](https://reader036.fdocuments.in/reader036/viewer/2022070400/568134dc550346895d9c0e2d/html5/thumbnails/23.jpg)
The ‘Trivial Case’: Statistical Sampling
Let P(x) = 1 iff x is all-zeroes.
![Page 24: An Introduction to Property Testing](https://reader036.fdocuments.in/reader036/viewer/2022070400/568134dc550346895d9c0e2d/html5/thumbnails/24.jpg)
The ‘Trivial Case’: Statistical Sampling
Let P(x) = 1 iff x is all-zeroes.
Then y is c-bad, if and only if ||y|| >= c*n.
![Page 25: An Introduction to Property Testing](https://reader036.fdocuments.in/reader036/viewer/2022070400/568134dc550346895d9c0e2d/html5/thumbnails/25.jpg)
The ‘Trivial Case’: Statistical Sampling
Algorithm: sample O(1/c) random, independently chosen bits of y, accepting iff all bits come up 0.
![Page 26: An Introduction to Property Testing](https://reader036.fdocuments.in/reader036/viewer/2022070400/568134dc550346895d9c0e2d/html5/thumbnails/26.jpg)
The ‘Trivial Case’: Statistical Sampling
Algorithm: sample O(1/c) random, independently chosen bits of y, accepting iff all bits come up 0.
If y is c-bad, a 1 will appear with probability 2/3.
![Page 27: An Introduction to Property Testing](https://reader036.fdocuments.in/reader036/viewer/2022070400/568134dc550346895d9c0e2d/html5/thumbnails/27.jpg)
The ‘Trivial Case’: Statistical Sampling
Algorithm: sample O(1/c) random, independently chosen bits of y, accepting iff all bits come up 0.
If y is c-bad, a 1 will appear with probability 2/3.
![Page 28: An Introduction to Property Testing](https://reader036.fdocuments.in/reader036/viewer/2022070400/568134dc550346895d9c0e2d/html5/thumbnails/28.jpg)
Sort-Checking [EKKRV98]
Given a list L of n numbers, let P(L) be the property that L is in nondecreasing order. How to test for P with few queries?
(Now queries are to numbers, not bits.)
![Page 29: An Introduction to Property Testing](https://reader036.fdocuments.in/reader036/viewer/2022070400/568134dc550346895d9c0e2d/html5/thumbnails/29.jpg)
Sort-Checking [EKKRV98]
First try: Pick k random entries of L, check that their contents are in nondecreasing order.
![Page 30: An Introduction to Property Testing](https://reader036.fdocuments.in/reader036/viewer/2022070400/568134dc550346895d9c0e2d/html5/thumbnails/30.jpg)
Sort-Checking [EKKRV98]
First try: Pick k random entries of L, check that their contents are in nondecreasing order.
Correct on sorted lists…
![Page 31: An Introduction to Property Testing](https://reader036.fdocuments.in/reader036/viewer/2022070400/568134dc550346895d9c0e2d/html5/thumbnails/31.jpg)
Sort-Checking [EKKRV98]
First try: Pick k random entries of L, check that their contents are in nondecreasing order.
Correct on sorted lists…
Suppose L is c-bad; what k will suffice to reject L with probability 2/3?
![Page 32: An Introduction to Property Testing](https://reader036.fdocuments.in/reader036/viewer/2022070400/568134dc550346895d9c0e2d/html5/thumbnails/32.jpg)
Sort-Checking (cont’d)
Uh-oh, what about L = (2, 1, 4, 3, 6, 5, …, 2n, 2n - 1)?
![Page 33: An Introduction to Property Testing](https://reader036.fdocuments.in/reader036/viewer/2022070400/568134dc550346895d9c0e2d/html5/thumbnails/33.jpg)
Sort-Checking (cont’d)
Uh-oh, what about L = (2, 1, 4, 3, 6, 5, …, 2n, 2n - 1)?
It’s ½-bad, yet we need k ~ sqrt(n) to succeed.
![Page 34: An Introduction to Property Testing](https://reader036.fdocuments.in/reader036/viewer/2022070400/568134dc550346895d9c0e2d/html5/thumbnails/34.jpg)
Sort-Checking (cont’d)
Uh-oh, what about L = (2, 1, 4, 3, 6, 5, …, 2n, 2n - 1)?
It’s ½-bad, yet we need k ~ sqrt(n) to succeed.
Modify the algorithm to test adjacent pairs? But this algorithm, too, has its blind spots.
![Page 35: An Introduction to Property Testing](https://reader036.fdocuments.in/reader036/viewer/2022070400/568134dc550346895d9c0e2d/html5/thumbnails/35.jpg)
An O(1/c * log n) solution [EKKRV98]
Place the entries on a binary tree by an in-order traversal:
![Page 36: An Introduction to Property Testing](https://reader036.fdocuments.in/reader036/viewer/2022070400/568134dc550346895d9c0e2d/html5/thumbnails/36.jpg)
An O(1/c * log n) solution [EKKRV98] Place the entries on a binary tree by an in-order traversal:
Repeat O(1/c) times: pick a random i <= n, and check that L[i] is sorted with respect to its path from the root.
![Page 37: An Introduction to Property Testing](https://reader036.fdocuments.in/reader036/viewer/2022070400/568134dc550346895d9c0e2d/html5/thumbnails/37.jpg)
An O(1/c * log n) solution [EKKRV98] Place the entries on a binary tree by an in-order traversal:
Repeat O(1/c) times: pick a random i <= n, and check that L[i] is sorted with respect to its path from the root.
(Each such check must query the whole path, O(log n) entries.) Algorithm is non-adaptive with one-sided error.
![Page 38: An Introduction to Property Testing](https://reader036.fdocuments.in/reader036/viewer/2022070400/568134dc550346895d9c0e2d/html5/thumbnails/38.jpg)
Sortchecking Analysis
If L is sorted, each check will succeed.
![Page 39: An Introduction to Property Testing](https://reader036.fdocuments.in/reader036/viewer/2022070400/568134dc550346895d9c0e2d/html5/thumbnails/39.jpg)
Sortchecking Analysis
If L is sorted, each check will succeed.
What if L is c-bad? Equivalently, what if L contains no nondecreasing subsequence of length (1-c)*n?
![Page 40: An Introduction to Property Testing](https://reader036.fdocuments.in/reader036/viewer/2022070400/568134dc550346895d9c0e2d/html5/thumbnails/40.jpg)
Sortchecking Analysis
It turns out that a contrapositive analysis works more easily.
![Page 41: An Introduction to Property Testing](https://reader036.fdocuments.in/reader036/viewer/2022070400/568134dc550346895d9c0e2d/html5/thumbnails/41.jpg)
Sortchecking Analysis
It turns out that a contrapositive analysis works more easily.
That is, suppose most such path-checks for L succeed; we argue that L must be close to a sorted list L’ which we will define.
![Page 42: An Introduction to Property Testing](https://reader036.fdocuments.in/reader036/viewer/2022070400/568134dc550346895d9c0e2d/html5/thumbnails/42.jpg)
Sortchecking Analysis (cont’d)
Let S be the set of indices for which the path-check succeeds.
![Page 43: An Introduction to Property Testing](https://reader036.fdocuments.in/reader036/viewer/2022070400/568134dc550346895d9c0e2d/html5/thumbnails/43.jpg)
Sortchecking Analysis (cont’d)
Let S be the set of indices for which the path-check succeeds.
If a path-check of a randomly chosen element succeeds with probability > (1 – c), then
|S| > (1 – c)*n.
![Page 44: An Introduction to Property Testing](https://reader036.fdocuments.in/reader036/viewer/2022070400/568134dc550346895d9c0e2d/html5/thumbnails/44.jpg)
Sortchecking Analysis (cont’d)
Let S be the set of indices for which the path-check succeeds.
If a path-check of a randomly chosen element succeeds with probability > (1 – c), then
|S| > (1 – c)*n. We claim that L, restricted to S, is in
nondecreasing order!
![Page 45: An Introduction to Property Testing](https://reader036.fdocuments.in/reader036/viewer/2022070400/568134dc550346895d9c0e2d/html5/thumbnails/45.jpg)
Sortchecking Analysis (cont’d)
Then, by ‘correcting’ entries not in S to agree with the order of S, we get a sorted list L’ at edit distance < c*n from L.
![Page 46: An Introduction to Property Testing](https://reader036.fdocuments.in/reader036/viewer/2022070400/568134dc550346895d9c0e2d/html5/thumbnails/46.jpg)
Sortchecking Analysis (cont’d)
Then, by ‘correcting’ entries not in S to agree with the order of S, we get a sorted list L’ at edit distance < c*n from L.
So L cannot be c-bad.
![Page 47: An Introduction to Property Testing](https://reader036.fdocuments.in/reader036/viewer/2022070400/568134dc550346895d9c0e2d/html5/thumbnails/47.jpg)
Sortchecking Analysis (cont’d)
Thus, if L is c-bad, it fails each path-check with probability > c, and O(1/c) path-checks expose it with probability 2/3.
![Page 48: An Introduction to Property Testing](https://reader036.fdocuments.in/reader036/viewer/2022070400/568134dc550346895d9c0e2d/html5/thumbnails/48.jpg)
Sortchecking Analysis (cont’d)
Thus, if L is c-bad, it fails each path-check with probability > c, and O(1/c) path-checks expose it with probability 2/3.
This proves correctness of the (non-adaptive, one-sided error) algorithm.
![Page 49: An Introduction to Property Testing](https://reader036.fdocuments.in/reader036/viewer/2022070400/568134dc550346895d9c0e2d/html5/thumbnails/49.jpg)
Sortchecking Analysis (cont’d)
Thus, if L is c-bad, it fails each path-check with probability > c, and O(1/c) path-checks expose it with probability 2/3.
This proves correctness of the (non-adaptive, one-sided error) algorithm.
[EKKRV98] also shows this is essentially optimal.
![Page 50: An Introduction to Property Testing](https://reader036.fdocuments.in/reader036/viewer/2022070400/568134dc550346895d9c0e2d/html5/thumbnails/50.jpg)
First Moral
We saw that it can take insight to discover and analyze the right ‘local signature’ for the global property of failing to satisfy P.
![Page 51: An Introduction to Property Testing](https://reader036.fdocuments.in/reader036/viewer/2022070400/568134dc550346895d9c0e2d/html5/thumbnails/51.jpg)
Second Moral
This, and many other property-testing algorithms, work because they implicitly define a correction mechanism for property P.
![Page 52: An Introduction to Property Testing](https://reader036.fdocuments.in/reader036/viewer/2022070400/568134dc550346895d9c0e2d/html5/thumbnails/52.jpg)
Second Moral
This, and many other property-testing algorithms, work because they implicitly define a correction mechanism for property P.
For an algebraic example:
![Page 53: An Introduction to Property Testing](https://reader036.fdocuments.in/reader036/viewer/2022070400/568134dc550346895d9c0e2d/html5/thumbnails/53.jpg)
Linearity Testing [BLR93]
Given: a function f: {0,1}^n {0, 1}.
![Page 54: An Introduction to Property Testing](https://reader036.fdocuments.in/reader036/viewer/2022070400/568134dc550346895d9c0e2d/html5/thumbnails/54.jpg)
Linearity Testing [BLR93]
Given: a function f: {0,1}^n {0, 1}.
We want to differentiate, probabilistically and in few queries, between the case where f is linear
(i.e., f(x+y)=f(x)+f(y) (mod 2) for all x, y),
![Page 55: An Introduction to Property Testing](https://reader036.fdocuments.in/reader036/viewer/2022070400/568134dc550346895d9c0e2d/html5/thumbnails/55.jpg)
Linearity Testing [BLR93]
Given: a function f: {0,1}^n {0, 1}.
We want to differentiate, probabilistically and in few queries, between the case where f is linear
(i.e., f(x+y)=f(x)+f(y) (mod 2) for all x, y),
and the case where f is c-far from any linear function.
![Page 56: An Introduction to Property Testing](https://reader036.fdocuments.in/reader036/viewer/2022070400/568134dc550346895d9c0e2d/html5/thumbnails/56.jpg)
Linearity Testing [BLR93]
How about the naïve test: pick x, y at random, and check that
f(x+y)=f(x)+f(y) (mod 2)?
![Page 57: An Introduction to Property Testing](https://reader036.fdocuments.in/reader036/viewer/2022070400/568134dc550346895d9c0e2d/html5/thumbnails/57.jpg)
Linearity Testing [BLR93]
How about the naïve test: pick x, y at random, and check that
f(x+y)=f(x)+f(y) (mod 2)?
Previous sorting example warns us not to assume this is effective…
![Page 58: An Introduction to Property Testing](https://reader036.fdocuments.in/reader036/viewer/2022070400/568134dc550346895d9c0e2d/html5/thumbnails/58.jpg)
Linearity Testing [BLR93]
How about the naïve test: pick x, y at random, and check that
f(x+y)=f(x)+f(y) (mod 2)?
Previous sorting example warns us not to assume this is effective…
Are there ‘pseudo-linear’ functions out there?
![Page 59: An Introduction to Property Testing](https://reader036.fdocuments.in/reader036/viewer/2022070400/568134dc550346895d9c0e2d/html5/thumbnails/59.jpg)
Linearity Test - Analysis
If f is linear, it always passes the test.
![Page 60: An Introduction to Property Testing](https://reader036.fdocuments.in/reader036/viewer/2022070400/568134dc550346895d9c0e2d/html5/thumbnails/60.jpg)
Linearity Test - Analysis
If f is linear, it always passes the test. Now suppose f passes the test with
probability > 1 – d, where d < 1/12;
![Page 61: An Introduction to Property Testing](https://reader036.fdocuments.in/reader036/viewer/2022070400/568134dc550346895d9c0e2d/html5/thumbnails/61.jpg)
Linearity Test - Analysis
If f is linear, it always passes the test. Now suppose f passes the test with
probability > 1 – d, where d < 1/12; we define a linear function g that is 2d-close
to f.
![Page 62: An Introduction to Property Testing](https://reader036.fdocuments.in/reader036/viewer/2022070400/568134dc550346895d9c0e2d/html5/thumbnails/62.jpg)
Linearity Test - Analysis
If f is linear, it always passes the test. Now suppose f passes the test with
probability > 1 – d, where d < 1/12; we define a linear function g that is 2d-close
to f. So, if f is 2d-bad, it fails the test with
probability > d, and O(1/d) iterations of the test suffice to reject f with probability 2/3.
![Page 63: An Introduction to Property Testing](https://reader036.fdocuments.in/reader036/viewer/2022070400/568134dc550346895d9c0e2d/html5/thumbnails/63.jpg)
Linearity Test - Analysis
Define g(x) = majority ( f(x+r)+f(r) ),
over a random choice of vector r.
![Page 64: An Introduction to Property Testing](https://reader036.fdocuments.in/reader036/viewer/2022070400/568134dc550346895d9c0e2d/html5/thumbnails/64.jpg)
Linearity Test - Analysis
Define g(x) = majority ( f(x+r)+f(r) ),
over a random choice of vector r.
f passes the test with probability at most
1 – t/2, where t is the fraction of entries where g and f differ.
![Page 65: An Introduction to Property Testing](https://reader036.fdocuments.in/reader036/viewer/2022070400/568134dc550346895d9c0e2d/html5/thumbnails/65.jpg)
Linearity Test - Analysis Define g(x) = majority ( f(x+r)+f(r) ), over a random choice of vector r.
f passes the test with probability at most 1 – t/2, where t is the fraction of entries where g and
f differ.
1 – t/2 > 1 – d implies t < 2d, so f, g are 2d-close, as claimed.
![Page 66: An Introduction to Property Testing](https://reader036.fdocuments.in/reader036/viewer/2022070400/568134dc550346895d9c0e2d/html5/thumbnails/66.jpg)
Linearity Test - Analysis
Now we must show g is linear.
![Page 67: An Introduction to Property Testing](https://reader036.fdocuments.in/reader036/viewer/2022070400/568134dc550346895d9c0e2d/html5/thumbnails/67.jpg)
Linearity Test - Analysis
Now we must show g is linear.
For c < 1, let G_(1-c) =
{x: with probability > 1-c over r,
f(x) = f(x+r)+f(r) }.
Let t_c = 1 - |G_(1-c)|/ 2^n.
![Page 68: An Introduction to Property Testing](https://reader036.fdocuments.in/reader036/viewer/2022070400/568134dc550346895d9c0e2d/html5/thumbnails/68.jpg)
Linearity Test - Analysis
Reasoning as before, we have t_c < d / c.
![Page 69: An Introduction to Property Testing](https://reader036.fdocuments.in/reader036/viewer/2022070400/568134dc550346895d9c0e2d/html5/thumbnails/69.jpg)
Linearity Test - Analysis
Reasoning as before, we have t_c < d / c.
Thus, t_(1/6) < 6d < 1/2.
![Page 70: An Introduction to Property Testing](https://reader036.fdocuments.in/reader036/viewer/2022070400/568134dc550346895d9c0e2d/html5/thumbnails/70.jpg)
Linearity Test - Analysis
Reasoning as before, we have t_c < d / c.
Thus, t_(1/6) < 6d < 1/2.
Then, given any x, there must exist a z such that z, x+z are both in G_5/6.
![Page 71: An Introduction to Property Testing](https://reader036.fdocuments.in/reader036/viewer/2022070400/568134dc550346895d9c0e2d/html5/thumbnails/71.jpg)
Linearity Test - Analysis
Now, what is Prob[g(x) = f(x+r) + f(r)]?
(How ‘resoundingly’ is the majority vote decided for an arbitrary x?)
![Page 72: An Introduction to Property Testing](https://reader036.fdocuments.in/reader036/viewer/2022070400/568134dc550346895d9c0e2d/html5/thumbnails/72.jpg)
Linearity Test - Analysis
Now, what is Prob[g(x) = f(x+r) + f(r)]?
(How ‘resoundingly’ is the majority vote decided for an arbitrary x?)
It’s the same as
Prob[g(x) = f(x + (z+r)) + f(z+r)],
![Page 73: An Introduction to Property Testing](https://reader036.fdocuments.in/reader036/viewer/2022070400/568134dc550346895d9c0e2d/html5/thumbnails/73.jpg)
Linearity Test - Analysis
Now, what is Prob[g(x) = f(x+r) + f(r)]? (How ‘resoundingly’ is the majority vote decided for
an arbitrary x?)
It’s the same as Prob[g(x) = f(x + (z+r)) + f(z+r)], since for fixed z, z+r is uniformly distributed if r
is.
![Page 74: An Introduction to Property Testing](https://reader036.fdocuments.in/reader036/viewer/2022070400/568134dc550346895d9c0e2d/html5/thumbnails/74.jpg)
Linearity Test - Analysis
Now f(x + (z+r)) + f(z+r)
= f((x + z)+r) + f(r) + f(z+r) + f(r).
![Page 75: An Introduction to Property Testing](https://reader036.fdocuments.in/reader036/viewer/2022070400/568134dc550346895d9c0e2d/html5/thumbnails/75.jpg)
Linearity Test - Analysis
Now f(x + (z+r)) + f(z+r)
= f((x + z)+r) + f(r) + f(z+r) + f(r). Since x+z, z are in G_(5/6), with probability
greater than 1 – 2*(1/6) = 2/3, this expression equals g(x+z) + g(z).
![Page 76: An Introduction to Property Testing](https://reader036.fdocuments.in/reader036/viewer/2022070400/568134dc550346895d9c0e2d/html5/thumbnails/76.jpg)
Linearity Test - Analysis
Now f(x + (z+r)) + f(z+r)
= f((x + z)+r) + f(r) + f(z+r) + f(r). Since x+z, z are in G_(5/6), with probability
greater than 1 – 2*(1/6) = 2/3, this expression equals g(x+z) + g(z).
So every x’s majority vote is decided by a
> 2/3 majority.
![Page 77: An Introduction to Property Testing](https://reader036.fdocuments.in/reader036/viewer/2022070400/568134dc550346895d9c0e2d/html5/thumbnails/77.jpg)
Linearity Test - Analysis
Finally we show g(x+y) = g(x) + g(y) for all x, y.
![Page 78: An Introduction to Property Testing](https://reader036.fdocuments.in/reader036/viewer/2022070400/568134dc550346895d9c0e2d/html5/thumbnails/78.jpg)
Linearity Test - Analysis
Finally we show g(x+y) = g(x) + g(y) for all x, y.
Choosing a random r, f(x+y+r) + f(r) = g(x+y) with probability > 2/3.
![Page 79: An Introduction to Property Testing](https://reader036.fdocuments.in/reader036/viewer/2022070400/568134dc550346895d9c0e2d/html5/thumbnails/79.jpg)
Linearity Test - Analysis
Finally we show g(x+y) = g(x) + g(y) for all x, y.
Choosing a random r, f(x+y+r) + f(r) = g(x+y) with probability > 2/3.
Also, f(x+(y+r)) + f(y+r) = g(x), and
f(y+r) + f(r) = g(y), each with probability > 2/3.
![Page 80: An Introduction to Property Testing](https://reader036.fdocuments.in/reader036/viewer/2022070400/568134dc550346895d9c0e2d/html5/thumbnails/80.jpg)
Linearity Test - Analysis
Finally we show g(x+y) = g(x) + g(y) for all x, y.
Choosing a random r, f(x+y+r) + f(r) = g(x+y) with probability > 2/3.
Also, f(x+(y+r)) + f(y+r) = g(x), and f(y+r) + f(r) = g(y), each with probability > 2/3.
Then with probability > 1 – 3 * (1/3) > 0, all 3 occur. Adding, we get g(x+y) = g(x) + g(y). QED.
![Page 81: An Introduction to Property Testing](https://reader036.fdocuments.in/reader036/viewer/2022070400/568134dc550346895d9c0e2d/html5/thumbnails/81.jpg)
Testing Graph Properties
A ‘graph property’ should be invariant under vertex permutations.
![Page 82: An Introduction to Property Testing](https://reader036.fdocuments.in/reader036/viewer/2022070400/568134dc550346895d9c0e2d/html5/thumbnails/82.jpg)
Testing Graph Properties
A ‘graph property’ should be invariant under vertex permutations.
Two query models: i) adjacency matrix queries, ii) neighborhood queries.
![Page 83: An Introduction to Property Testing](https://reader036.fdocuments.in/reader036/viewer/2022070400/568134dc550346895d9c0e2d/html5/thumbnails/83.jpg)
Testing Graph Properties
A ‘graph property’ should be invariant under vertex permutations.
Two query models: i) adjacency matrix queries, ii) neighborhood queries.
ii) appropriate for sparse graphs.
![Page 84: An Introduction to Property Testing](https://reader036.fdocuments.in/reader036/viewer/2022070400/568134dc550346895d9c0e2d/html5/thumbnails/84.jpg)
Testing Graph Properties
For hereditary graph properties, most common testing algorithms simply check random subgraphs for the property.
![Page 85: An Introduction to Property Testing](https://reader036.fdocuments.in/reader036/viewer/2022070400/568134dc550346895d9c0e2d/html5/thumbnails/85.jpg)
Testing Graph Properties
For hereditary graph properties, most common testing algorithms simply check random subgraphs for the property.
E.g., to test if a graph is triangle-free, check a small random subgraph for triangles.
![Page 86: An Introduction to Property Testing](https://reader036.fdocuments.in/reader036/viewer/2022070400/568134dc550346895d9c0e2d/html5/thumbnails/86.jpg)
Testing Graph Properties
For hereditary graph properties, most common testing algorithms simply check random subgraphs for the property.
E.g., to test if a graph is triangle-free, check a small random subgraph for triangles.
Obvious algorithms, but often require very sophisticated analysis.
![Page 87: An Introduction to Property Testing](https://reader036.fdocuments.in/reader036/viewer/2022070400/568134dc550346895d9c0e2d/html5/thumbnails/87.jpg)
Testing Graph Properties(Cont’d)
Efficiently testable properties in model i) include:
![Page 88: An Introduction to Property Testing](https://reader036.fdocuments.in/reader036/viewer/2022070400/568134dc550346895d9c0e2d/html5/thumbnails/88.jpg)
Testing Graph Properties(Cont’d)
Efficiently testable properties in model i) include: Bipartiteness
![Page 89: An Introduction to Property Testing](https://reader036.fdocuments.in/reader036/viewer/2022070400/568134dc550346895d9c0e2d/html5/thumbnails/89.jpg)
Testing Graph Properties(Cont’d)
Efficiently testable properties in model i) include: Bipartiteness 3-colorability
![Page 90: An Introduction to Property Testing](https://reader036.fdocuments.in/reader036/viewer/2022070400/568134dc550346895d9c0e2d/html5/thumbnails/90.jpg)
Testing Graph Properties(Cont’d)
Efficiently testable properties in model i) include: Bipartiteness 3-colorability In fact [AS05], every property that’s ‘monotone’ in
the entries of the adjacency matrix!
![Page 91: An Introduction to Property Testing](https://reader036.fdocuments.in/reader036/viewer/2022070400/568134dc550346895d9c0e2d/html5/thumbnails/91.jpg)
Testing Graph Properties(Cont’d)
Efficiently testable properties in model i) include: Bipartiteness 3-colorability In fact [AS05], every property that’s ‘monotone’ in
the entries of the adjacency matrix! A combinatorial characterization of the testable
graph properties is known [AFNS06].
![Page 92: An Introduction to Property Testing](https://reader036.fdocuments.in/reader036/viewer/2022070400/568134dc550346895d9c0e2d/html5/thumbnails/92.jpg)
Lower Bounds via Yao’s Principle
A q-query probabilistic algorithm A testing for property P can be viewed as a randomized choice among q-query deterministic algorithms {T[i]}.
![Page 93: An Introduction to Property Testing](https://reader036.fdocuments.in/reader036/viewer/2022070400/568134dc550346895d9c0e2d/html5/thumbnails/93.jpg)
Lower Bounds via Yao’s Principle
A q-query probabilistic algorithm A testing for property P can be viewed as a randomized choice among q-query deterministic algorithms {T[i]}.
We will look at the 2-sided error model.
![Page 94: An Introduction to Property Testing](https://reader036.fdocuments.in/reader036/viewer/2022070400/568134dc550346895d9c0e2d/html5/thumbnails/94.jpg)
Lower Bounds via Yao’s Principle
For any distribution D on inputs, the probability that A accepts its input is a weighted average of the acceptance probabilities of the {T[i]}.
![Page 95: An Introduction to Property Testing](https://reader036.fdocuments.in/reader036/viewer/2022070400/568134dc550346895d9c0e2d/html5/thumbnails/95.jpg)
Lower Bounds via Yao’s Principle
Suppose we can find (D_Y, D_N): two distributions on inputs, such that
![Page 96: An Introduction to Property Testing](https://reader036.fdocuments.in/reader036/viewer/2022070400/568134dc550346895d9c0e2d/html5/thumbnails/96.jpg)
Lower Bounds via Yao’s Principle
Suppose we can find (D_Y, D_N): two distributions on inputs, such that
i) x from D_Y all satisfy property P;
![Page 97: An Introduction to Property Testing](https://reader036.fdocuments.in/reader036/viewer/2022070400/568134dc550346895d9c0e2d/html5/thumbnails/97.jpg)
Lower Bounds via Yao’s Principle
Suppose we can find (D_Y, D_N): two distributions on inputs, such that
i) x from D_Y all satisfy property P; ii) x from D_N all are c-bad;
![Page 98: An Introduction to Property Testing](https://reader036.fdocuments.in/reader036/viewer/2022070400/568134dc550346895d9c0e2d/html5/thumbnails/98.jpg)
Lower Bounds via Yao’s Principle
Suppose we can find (D_Y, D_N): two distributions on inputs, such that
i) x from D_Y all satisfy property P; ii) x from D_N all are c-bad; iii) D_Y and D_N are statistically 1/3-close on
any fixed q entries.
![Page 99: An Introduction to Property Testing](https://reader036.fdocuments.in/reader036/viewer/2022070400/568134dc550346895d9c0e2d/html5/thumbnails/99.jpg)
Lower Bounds via Yao’s Principle
Then, given a non-adaptive deterministic q-query algorithm T[i], the statistical distance between T[i](D_Y) and T[i](D_N) is at most 1/3, so the same holds for our randomized algorithm A!
![Page 100: An Introduction to Property Testing](https://reader036.fdocuments.in/reader036/viewer/2022070400/568134dc550346895d9c0e2d/html5/thumbnails/100.jpg)
Lower Bounds via Yao’s Principle
Then, given a non-adaptive deterministic q-query algorithm T[i], the statistical distance between T[i](D_Y) and T[i](D_N) is at most 1/3, so the same holds for our randomized algorithm A!
Thus A cannot simultaneously accept all P-satisfying instances with prob. > 2/3 and accept all c-bad instances with prob. < 1/3.
![Page 101: An Introduction to Property Testing](https://reader036.fdocuments.in/reader036/viewer/2022070400/568134dc550346895d9c0e2d/html5/thumbnails/101.jpg)
Example: Graph Isomorphism
Let P(G_1, G_2) be the property that G_1 and G_2 are isomorphic.
![Page 102: An Introduction to Property Testing](https://reader036.fdocuments.in/reader036/viewer/2022070400/568134dc550346895d9c0e2d/html5/thumbnails/102.jpg)
Example: Graph Isomorphism
Let P(G_1, G_2) be the property that G_1 and G_2 are isomorphic.
Let D_Y be distributed as (G, pi(G)), where G is a ‘random graph’ and pi a random permutation;
![Page 103: An Introduction to Property Testing](https://reader036.fdocuments.in/reader036/viewer/2022070400/568134dc550346895d9c0e2d/html5/thumbnails/103.jpg)
Example: Graph Isomorphism
Let P(G_1, G_2) be the property that G_1 and G_2 are isomorphic.
Let D_Y be distributed as (G, pi(G)), where G is a ‘random graph’ and pi a random permutation;
Let D_N be distributed as (G_1, G_2), where G_1, G_2 are independent random graphs.
![Page 104: An Introduction to Property Testing](https://reader036.fdocuments.in/reader036/viewer/2022070400/568134dc550346895d9c0e2d/html5/thumbnails/104.jpg)
Example: Graph Isomorphism
Briefly: (G_1, G_2) is almost always far from satisfying P because for any fixed permutation pi, the adjacency matrices of G_1 and pi(G_2) are ‘too unlikely’ to be similar;
![Page 105: An Introduction to Property Testing](https://reader036.fdocuments.in/reader036/viewer/2022070400/568134dc550346895d9c0e2d/html5/thumbnails/105.jpg)
Example: Graph Isomorphism
Briefly: (G_1, G_2) is almost always far from satisfying P because for any fixed permutation pi, the adjacency matrices of G_1 and pi(G_2) are ‘too unlikely’ to be similar;
D_Y ‘looks like’ D_N as long as we don’t query both a lhs vertex of G and its rhs counterpart in pi(G)—and pi is unknown.
![Page 106: An Introduction to Property Testing](https://reader036.fdocuments.in/reader036/viewer/2022070400/568134dc550346895d9c0e2d/html5/thumbnails/106.jpg)
Example: Graph Isomorphism
Briefly: (G_1, G_2) is almost always far from satisfying P because for any fixed permutation pi, the adjacency matrices of G_1 and pi(G_2) are ‘too unlikely’ to be similar;
D_Y ‘looks like’ D_N as long as we don’t query both a lhs vertex of G and its rhs counterpart in pi(G)—and pi is unknown.
This approach proves a sqrt(n) query lower bound.
![Page 107: An Introduction to Property Testing](https://reader036.fdocuments.in/reader036/viewer/2022070400/568134dc550346895d9c0e2d/html5/thumbnails/107.jpg)
Concluding Thoughts
Property Testing: Revitalizes the study of familiar properties
![Page 108: An Introduction to Property Testing](https://reader036.fdocuments.in/reader036/viewer/2022070400/568134dc550346895d9c0e2d/html5/thumbnails/108.jpg)
Concluding Thoughts
Property Testing: Revitalizes the study of familiar properties Leads to simply stated, intuitive, yet
surprisingly tough conjectures
![Page 109: An Introduction to Property Testing](https://reader036.fdocuments.in/reader036/viewer/2022070400/568134dc550346895d9c0e2d/html5/thumbnails/109.jpg)
Concluding Thoughts
Property Testing: Contains ‘hidden layers’ of algorithmic
ingenuity
![Page 110: An Introduction to Property Testing](https://reader036.fdocuments.in/reader036/viewer/2022070400/568134dc550346895d9c0e2d/html5/thumbnails/110.jpg)
Concluding Thoughts
Property Testing: Contains ‘hidden layers’ of algorithmic
ingenuity Brilliantly meets its own lowered standards
![Page 111: An Introduction to Property Testing](https://reader036.fdocuments.in/reader036/viewer/2022070400/568134dc550346895d9c0e2d/html5/thumbnails/111.jpg)
Acknowledgments
Thanks for Listening!
Thanks to Russell Impagliazzo and Kirill Levchenko for their help.
![Page 112: An Introduction to Property Testing](https://reader036.fdocuments.in/reader036/viewer/2022070400/568134dc550346895d9c0e2d/html5/thumbnails/112.jpg)
References [AS05]. Alon, Shapira: Every Monotone Graph Property is
Testable, STOC ’05. [AFNS06]. Alon, Fischer, Newman, Shapira: A combinatorial
characterization of the testable graph properties: it's all about regularity, STOC ’06.
[BLR93] Manuel Blum, Michael Luby, and Ronitt Rubinfeld. Self-testing/correcting with applications to numerical problems. Journal of Computer and System Sciences, 47(3):549–595, 1993. (linearity test)
[EKKRV98]F. Erg¨un, S. Kannan, S. R. Kumar, R. Rubinfeld, and M. Viswanathan. Spot-checkers. STOC 1998. (sort-checking)
[F97] Eldar Fischer: The Art of Uninformed Decisions. Bulletin of the EATCS 75: 97 (2001) (survey on property testing)