Query Complexity of Testing Structured Parenthesis 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 lower bound for testing Dyck languages with any fixed number of parenthesis types, improving the previous lower bound of Fischer, Magniez, and Starikovskaya (SODA `18) and nearly matching their upper bound of . Furthermore, we show that all nonadaptive algorithms for these problems require 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 , and we prove this dependence on is optimal, even for adaptive algorithms. As a special case, we obtain the tight query complexity of testing , improving the previous 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 adaptive queries and nonadaptive queries to test. This shows that polynomial query complexity appears even for highly restricted string languages.
Create a lesson
Related papers
Near-Optimal Bounds for Testing Residual-String Equality and Parenthesis Languages
Shared title terminology · Hadar Strauss
The Plan Language of a Curriculum: A Formal Model and the Complexity of Degree Planning
Shared title terminology · Sherzod Turaev, Mary John, Mamoun Awad
Auction-Based Algorithms for Matroid Intersection: Near-Linear Query Complexity and Constant-Pass Semi-Streaming
Shared title terminology · Chien-Chung Huang, Yusuke Kobayashi
Structural Complexity of Matching-Match: Dense and Sparse Graphs
Shared title terminology · Ilie Dumitru, Adrian Miclăuş, Alexandru Popa
On the Complexity of Orientable Domination
Shared title terminology · Hans L. Bodlaender, Tatsuya Gima, Yasuaki Kobayashi et al.
Shellsort with O(n\log n) Average-Case Complexity
Shared title terminology · Cheng Du, Zongqi Wan