English

Strongly Sublinear Algorithms for Testing Pattern Freeness

Data Structures and Algorithms 2024-08-07 v5

Abstract

For a permutation π:[k][k]\pi:[k] \to [k], a function f:[n]Rf:[n] \to \mathbb{R} contains a π\pi-appearance if there exists 1i1<i2<<ikn1 \leq i_1 < i_2 < \dots < i_k \leq n such that for all s,t[k]s,t \in [k], f(is)<f(it)f(i_s) < f(i_t) if and only if π(s)<π(t)\pi(s) < \pi(t). The function is π\pi-free if it has no π\pi-appearances. In this paper, we investigate the problem of testing whether an input function ff is π\pi-free or whether ff differs on at least εn\varepsilon n values from every π\pi-free function. This is a generalization of the well-studied monotonicity testing and was first studied by Newman, Rabinovich, Rajendraprasad and Sohler (Random Structures and Algorithms 2019). We show that for all constants kNk \in \mathbb{N}, ε(0,1)\varepsilon \in (0,1), and permutation π:[k][k]\pi:[k] \to [k], there is a one-sided error ε\varepsilon-testing algorithm for π\pi-freeness of functions f:[n]Rf:[n] \to \mathbb{R} that makes O~(no(1))\tilde{O}(n^{o(1)}) queries. We improve significantly upon the previous best upper bound O(n11/(k1))O(n^{1 - 1/(k-1)}) by Ben-Eliezer and Canonne (SODA 2018). Our algorithm is adaptive, while the earlier best upper bound is known to be tight for nonadaptive algorithms.

Keywords

Cite

@article{arxiv.2106.04856,
  title  = {Strongly Sublinear Algorithms for Testing Pattern Freeness},
  author = {Ilan Newman and Nithin Varma},
  journal= {arXiv preprint arXiv:2106.04856},
  year   = {2024}
}

Comments

28 pages, 2 figures; We thank anonymous reviewers for comments that helped us significantly improve the presentation