## 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 Ω(log n) queries. Here we describe a sublinear-time algorithm for testing all Dyck languages. Specifically, the running time of our algorithm is (Formula Presented), where ϵ is the given distance parameter. Furthermore, we improve the lower bound for testing Dyck languages to Ω(n^{1/11}) for constant ϵ. We also have a testing algorithm for the context free language (Formula Presented), where Σ is a fixed alphabet. The running time of our algorithm is O(√n/ε), which almost matches the lower bound given by Alon et al. [1].

Original language | English |
---|---|

Title of host publication | Approximation, Randomization, and Combinatorial Optimization |

Subtitle of host publication | Algorithms and Techniques - 4th International Workshop on Approximation, Algorithms for Combinatorial Optimization Problems, APPROX 2001 and 5th International Workshop on Randomization and Approximation Techniques in Computer Science, RANDOM 2001, Proceedings |

Editors | Michel Goemans, Klaus Jansen, Jose D. P. Rolim, Luca Trevisan |

Place of Publication | Berlin Heidelberg |

Publisher | Springer Verlag |

Pages | 261-272 |

Number of pages | 12 |

ISBN (Electronic) | 3540424709, 978-3-540-44666-8 |

ISBN (Print) | 978-3-540-42470-3 |

DOIs | |

State | Published - 2001 |

Event | 4th International Workshop on Approximation Algorithms for Combinatorial Optimization Problems, APPROX 2001 and 5th International Workshop on Randomization and Approximation Techniques in Computer Science, RANDOM 2001 - Berkeley, United States Duration: 18 Aug 2001 → 20 Aug 2001 |

### Publication series

Name | Lecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics) |
---|---|

Volume | 2129 |

ISSN (Print) | 0302-9743 |

ISSN (Electronic) | 1611-3349 |

### Conference

Conference | 4th International Workshop on Approximation Algorithms for Combinatorial Optimization Problems, APPROX 2001 and 5th International Workshop on Randomization and Approximation Techniques in Computer Science, RANDOM 2001 |
---|---|

Country/Territory | United States |

City | Berkeley |

Period | 18/08/01 → 20/08/01 |

## Keywords

- Regular languages
- query complexity
- testing algorithm
- substrings