Query Complexity of Testing Structured Parenthesis Languages

📅 2026-09-29
📈 Citations: 0
✨ Influential: 0
📄 PDF
🤖 AI Summary
This study investigates the query complexity bounds for membership testing of structured string languages, such as Dyck languages. Focusing on the sublinear query regime, it constructs hard distributions based on the Pólya urn model and designs both adaptive and non-adaptive property testing algorithms. The primary contributions include improving the query lower bound for Dyck languages to n^{2/5}, establishing optimal constant-complexity bounds for the Excursion language, and demonstrating that restricted linear grammars retain polynomial hardness. By deriving tight query complexity bounds, this work precisely characterizes the phase transition threshold between constant and polynomial complexities in the testing of structured languages.
📝 Abstract
We study the query complexity of testing membership in structured string languages, focusing on Dyck languages and natural generalizations. A tester receives query access to a word and must distinguish valid inputs from words that are far in Hamming distance, while inspecting only a sublinear number of positions. Our results sharpen the boundary between constant-query testability and polynomial query complexity. First, we prove an $Ω(n^{2/5})$ lower bound for testing Dyck languages $D_m$ with any fixed number $m\ge2$ of parenthesis types, improving the previous $Ω(n^{1/5})$ lower bound of Fischer, Magniez, and Starikovskaya (SODA `18) and nearly matching their upper bound of $O(n^{2/5+o(1)})$. Furthermore, we show that all nonadaptive algorithms for these problems require $Ω(n^{1/2})$ queries. Our lower bounds use a Pólya-urn process to construct the hard distribution; Second, we identify a broad class of weighted-parenthesis languages, which we call {\em excursion languages,} that remain constant-query testable. These languages encode bounded-step walks that stay nonnegative and return to zero. For every fixed excursion language, we give a nonadaptive tester with query complexity $O(1/\varepsilon^2)$, and we prove this dependence on $\varepsilon$ is optimal, even for adaptive algorithms. As a special case, we obtain the tight $Θ(1/\varepsilon^2)$ query complexity of testing $D_1$, improving the previous $O(\log(1/\varepsilon)/\varepsilon^2)$ upper bound and giving the first matching two-sided-error lower bound. Third, we construct a simple hard language, Hidden String, that is generated by a deterministic linear grammar but nevertheless requires $Ω(n^{2/5})$ adaptive queries and $Ω(n^{1/2})$ nonadaptive queries to test. This shows that polynomial query complexity appears even for highly restricted string languages.
Problem

Research questions and friction points this paper is trying to address.

query complexity
property testing
Dyck languages
structured parenthesis languages
sublinear algorithms
Innovation

Methods, ideas, or system contributions that make the work stand out.

Query Complexity
Property Testing
Dyck Languages
Excursion Languages
Lower Bounds
🔎 Similar Papers
No similar papers found.
T
Tim Jackman
Department of Computer Science, Boston University
D
Diptaksho Palit
Department of Computer Science, Boston University
Sofya Raskhodnikova
Sofya Raskhodnikova
Boston University
Sublinear algorithmsdifferential privacyapproximation algorithms