AbstractWe continue the investigation of properties defined by formal languages. This study was initiated by Alon et al. [1], who described an algorithm for testing properties defined by regular languages. Alon et al. also considered several context free languages, and in particular Dyck languages, which contain strings of properly balanced parentheses. They showed that the first Dyck language, which contains strings over a single type of pairs of parentheses, is testable in time independent of n, where n is the length of the input string. However, the second Dyck language, defined over two types of parentheses, requires Ω (log n) queries. Here we describe a sublinear‐time algorithm for testing all Dyck languages. Specifically, the running time of our algorithm is Õ(n2/3/ϵ3), where ϵ is the given distance parameter. Furthermore, we improve the lower bound for testing Dyck languages to \documentclass{article}\usepackage{amsfonts,amsmath}\pagestyle{empty}\begin{document}$\tilde{\Omega}$\end{document}(n1/11) for constant ϵ. We also describe a testing algorithm for the context free language LREV = {uurvvr : u, v ∈ Σ*}, where Σ is a fixed alphabet. The running time of our algorithm is \documentclass{article} \usepackage{amsfonts,amsmath}\pagestyle{empty} \begin{document}$\tilde{O}(\sqrt{n/\epsilon}$ \end{document}, which almost matches the lower bound given by Alon et al. [1]. © 2002 Wiley Periodicals, Inc. Random Struct. Alg., 22: 98–138, 2003
Read full abstract