Given a permutation $\pi:[k] \to [k]$, a function $f:[n] \to \mathbb{R}$ contains a $\pi$-appearance if there exists $1 \leq i_1 < i_2 < \dots < i_k \leq n$ such that for all $s,t \in [k]$, it holds that $f(i_s) < f(i_t)$ if and only if $\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 $f$ is $\pi$-free or whether at least $\varepsilon n$ values in $f$ need to be changed in order to make it $\pi$-free. This problem 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 $\pi:[k] \to [k]$, there is a one-sided error $\varepsilon$-testing algorithm for $\pi$-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. Hence, our results also show that adaptivity helps in testing freeness of order patterns.
翻译:根据 $\ pi: [k]\ t [k] 美元, 函数 $f: [n]\ to\ t\ t\\\\\ Rthb{R} 美元如果存在 1\ leq i_ 1 < i_ 2 < dots < i_k\ leq n$ < i_k\ k] 美元, 那么对于所有 $, t\ t\ k] 美元, 它需要修改 $( i_ s) < f( t) 美元, 如果并且只有 $\ pi} 美元( t), 一个函数: 美元 美元 (n) 美元 (n) 美元 (l_ t) 美元 (l_ t) 美元(t) 美元(t) 美元(t), 美元(tr) 美元(tro) 。 如果没有 美元, 美元(r) 美元(r) 美元(r) 美元(tr) 美元(tr), 美元(tr) 美元(r) 美元) 美元(l) 美元(tr) lado(l) ad) 和(r) 美元(r) r) 美元(r) la(l) la) (s(l) (l) (l) lab) (l) (l) (l) (l) (l) (l) (l) (l) (l) (l) (l) (s(l) (l) (l) (l) (l) (l) (l) (l) (l) (l) (l) (l) (l) (l) (l) (l) (l) (l) (l) (l) (l) (d) (l) (l) (l) (l) (l) (l) (l) (l) (l) (l) (l) (l) (l) (d) (l) (l) (l) (l) (l) (l) (l) (l) (l) (l) (l) (l) (l) (l) (d) (l) (d) (d) (l) (l)