1
Monotonicity Testing
Yevgeniy Dodis, Oded Goldreich, Eric Lehman, Sofya Raskhodnikova, Dana Ron and Alex Samorodnitsky
Monotonicity Testing Yevgeniy Dodis, Oded Goldreich, Eric Lehman, - - PowerPoint PPT Presentation
Monotonicity Testing Yevgeniy Dodis, Oded Goldreich, Eric Lehman, Sofya Raskhodnikova, Dana Ron and Alex Samorodnitsky 1 Probabilistic Property Testing Probabilistic Algorithm YES Always accept. NO Reject with probability 1/2. 2
1
Yevgeniy Dodis, Oded Goldreich, Eric Lehman, Sofya Raskhodnikova, Dana Ron and Alex Samorodnitsky
2
Probabilistic Algorithm
YES
Always accept. Reject with probability 1/2.
NO
3
Probabilistic Property Tester
Close to YES
Far from YES
YES
Reject with probability 1/2. Don’t care Always accept.
Probabilistic Algorithm
YES
Always accept. Reject with probability 1/2.
NO
4
Accept if the object has the property. Reject with Pr 1/2 if the object is far from any
5
Accept if the object has the property. Reject with Pr 1/2 if the object is far from any
6
Accept if the object has the property. Reject with Pr 1/2 if the object is far from any
7
Express property testing as testing properties of functions.
Accept if the object has the property. Reject with Pr 1/2 if the object is far from any
8
9
Accept if f is monotone. Reject with Pr 1/2 if f is -far from monotone.
10
n
say if y is formed from x by increasing one
001001 011001 011111 100000
? examples
11
y x
f (x) 0 3 7 8 8 9 x 0 1 2 3 4 5
f (x) f (y) for all .
n
say if y is formed from x by increasing one
001001 011001 011111 100000
? examples
12
f (x) 0 3 9 8 7 9 x 0 1 2 3 4 5 1/3-far from monotone
every monotone function disagrees with f on at least an -fraction of the domain. y x
f (x) 0 3 7 8 8 9 x 0 1 2 3 4 5
f (x) f (y) for all .
n
say if y is formed from x by increasing one
001001 011001 011111 100000
? examples
13
2 2
14
x y
– and
– Pick a line along the axes of the hyper-grid uniformly at random. – Use your favorite algorithm to test if the line is monotone [our paper, EKKRV98, Noga Alon] . – If a pair (x, y) of points on the line with and f (x) > f (y) is found, then REJECT.
y x
R f
n
:
15
x and y differ in one coordinate
if f (x) > f (y).
y x
f(000) f(111) f(011) f(100) f(101) f(110) f(010) f(001)
n
16
x y
– and
– Pick an edge xy uniformly at random. – If xy is violated (i.e. f (x) > f (y)), then REJECT.
n
R f
n
} 1 , { :
17
– If f has few violated edges, we can make f monotone by changing its value at a few points. – If f has many violated edges, the algorithm succeeds with high probability. YES
Don’t care
NO
18
THEOREM: If f is -far from monotone, then a random edge is violated with probability
n
. 2n 2 n 2 2 2 2 points altered # 2 edges violated #
n n n n
n n
1 1 1
violated edges 1 0
edges violated # 2 points altered #
19
THEOREM: If f is -far from monotone, then a random edge is violated with probability
n
| | log edges violated # 2 points altered # R
. | | log 2n | | log 2 2 n 2 | | log 2 2 points altered # 2 edges violated # R R R n n
n n n n
THEOREM: If f is -far from monotone, then a random edge is violated with probability
n
. 2n 2 n 2 2 2 2 points altered # 2 edges violated #
n n n n
n n
1 1 1
violated edges 1 0
edges violated # 2 points altered #
20
1 1 1 1 1 1 Swapping red dimension.
Swap violated edges 10 in red dimension to 01.
21
Swap violated edges 10 in red dimension to 01.
Sort 1 1 1 1 1 1 1 1
22
1 1 1 Swapping red dimension.
Swap violated edges 10 in red dimension to 01.
23
i j
1 1 1 1 1 1
Swap violated edges 10 in red dimension to 01.
Swapping red dimension.
24
i j
1 1 1 1 1 1
Swap violated edges 10 in red dimension to 01.
Swapping red dimension.
25
W.l.g. assume R={0, 1,…, 2s-1}. Prove by induction on s.
n
n
| | log edges violated # 2 points altered # R edges violated # 2 points altered # s edges violated # 2 points altered #
26
a b 2s-1 violated edges of f
Swap violated edges in red dimension?
27
a b 2s-1 violated edges of f
Swap violated edges in red dimension?
1 1 2 1 1 2
28
) ( if ) ( if ) ( ) ]( , , [ SQUASH b x f a x f x f b a x b a f
a b 2s-1 violated edges of f
a b
violated edges of SQUASH[f,a,b] 2s-1
PROPERTY: does not introduce new violated edges.
29
PROPERTIES:
a b
2s-1
Squash: Repair (switch to
closest monotone function with range {a,...,b}):
Unsquash values not
altered by repair:
a b
2s-1
a b
2s-1
a b 2s-1
30
f Clear [2s-1-1, 2s-1] Clear [0, 2s-1-1] Clear [2s-1, 2s-1-1]
2s-1 2s-1-1 2s-1 2s-1 2s-1-1 2s-1 2s-1 2s-1-1 2s-1 2s-1 2s-1-1 2s-1
31
f Clear [2s-1-1, 2s-1] Clear [0, 2s-1-1] Clear [2s-1, 2s-1-1]
2s-1 2s-1-1 2s-1 2s-1 2s-1-1 2s-1 2s-1 2s-1-1 2s-1 2s-1 2s-1-1 2s-1 #violated edges
2v 2r
) (
2
r l v
2
32
We are proving (by induction on s) that for functions with a range of size 2s, Base case [functions with a range of size 2]: Induction hypothesis [functions with a range of size 2s-1]:
edges violated # 2 points altered #
). 1 ( edges violated # 2 points altered #
33
f Clear [2s-1-1, 2s-1] Clear [0, 2s-1-1] Clear [2s-1, 2s-1-1]
2s-1 2s-1-1 2s-1 2s-1 2s-1-1 2s-1 2s-1 2s-1-1 2s-1 2s-1 2s-1-1 2s-1 #points changed #violated edges
) 1 (
2
s l
v
2
) 1 (
2
s r
2v 2r
s v 2
total
) (
2
r l v
2
34
W.l.g. assume R={0, 1,…, 2s-1}. Proof by induction on s.
n
n
| | log edges violated # 2 points altered # R edges violated # 2 points altered #
35
– Monotonicity test for f :{0,1}n {0,1} [switching argument]. – Monotonicity test for f :{0,1}n R [SQUASH and CLEAR argument].
– Designed good monotonicity tests for
.
– Reduced testing monotonicity of to the case n =1 [sorting argument (a generalization of the switching argument)]. – Reduced testing monotonicity of to the case [SQUASH and CLEAR argument].
– Query complexity independent of the size of the range? – , where D is any partially ordered set. – Tests for other properties.
R f
n
: R D f :
} 1 , { : f } 1 , { :
n
f } 1 , { :
n
f