Finding Monotone Patterns in Sublinear Time Erik Waingarten - - PowerPoint PPT Presentation

finding monotone patterns in sublinear time
SMART_READER_LITE
LIVE PREVIEW

Finding Monotone Patterns in Sublinear Time Erik Waingarten - - PowerPoint PPT Presentation

Finding Monotone Patterns in Sublinear Time Erik Waingarten (Columbia University) Cl ement Canonne (Stanford University) Omri Ben-Eliezer (Tel-Aviv University) Shoham Letzter (ETH Zurich) 1 / 14 Testing Monotonicity of an Array: Sortedness


slide-1
SLIDE 1

Finding Monotone Patterns in Sublinear Time

Erik Waingarten (Columbia University) Cl´ ement Canonne (Stanford University) Omri Ben-Eliezer (Tel-Aviv University) Shoham Letzter (ETH Zurich)

1 / 14

slide-2
SLIDE 2

Testing Monotonicity of an Array: Sortedness

1 3 2 3 6 7 1 9 4 2 5 6 7

Given query access to an unknown f : [n] → R and a parameter ε > 0: If f monotone, accept w.p. > 2/3; If f is ε-far from monotone, reject w.p. > 2/3; Minimum query complexity in terms of n and ε?

2 / 14

slide-3
SLIDE 3

Testing Monotonicity of an Array: Sortedness

1 3 2 3 6 7 1 9 4 2 5 6 7

Given query access to an unknown f : [n] → R and a parameter ε > 0: If f monotone, accept w.p. > 2/3; If f is ε-far from monotone, reject w.p. > 2/3; Minimum query complexity in terms of n and ε? If f is ε-far from monotone, find evidence:

◮ i, j ∈ [n] where i < j and f (i) > f (j). 2 / 14

slide-4
SLIDE 4

Testing Monotonicity of an Array: Sortedness

1 3 2 3 6 7 1 9 4 2 5 6 7

Given query access to an unknown f : [n] → R and a parameter ε > 0: If f monotone, accept w.p. > 2/3; If f is ε-far from monotone, reject w.p. > 2/3; Minimum query complexity in terms of n and ε? If f is ε-far from monotone, find evidence:

◮ i, j ∈ [n] where i < j and f (i) > f (j). one-sided error. 2 / 14

slide-5
SLIDE 5

ε-Far-From-Monotone Sequences

f is ε-far from monotone: for any monotone g : [n] → R, 1 n

n

  • i=1

1{f (i) = g(i)} ≥ ε.

3 / 14

slide-6
SLIDE 6

ε-Far-From-Monotone Sequences

f is ε-far from monotone: for any monotone g : [n] → R, 1 n

n

  • i=1

1{f (i) = g(i)} ≥ ε.

Lemma

Let f : [n] → R be ε-far from monotone. There exists set of disjoint pairs, T =

  • (i, j) ∈ [n]2 : i < j and f (i) > f (j)
  • f size |T| ≥ εn/2.

3 / 14

slide-7
SLIDE 7

Monotonicity Testing

Theorem (Erg¨ un, Kannan, Kumar, Rubinfeld, Viswanathan 99)

There exists a non-adaptive, one-sided algorithm for testing monotonicity

  • f f : [n] → R making O((log n)/ε) queries.

4 / 14

slide-8
SLIDE 8

Monotonicity Testing

Theorem (Erg¨ un, Kannan, Kumar, Rubinfeld, Viswanathan 99)

There exists a non-adaptive, one-sided algorithm for testing monotonicity

  • f f : [n] → R making O((log n)/ε) queries.

Ω((log n)/ε) queries needed for non-adaptive algorithms.

4 / 14

slide-9
SLIDE 9

Monotonicity Testing

Theorem (Erg¨ un, Kannan, Kumar, Rubinfeld, Viswanathan 99)

There exists a non-adaptive, one-sided algorithm for testing monotonicity

  • f f : [n] → R making O((log n)/ε) queries.

Ω((log n)/ε) queries needed for non-adaptive algorithms. Ω((log n)/ε) queries needed for adaptive algorithms too! [Fischer 04].

4 / 14

slide-10
SLIDE 10

Testing Forbidden Order Patterns

[Newman, Rabinovich, Rajendraprasad, Sohler 17]

5 / 14

slide-11
SLIDE 11

Testing Forbidden Order Patterns

[Newman, Rabinovich, Rajendraprasad, Sohler 17]

Definition

Let k ∈ N and π = (π1, . . . , πk) be a permutation of [k]. Given f : [n] → R, the k-tuple (i1, . . . , ik) has order pattern π if: f (iℓ) < f (im) whenever πℓ < πm.

5 / 14

slide-12
SLIDE 12

Testing Forbidden Order Patterns

[Newman, Rabinovich, Rajendraprasad, Sohler 17]

Definition

Let k ∈ N and π = (π1, . . . , πk) be a permutation of [k]. Given f : [n] → R, the k-tuple (i1, . . . , ik) has order pattern π if: f (iℓ) < f (im) whenever πℓ < πm. If f : [n] → R is ε-far from π-free, then there exists T ⊂ [n]k of disjoint violating k-tuples (i1, . . . , ik) with order pattern π of size at least εn/k.

5 / 14

slide-13
SLIDE 13

Testing Forbidden Order Patterns

[Newman, Rabinovich, Rajendraprasad, Sohler 17]

Definition

Let k ∈ N and π = (π1, . . . , πk) be a permutation of [k]. Given f : [n] → R, the k-tuple (i1, . . . , ik) has order pattern π if: f (iℓ) < f (im) whenever πℓ < πm. If f : [n] → R is ε-far from π-free, then there exists T ⊂ [n]k of disjoint violating k-tuples (i1, . . . , ik) with order pattern π of size at least εn/k. For fixed k and π, query complexity of testing π-freeness?

5 / 14

slide-14
SLIDE 14

Testing Forbidden Order Patterns

[Newman, Rabinovich, Rajendraprasad, Sohler 17]

Definition

Let k ∈ N and π = (π1, . . . , πk) be a permutation of [k]. Given f : [n] → R, the k-tuple (i1, . . . , ik) has order pattern π if: f (iℓ) < f (im) whenever πℓ < πm. If f : [n] → R is ε-far from π-free, then there exists T ⊂ [n]k of disjoint violating k-tuples (i1, . . . , ik) with order pattern π of size at least εn/k. For fixed k and π, query complexity of testing π-freeness? Some sublinear in n upper bounds for general π.

5 / 14

slide-15
SLIDE 15

Testing Forbidden Order Patterns

[Newman, Rabinovich, Rajendraprasad, Sohler 17]

Definition

Let k ∈ N and π = (π1, . . . , πk) be a permutation of [k]. Given f : [n] → R, the k-tuple (i1, . . . , ik) has order pattern π if: f (iℓ) < f (im) whenever πℓ < πm. If f : [n] → R is ε-far from π-free, then there exists T ⊂ [n]k of disjoint violating k-tuples (i1, . . . , ik) with order pattern π of size at least εn/k. For fixed k and π, query complexity of testing π-freeness? Some sublinear in n upper bounds for general π. π = (132) requires Ω(√n) queries for non-adaptive, one-sided algorithms.

5 / 14

slide-16
SLIDE 16

Testing Forbidden Order Patterns

[Newman, Rabinovich, Rajendraprasad, Sohler 17]

Definition

Let k ∈ N and π = (π1, . . . , πk) be a permutation of [k]. Given f : [n] → R, the k-tuple (i1, . . . , ik) has order pattern π if: f (iℓ) < f (im) whenever πℓ < πm. If f : [n] → R is ε-far from π-free, then there exists T ⊂ [n]k of disjoint violating k-tuples (i1, . . . , ik) with order pattern π of size at least εn/k. For fixed k and π, query complexity of testing π-freeness? Some sublinear in n upper bounds for general π. π = (132) requires Ω(√n) queries for non-adaptive, one-sided algorithms. [Ben-Eliezer, Canonne 18] Many π have complexity a n1−1/(k−Θ(1)).

5 / 14

slide-17
SLIDE 17

Finding Monotone Patterns: π = (12 . . . k)

6 / 14

slide-18
SLIDE 18

Finding Monotone Patterns: π = (12 . . . k)

Given query access to f : [n] → R and a parameter ε > 0 where:

6 / 14

slide-19
SLIDE 19

Finding Monotone Patterns: π = (12 . . . k)

Given query access to f : [n] → R and a parameter ε > 0 where: There exists T ⊂ [n]k of disjoint violating k-tuples T = {(i1, . . . , ik) : i1 < · · · < ik and f (i1) < · · · < f (ik)}

  • f size |T| ≥ εn/k.

6 / 14

slide-20
SLIDE 20

Finding Monotone Patterns: π = (12 . . . k)

Given query access to f : [n] → R and a parameter ε > 0 where: There exists T ⊂ [n]k of disjoint violating k-tuples T = {(i1, . . . , ik) : i1 < · · · < ik and f (i1) < · · · < f (ik)}

  • f size |T| ≥ εn/k.

Find i1 < · · · < ik where f (i1) < · · · < f (ik).

6 / 14

slide-21
SLIDE 21

Finding Monotone Patterns: π = (12 . . . k)

Given query access to f : [n] → R and a parameter ε > 0 where: There exists T ⊂ [n]k of disjoint violating k-tuples T = {(i1, . . . , ik) : i1 < · · · < ik and f (i1) < · · · < f (ik)}

  • f size |T| ≥ εn/k.

Find i1 < · · · < ik where f (i1) < · · · < f (ik).

Theorem (NRRS17)

There is a non-adaptive algorithm with query complexity ((log n)/ε)O(k2).

6 / 14

slide-22
SLIDE 22

Finding Monotone Patterns: π = (12 . . . k)

7 / 14

slide-23
SLIDE 23

Finding Monotone Patterns: π = (12 . . . k)

Theorem (Upper bound)

For k ∈ N, there exists a non-adaptive algorithm with query complexity (log n)⌊log2 k⌋ · poly(1/ε).

7 / 14

slide-24
SLIDE 24

Finding Monotone Patterns: π = (12 . . . k)

Theorem (Upper bound)

For k ∈ N, there exists a non-adaptive algorithm with query complexity (log n)⌊log2 k⌋ · poly(1/ε).

Theorem (Lower bound)

Any non-adaptive algorithm needs to make Ω

  • (log n)⌊log2 k⌋

queries.

7 / 14

slide-25
SLIDE 25

The Case of k = 2

8 / 14

slide-26
SLIDE 26

The Case of k = 2

Let f : [n] → R and disjoint subset of pairs T of size εn/2 with T = {(i, j) ∈ [n]2 : i < j and f (i) < f (j)}.

8 / 14

slide-27
SLIDE 27

The Case of k = 2

Let f : [n] → R and disjoint subset of pairs T of size εn/2 with T = {(i, j) ∈ [n]2 : i < j and f (i) < f (j)}. [Erg¨ un, Kannan, Kumar, Rubinfeld, Viswanathan 99] Find increasing pair:

8 / 14

slide-28
SLIDE 28

The Case of k = 2

Let f : [n] → R and disjoint subset of pairs T of size εn/2 with T = {(i, j) ∈ [n]2 : i < j and f (i) < f (j)}. [Erg¨ un, Kannan, Kumar, Rubinfeld, Viswanathan 99] Find increasing pair: Sample ℓ ∼ [n] uniformly and repeat the following for t iterations:

8 / 14

slide-29
SLIDE 29

The Case of k = 2

Let f : [n] → R and disjoint subset of pairs T of size εn/2 with T = {(i, j) ∈ [n]2 : i < j and f (i) < f (j)}. [Erg¨ un, Kannan, Kumar, Rubinfeld, Viswanathan 99] Find increasing pair: Sample ℓ ∼ [n] uniformly and repeat the following for t iterations:

◮ Sample s ∼ {0, . . . , log2 n} and i ∼ [ℓ − 2s, ℓ] and query f (i). 8 / 14

slide-30
SLIDE 30

The Case of k = 2

Let f : [n] → R and disjoint subset of pairs T of size εn/2 with T = {(i, j) ∈ [n]2 : i < j and f (i) < f (j)}. [Erg¨ un, Kannan, Kumar, Rubinfeld, Viswanathan 99] Find increasing pair: Sample ℓ ∼ [n] uniformly and repeat the following for t iterations:

◮ Sample s ∼ {0, . . . , log2 n} and i ∼ [ℓ − 2s, ℓ] and query f (i). ◮ Sample s ∼ {0, . . . , log2 n} and j ∼ [ℓ, ℓ + 2s] and query f (j). 8 / 14

slide-31
SLIDE 31

The Case of k = 2

Let f : [n] → R and disjoint subset of pairs T of size εn/2 with T = {(i, j) ∈ [n]2 : i < j and f (i) < f (j)}. [Erg¨ un, Kannan, Kumar, Rubinfeld, Viswanathan 99] Find increasing pair: Sample ℓ ∼ [n] uniformly and repeat the following for t iterations:

◮ Sample s ∼ {0, . . . , log2 n} and i ∼ [ℓ − 2s, ℓ] and query f (i). ◮ Sample s ∼ {0, . . . , log2 n} and j ∼ [ℓ, ℓ + 2s] and query f (j).

f =

8 / 14

slide-32
SLIDE 32

The Case of k = 2

Let f : [n] → R and disjoint subset of pairs T of size εn/2 with T = {(i, j) ∈ [n]2 : i < j and f (i) < f (j)}. [Erg¨ un, Kannan, Kumar, Rubinfeld, Viswanathan 99] Find increasing pair: Sample ℓ ∼ [n] uniformly and repeat the following for t iterations:

◮ Sample s ∼ {0, . . . , log2 n} and i ∼ [ℓ − 2s, ℓ] and query f (i). ◮ Sample s ∼ {0, . . . , log2 n} and j ∼ [ℓ, ℓ + 2s] and query f (j).

f = ℓ

8 / 14

slide-33
SLIDE 33

The Case of k = 2

Let f : [n] → R and disjoint subset of pairs T of size εn/2 with T = {(i, j) ∈ [n]2 : i < j and f (i) < f (j)}. [Erg¨ un, Kannan, Kumar, Rubinfeld, Viswanathan 99] Find increasing pair: Sample ℓ ∼ [n] uniformly and repeat the following for t iterations:

◮ Sample s ∼ {0, . . . , log2 n} and i ∼ [ℓ − 2s, ℓ] and query f (i). ◮ Sample s ∼ {0, . . . , log2 n} and j ∼ [ℓ, ℓ + 2s] and query f (j).

f = ℓ

8 / 14

slide-34
SLIDE 34

The Case of k = 2

Let f : [n] → R and disjoint subset of pairs T of size εn/2 with T = {(i, j) ∈ [n]2 : i < j and f (i) < f (j)}. [Erg¨ un, Kannan, Kumar, Rubinfeld, Viswanathan 99] Find increasing pair: Sample ℓ ∼ [n] uniformly and repeat the following for t iterations:

◮ Sample s ∼ {0, . . . , log2 n} and i ∼ [ℓ − 2s, ℓ] and query f (i). ◮ Sample s ∼ {0, . . . , log2 n} and j ∼ [ℓ, ℓ + 2s] and query f (j).

f = ℓ i 1 i 2 i 3 i 4 i 5

8 / 14

slide-35
SLIDE 35

The Case of k = 2

Let f : [n] → R and disjoint subset of pairs T of size εn/2 with T = {(i, j) ∈ [n]2 : i < j and f (i) < f (j)}. [Erg¨ un, Kannan, Kumar, Rubinfeld, Viswanathan 99] Find increasing pair: Sample ℓ ∼ [n] uniformly and repeat the following for t iterations:

◮ Sample s ∼ {0, . . . , log2 n} and i ∼ [ℓ − 2s, ℓ] and query f (i). ◮ Sample s ∼ {0, . . . , log2 n} and j ∼ [ℓ, ℓ + 2s] and query f (j).

f = ℓ i 1 i 2 i 3 i 4 i 5

8 / 14

slide-36
SLIDE 36

The Case of k = 2

Let f : [n] → R and disjoint subset of pairs T of size εn/2 with T = {(i, j) ∈ [n]2 : i < j and f (i) < f (j)}. [Erg¨ un, Kannan, Kumar, Rubinfeld, Viswanathan 99] Find increasing pair: Sample ℓ ∼ [n] uniformly and repeat the following for t iterations:

◮ Sample s ∼ {0, . . . , log2 n} and i ∼ [ℓ − 2s, ℓ] and query f (i). ◮ Sample s ∼ {0, . . . , log2 n} and j ∼ [ℓ, ℓ + 2s] and query f (j).

f = ℓ i 1 i 2 i 3 i 4 i 5 j 1 j 2 j 3 j 4 j 5

8 / 14

slide-37
SLIDE 37

Analysis

f = R

9 / 14

slide-38
SLIDE 38

Analysis

f = R Let T be set of monotone pairs.

9 / 14

slide-39
SLIDE 39

Analysis

f = R i j Let T be set of monotone pairs. (i, j) ∈ T.

9 / 14

slide-40
SLIDE 40

Analysis

f = R i j ≈ 2s Let T be set of monotone pairs. (i, j) ∈ T. (i, j) scale s when j − i ≈ 2s. Pr

ℓ∼[n] [i ≤ ℓ ≤ j] ≈ 2s

n .

9 / 14

slide-41
SLIDE 41

Analysis

f = R E

ℓ∼[n]

log n

  • s=1

# (i, j) scale s cut 2s+1

  • ε.

10 / 14

slide-42
SLIDE 42

Analysis

f = R ℓ Sample ℓ such that:

log n

  • s=1

# (i, j) scale s cut 2s+1 =

log n

  • s=1

(density of T at 2s+1) ε.

11 / 14

slide-43
SLIDE 43

Analysis

f = R ℓ Sample ℓ such that:

log n

  • s=1

# (i, j) scale s cut 2s+1 =

log n

  • s=1

(density of T at 2s+1) ε.

11 / 14

slide-44
SLIDE 44

Analysis

f = R ℓ Sample ℓ such that:

log n

  • s=1

# (i, j) scale s cut 2s+1 =

log n

  • s=1

(density of T at 2s+1) ε.

11 / 14

slide-45
SLIDE 45

Analysis

f = R ℓ Sample ℓ such that:

log n

  • s=1

# (i, j) scale s cut 2s+1 =

log n

  • s=1

(density of T at 2s+1) ε.

11 / 14

slide-46
SLIDE 46

Analysis

f = R ℓ Sample ℓ such that:

log n

  • s=1

# (i, j) scale s cut 2s+1 =

log n

  • s=1

(density of T at 2s+1) ε.

11 / 14

slide-47
SLIDE 47

Analysis

f = R ℓ Density δ−

s and δ+ s : log n s=1 δ− s ≥ ε and log n s=1 δ+ s ≥ ε.

Pr

i 1,...,i t j 1,...,j t

[avoid pair] ≤

  • 1

log n

log n

  • s=1

(1 − δ−

s )

t +

  • 1

log n

log n

  • s=1

(1 − δ+

s )

t ≤ 1 3.

12 / 14

slide-48
SLIDE 48

Monotone patterns for k > 2?

New algorithm for finding (12 . . . k) patterns:

13 / 14

slide-49
SLIDE 49

Monotone patterns for k > 2?

New algorithm for finding (12 . . . k) patterns: Round 1: Sample O(1/ε) indices from [n], include them in a set A.

13 / 14

slide-50
SLIDE 50

Monotone patterns for k > 2?

New algorithm for finding (12 . . . k) patterns: Round 1: Sample O(1/ε) indices from [n], include them in a set A. Round r, 2 ≤ r ≤ ⌊log2 k⌋ + 1: For each i ∈ A and s ∈ {1, . . . , log n}, sample O(1/ε) indices from [i − 2s, i + 2s] and include them in A.

13 / 14

slide-51
SLIDE 51

Monotone patterns for k > 2?

New algorithm for finding (12 . . . k) patterns: Round 1: Sample O(1/ε) indices from [n], include them in a set A. Round r, 2 ≤ r ≤ ⌊log2 k⌋ + 1: For each i ∈ A and s ∈ {1, . . . , log n}, sample O(1/ε) indices from [i − 2s, i + 2s] and include them in A. Query f (i) for all i ∈ A.

13 / 14

slide-52
SLIDE 52

Monotone patterns for k > 2?

New algorithm for finding (12 . . . k) patterns: Round 1: Sample O(1/ε) indices from [n], include them in a set A. Round r, 2 ≤ r ≤ ⌊log2 k⌋ + 1: For each i ∈ A and s ∈ {1, . . . , log n}, sample O(1/ε) indices from [i − 2s, i + 2s] and include them in A. Query f (i) for all i ∈ A. f = ℓ

13 / 14

slide-53
SLIDE 53

Monotone patterns for k > 2?

New algorithm for finding (12 . . . k) patterns: Round 1: Sample O(1/ε) indices from [n], include them in a set A. Round r, 2 ≤ r ≤ ⌊log2 k⌋ + 1: For each i ∈ A and s ∈ {1, . . . , log n}, sample O(1/ε) indices from [i − 2s, i + 2s] and include them in A. Query f (i) for all i ∈ A. f = ℓ Query Complexity: O(1/ε) · (O(log n/ε))⌊log2 k⌋ .

13 / 14

slide-54
SLIDE 54

Monotone patterns for k > 2?

New algorithm for finding (12 . . . k) patterns: Round 1: Sample O(1/ε) indices from [n], include them in a set A. Round r, 2 ≤ r ≤ ⌊log2 k⌋ + 1: For each i ∈ A and s ∈ {1, . . . , log n}, sample O(1/ε) indices from [i − 2s, i + 2s] and include them in A. Query f (i) for all i ∈ A. f = ℓ Query Complexity: O(1/ε) · (O(log n/ε))⌊log2 k⌋ .

Theorem

Suppose f : [n] → R contains εn/k disjoint (12 . . . k)-patterns, algorithm finds one w.p ≥ 2/3.

13 / 14

slide-55
SLIDE 55

Open Problems

14 / 14

slide-56
SLIDE 56

Open Problems

More efficient tests for two-sided error testing for (12 . . . k)-freeness.

14 / 14

slide-57
SLIDE 57

Open Problems

More efficient tests for two-sided error testing for (12 . . . k)-freeness. Adaptive algorithms for finding π-patterns?

14 / 14

slide-58
SLIDE 58

Open Problems

More efficient tests for two-sided error testing for (12 . . . k)-freeness. Adaptive algorithms for finding π-patterns?

◮ Possibly poly(log n) adaptive queries for any pattern π? 14 / 14

slide-59
SLIDE 59

Open Problems

More efficient tests for two-sided error testing for (12 . . . k)-freeness. Adaptive algorithms for finding π-patterns?

◮ Possibly poly(log n) adaptive queries for any pattern π?

Thanks!

14 / 14