TY - JOUR

T1 - Testing Membership in Parenthesis Languages

AU - Parnas, Michal

AU - Ron, Dana

AU - Rubinfeld, Ronitt

PY - 2003/1

Y1 - 2003/1

N2 - 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 Õ(n2/3/ε3), where ε is the given distance parameter. Furthermore, we improve the lower bound for testing Dyck languages to Ω̃(n1/11) for constant ε. We also describe a testing algorithm for the context free language LREV = {uurvvr: u, v ∈ ∑*}, where 2 is a fixed alphabet. The running time of our algorithm is Õ(√n/ε), which almost matches the lower bound given by Alon et al. [1].

AB - 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 Õ(n2/3/ε3), where ε is the given distance parameter. Furthermore, we improve the lower bound for testing Dyck languages to Ω̃(n1/11) for constant ε. We also describe a testing algorithm for the context free language LREV = {uurvvr: u, v ∈ ∑*}, where 2 is a fixed alphabet. The running time of our algorithm is Õ(√n/ε), which almost matches the lower bound given by Alon et al. [1].

UR - http://www.scopus.com/inward/record.url?scp=0037236262&partnerID=8YFLogxK

U2 - 10.1002/rsa.10067

DO - 10.1002/rsa.10067

M3 - ???researchoutput.researchoutputtypes.contributiontojournal.article???

AN - SCOPUS:0037236262

SN - 1042-9832

VL - 22

SP - 98

EP - 138

JO - Random Structures and Algorithms

JF - Random Structures and Algorithms

IS - 1

ER -