Abstract
We 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 Ω(logn) queries.
Here we describe a sublinear-time algorithm for testing all Dyck languages. Specifically, the running time of our algorithm is Õ(n 2/3/ε3), where ε is the given distance parameter. Furthermore, we improve the lower bound for testing Dyck languages to \( \tilde \Omega (n^{1/11} ) \) for constant ε. We also have a testing algorithm for the context free language L REV = {w = uuτvvτ: w ∈ Σn}, where Σ is a fixed alphabet. The running time of our algorithm is \( \tilde O(\sqrt n / \in ) \), which almost matches the lower bound given by Alon et al. [1].
Supported by the Israel Science Foundation (grant number 32/00-1).
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
References
N. Alon, M. Krivelevich, I. Newman, and M Szegedy. Regular languages are testable with a constant number of queries. In Proceedings of the Fortieth Annual Symposium on Foundations of Computer Science, pages 656–666, 1999.
O. Goldreich, S. Goldwasser, and D. Ron. Property testing and its connection to learning and approximation. JACM, 45(4):653–750, 1998.
M. Harrison. Introduction to formal language theory. Addison-Wesley, 1978.
D. E. Knuth, J. H. Morris, and V. R. Pratt. Fast pattern matching in strings. SIAM Journal on Computing, 6(2):323–350, 1977.
D. Kozen. Automata and Computability. Springer Verlag, 1997.
I. Newman. Testing of functions that have small width branching programs. In Proceedings of the Forty-First Annual Symposium on Foundations of Computer Science, pages 251–258, 2000.
M. Parnas, D. Ron, and R. Rubinfeld. Testing parenthesis languages. Available from: http://www.eng.tau.ac.il/~danar, 2001.
D. Ron. Property testing. To appear in the Handbook on Randomization. Currently available from: http://www.eng.tau.ac.il/~danar, 2000.
R. Rubinfeld and M. Sudan. Robust characterization of polynomials with applications to program testing. SIAM Journal on Computing, 25(2):252–271, 1996.
N. Chomsky M. P. Schotzenberger. The algebraic theory of context-free languages. In Computer Programming and Formal Languages, P. Braffort and D. Hirschberg, Eds, North Holland, pages 118–161, 1963.
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2001 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Parnas, M., Ron, D., Rubinfeld, R. (2001). Testing Parenthesis Languages. In: Goemans, M., Jansen, K., Rolim, J.D.P., Trevisan, L. (eds) Approximation, Randomization, and Combinatorial Optimization: Algorithms and Techniques. RANDOM APPROX 2001 2001. Lecture Notes in Computer Science, vol 2129. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-44666-4_29
Download citation
DOI: https://doi.org/10.1007/3-540-44666-4_29
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-42470-3
Online ISBN: 978-3-540-44666-8
eBook Packages: Springer Book Archive