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
Probabilistic Property Testing Probabilistic Algorithm Probabilistic Property Tester YES YES Always accept. Always accept. Don’t care Close to YES NO Far from Reject with Reject with YES probability 1/2. probability 1/2. 3
Probabilistic Property Tester Accept if the object has the property. Algorithm Reject with Pr 1/2 if the object is far from any object with the property. 4
Probabilistic Property Tester Accept if the object has the property. Algorithm Reject with Pr 1/2 if the object is far from any object with the property. 5
Probabilistic Property Tester Accept if the object has the property. Algorithm Reject with Pr 1/2 if the object is far from any object with the property. 6
Probabilistic Property Tester Express property testing as testing properties of functions. Accept if the object has the property. Algorithm Reject with Pr 1/2 if the object is far from any object with the property. 7
Motivation Probabilistic Property Tester can be • much uch fast ster er tha han n an e n exa xact t algo gori rithm; thm; • the he on only y op option on whe hen n the he exa xact ct prob oblem lem is not s not decidable; dable; • us used d for or preprocessing; processing; • go good od eno nough ugh in ap n application ation whe here e so some errors ors are tol oler erable. able. 8
Problem Statement ε Accept if f is monotone. Algorithm Reject with Pr 1/2 if f is -far from monotone. 9
n Σ : Definitions for f R examples • For two n- symbol strings x and y we 001001 x y say if 011001 ? 100000 011111 y is formed from x by increasing one or more symbols. 10
n Σ : Definitions for f R examples • For two n- symbol strings x and y we 001001 x y say if 011001 ? 100000 011111 y is formed from x by increasing one or more symbols. • f is monotone if 0 1 2 3 4 5 x x f (x) f (y) for all . y f ( x ) 0 3 7 8 8 9 11
n Σ : Definitions for f R examples • For two n- symbol strings x and y we 001001 x y say if 011001 ? 100000 011111 y is formed from x by increasing one or more symbols. • f is monotone if 0 1 2 3 4 5 x x f (x) f (y) for all . y f ( x ) 0 3 7 8 8 9 • f is -far from monotone if 0 1 2 3 4 5 x every monotone function disagrees f ( x ) 0 3 9 8 7 9 with f on at least an -fraction of the 1/3-far from monotone domain. 12
Results Q = Query Complexity of Monotonicity Tests 2 n Q = [GGLR98] O 2 | | | | R n O Q = log | | log | | R This work 13
Algorithm (Reduction to a simpler case) x y • INPUT: n – and : f R • Repeat several times: – 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 x y f ( x ) > f ( y ) is found, then REJECT. • Otherwise, ACCEPT. 14
n Special case: : { 0 , 1 } f R f(011) f(111) f(010) f(110) f(001) f(101) f(000) f(100) • Edge x y iff and x y x and y differ in one coordinate • Edge x y is a violated edge of f if f ( x ) > f ( y ). 15
n Algorithm for : { 0 , 1 } f R y x • INPUT: n – and : { 0 , 1 } f R • Repeat Q/2 times: – Pick an edge x y uniformly at random. – If x y is violated (i.e. f ( x ) > f ( y )), then REJECT. • Otherwise, ACCEPT. 16
Intuition for Analysis • If f is monotone, the algorithm always accepts. YES • If f is not monotone: – If f has few violated edges, we can Don’t care make f monotone by changing its value at a few points. – If f has many violated edges, the algorithm succeeds with high NO probability. 17
Proof Plan • BINARY RANGE ( ) n : { 0 , 1 } { 0 , 1 } f 0 0 # altered points 2 # violated edges 0 1 THEOREM: If f is -far from monotone, then a random edge is 0 1 violated with probability 1 n # violated edges # altered points 2 0 . n n n 2 2 2 2 n 2 2n n n violated edges 1 0 18
Proof Plan • BINARY RANGE ( ) n : { 0 , 1 } { 0 , 1 } f 0 0 # altered points 2 # violated edges 0 1 THEOREM: If f is -far from monotone, then a random edge is 0 1 violated with probability 1 n # violated edges # altered points 2 0 . n n n 2 2 2 2 n 2 2n n n violated edges 1 0 n : { 0 , 1 } f R • RANGE REDUCTION ( ) # altered points 2 # violated edges log | | R THEOREM: If f is -far from monotone, then a random edge is violated with probability n # violated edges # altered points 2 . 19 n n n 2 2 2 log | | n 2 2 log | | 2n log | | n n R R R
Repairing Violated Edges in One Dimension Swap violated edges 1 0 in red dimension to 0 1 . 0 0 0 0 Swapping red 0 1 1 0 dimension. 0 0 1 1 1 0 0 1 20
Repairing Violated Edges in One Dimension Swap violated edges 1 0 in red dimension to 0 1 . Sort 1 0 0 1 0 0 0 0 1 1 0 0 0 0 1 0 0 1 0 0 1 1 0 0 21
Repairing Violated Edges in One Dimension Swap violated edges 1 0 in red dimension to 0 1 . 0 0 Swapping red 1 0 dimension. 0 1 0 1 22
Repairing Violated Edges in One Dimension Swap violated edges 1 0 in red dimension to 0 1 . 0 0 0 0 Swapping red 0 1 1 0 dimension. 0 0 1 1 1 0 0 1 LEMMA . Swapping violated edges in dimension i 1. repairs all violated edges in dimension i; j i 2. does not increase the number of violated edges in dimension j , for all . 23
Repairing Violated Edges in One Dimension Swap violated edges 1 0 in red dimension to 0 1 . 0 0 0 0 Swapping red 0 1 1 0 dimension. 0 0 1 1 1 0 0 1 LEMMA . Swapping violated edges in dimension i 1. repairs all violated edges in dimension i; j i 2. does not increase the number of violated edges in dimension j , for all . 24
Back to the Proof Plan • BINARY RANGE ( ) n : { 0 , 1 } { 0 , 1 } f # altered points 2 # violated edges n • RANGE REDUCTION ( ) : { 0 , 1 } f R # altered points 2 # violated edges log | | R W.l.g. assume R ={0, 1,…, 2 s -1}. Prove # altered points 2 # violated edges s by induction on s . 25
How can we make f monotone? 2 s -1 0 a b violated edges of f Swap violated edges in red dimension? 26
How can we make f monotone? 2 s -1 0 a b violated edges of f Swap violated edges in red dimension? 0 1 1 0 1 1 2 2 27
Operator SQUASH 2 s -1 0 a b violated edges of f if ( ) a f x a SQUASH [ , , ]( ) if ( ) f a b x b f x b ( ) otherwise f x 2 s -1 0 a b violated edges of SQUASH[ f,a,b ] PROPERTY: does not introduce new violated edges. 28
Operator CLEAR 2 s -1 0 a b Squash: 2 s - 1 0 a b Repair ( switch to closest monotone function with range {a,...,b} ): 2 s - 1 0 a b Unsquash values not altered by repair : 2 s - 1 0 a b PROPERTIES: 1. does not introduce new violated edges. 2. clears interval [a, b]. 3. leaves clear intervals clear . 29
Making f monotone f 2 s- 1 - 1 2 s- 1 2 s - 1 0 Clear [2 s- 1 - 1, 2 s- 1 ] 2 s- 1 - 1 2 s- 1 2 s - 1 0 Clear [0, 2 s- 1 -1] 2 s- 1 - 1 2 s- 1 2 s - 1 0 Clear [2 s- 1 , 2 s- 1 -1] 2 s- 1 - 1 2 s- 1 2 s - 1 0 30
Making f monotone #violated edges f 2 v 2 s- 1 - 1 2 s- 1 2 s - 1 0 l Clear [2 s- 1 - 1, 2 s- 1 ] ( ) r 2 2 s- 1 - 1 2 s- 1 2 s - 1 0 v 2 Clear [0, 2 s- 1 -1] 2 r 2 s- 1 - 1 2 s- 1 2 s - 1 0 Clear [2 s- 1 , 2 s- 1 -1] 0 2 s- 1 - 1 2 s- 1 2 s - 1 0 31
Reminder We are proving (by induction on s ) that for functions with a range of size 2 s , . s # altered points 2 # violated edges Base case [functions with a range of size 2]: # altered points 2 # violated edges. Induction hypothesis [functions with a range of size 2 s -1 ]: s # altered points 2 # violated edges ( 1 ). 32
Making f monotone #violated #points edges changed f 2 v 0 2 s- 1 - 1 2 s- 1 2 s - 1 0 l Clear [2 s- 1 - 1, 2 s- 1 ] ( ) r 2 v 2 2 s- 1 - 1 2 s- 1 2 s - 1 0 v 2 Clear [0, 2 s- 1 -1] 2 r ( 1 ) l s 2 2 s- 1 - 1 2 s- 1 2 s - 1 0 Clear [2 s- 1 , 2 s- 1 -1] 0 ( 1 ) r s 2 2 s- 1 - 1 2 s- 1 2 s - 1 0 2 v total s 33
Recommend
More recommend