Skip to content

Near-Optimal Bounds for Testing Residual-String Equality and Parenthesis Languages

Hadar Strauss

cs.DS

Abstract

Residual-String Equality, denoted ResStringEq\texttt{ResStringEq}, is the property consisting of all pairs of strings over {0,1,∗}\{0,1,*\} that are equal after deleting all `∗*' symbols from them. This property was first introduced by Fischer, Magniez, and Starikovskaya (SODA 2018), who used it to show a lower bound on testing the Dyck\texttt{Dyck} languages, where Dyckm\texttt{Dyck}_m is the language consisting of balanced sequences of parentheses over mm parenthesis types. They showed that testing ResStringEq\texttt{ResStringEq} on inputs of length nn requires Ω(n1/5)Ω(n^{1/5}) queries, and presented a reduction from testing ResStringEq\texttt{ResStringEq} to testing Dyckm\texttt{Dyck}_m for any m≥2m \geq 2. Furthermore, they showed that Dyckm\texttt{Dyck}_m can be tested with O(n2/5+δ)O(n^{2/5+δ}) queries for every constant proximity parameter, where δ>0δ>0 is an arbitrarily small constant. In this work, we nearly close the gap, by showing that testing ResStringEq\texttt{ResStringEq}, and hence Dyckm\texttt{Dyck}_m (for any m≥2m\geq 2), requires Ω(n2/5)Ω(n^{2/5}) queries. We also show a stronger lower bound of Ω(n)Ω(\sqrt{n}) for testers that make non-adaptive queries. We establish that the Ω(n)Ω(\sqrt{n}) bound is nearly tight, by presenting a non-adaptive tester for ResStringEq\texttt{ResStringEq} that uses O(n1/2+δ)O(n^{1/2+δ}) queries for an arbitrarily small constant δ>0δ>0. Furthermore, we extend this non-adaptive tester to the Dyck\texttt{Dyck} languages, with the same query complexity. Finally, we improve the dependence on the proximity parameter εε in the tester of Fischer, Magniez, and Starikovskaya, reducing it from O(1/ε)poly(1/δ)O(1/ε)^{\mathrm{poly}(1/δ)} to O(1/ε)O(log⁡(1/δ))O(1/ε)^{O(\log(1/δ))}.

Create a lesson