Table of Contents
Fetching ...

Strongly Sublinear Algorithms for Testing Pattern Freeness

Ilan Newman, Nithin Varma

TL;DR

This work advances the study of pattern freeness testing by giving adaptive, one-sided ε-testers for π-freeness of constant-length permutations with subpolynomial query complexity in $n$, thus outperforming known nonadaptive bounds. The key technique is a grid-based reduction that represents $f$ on a coarse $m\times m$ grid and analyzes configurations of nonempty boxes to witness π-appearances, aided by Marcus–Tardos-type bounds and erasure-resilient testing for smaller subpatterns. The authors develop a generalized testing framework that handles φ-legged ν-appearances within components, enabling recursion on smaller patterns and across scales, while maintaining rigorous correctness and controlled query complexity. This approach yields a substantial separation between adaptive and nonadaptive testing in the π-freeness setting and lays groundwork for further refinements to broader pattern classes and weaker notions of distance. The results have potential implications for sublinear testing of complex combinatorial patterns and time-series motif discovery, illustrating how gridding and hierarchical testing can achieve subpolynomial query costs on large inputs.

Abstract

For a permutation $π:[k] \to [k]$, a function $f:[n] \to \mathbb{R}$ contains a $π$-appearance if there exists $1 \leq i_1 < i_2 < \dots < i_k \leq n$ such that for all $s,t \in [k]$, $f(i_s) < f(i_t)$ if and only if $π(s) < π(t)$. The function is $π$-free if it has no $π$-appearances. In this paper, we investigate the problem of testing whether an input function $f$ is $π$-free or whether $f$ differs on at least $\varepsilon n$ values from every $π$-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 $k \in \mathbb{N}$, $\varepsilon \in (0,1)$, and permutation $π:[k] \to [k]$, there is a one-sided error $\varepsilon$-testing algorithm for $π$-freeness of functions $f:[n] \to \mathbb{R}$ that makes $\tilde{O}(n^{o(1)})$ queries. We improve significantly upon the previous best upper bound $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.

Strongly Sublinear Algorithms for Testing Pattern Freeness

TL;DR

This work advances the study of pattern freeness testing by giving adaptive, one-sided ε-testers for π-freeness of constant-length permutations with subpolynomial query complexity in , thus outperforming known nonadaptive bounds. The key technique is a grid-based reduction that represents on a coarse grid and analyzes configurations of nonempty boxes to witness π-appearances, aided by Marcus–Tardos-type bounds and erasure-resilient testing for smaller subpatterns. The authors develop a generalized testing framework that handles φ-legged ν-appearances within components, enabling recursion on smaller patterns and across scales, while maintaining rigorous correctness and controlled query complexity. This approach yields a substantial separation between adaptive and nonadaptive testing in the π-freeness setting and lays groundwork for further refinements to broader pattern classes and weaker notions of distance. The results have potential implications for sublinear testing of complex combinatorial patterns and time-series motif discovery, illustrating how gridding and hierarchical testing can achieve subpolynomial query costs on large inputs.

Abstract

For a permutation , a function contains a -appearance if there exists such that for all , if and only if . The function is -free if it has no -appearances. In this paper, we investigate the problem of testing whether an input function is -free or whether differs on at least values from every -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 , , and permutation , there is a one-sided error -testing algorithm for -freeness of functions that makes queries. We improve significantly upon the previous best upper bound 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.

Paper Structure

This paper contains 38 sections, 6 theorems, 2 figures, 4 algorithms.

Key Result

Theorem 1.1

Let $\varepsilon \in (0,1),$$k \in \mathbb{N}$ and $\pi:[k] \to [k]$ be a permutation. There exists an $\varepsilon$-tester for $\pi$-freeness of functions $f:[n] \to \mathbb{R}$ with query complexity $\tilde{O}\left(\left(\frac{k}{\varepsilon}\right)^{\Theta(\log \log n)}n^{k/\log \log \log n}\righ

Figures (2)

  • Figure 4: Each rectangle represents a different grid $G_n$, where the green shaded boxes correspond to some nonempty boxes in those grids. Each figure represents a different configuration type with respect to the appearance of some $4$-length pattern. The dots and the numbers indicate possible splittings of the $4$ legs of $\pi$. Figure (E) represents the pattern $(4,2,1,3)$ and all others represent the pattern $(3,2,1,4)$. The sizes of green boxes in the figures are not representative and are not drawn to scale.
  • Figure 5: $(1,3,2)$-appearances with legs spread across two green boxes sharing a layer resulting in new configurations upon further gridding of the boxes into smaller orange boxes.

Theorems & Definitions (22)

  • Theorem 1.1
  • definition 2.1: Deletion and Hamming distance
  • claim 2.2
  • claim 2.3
  • definition 2.6
  • definition 2.8: One-sided error erasure-resilient tester for ${\mathcal{P}}_\pi$
  • Lemma 3.1: MarcusT04
  • definition 4.1: Density of a box
  • definition 4.2: Nice partition of a box
  • claim 4.3
  • ...and 12 more