Prime normal form and equivalence of simple grammars

Document Type

Conference Proceeding

Publication Date

6-23-2006

Abstract

A prefix-free language is a prime if it cannot be decomposed into a concatenation of two prefix-free languages. We show that we can check in polynomial time if a language generated by a simple context-free grammar is a prime. Our algorithm computes a canonical representation of a simple language, converting its arbitrary simple grammar into Prime Normal Form (PNF); a simple grammar is in PNF if all its nonterminals define primes. We also improve the complexity of testing the equivalence of simple grammars. The best previously known algorithm for this problem worked in O(n13) time. We improve it to 0(n7 log2 n) and O(n5 polylog v) deterministic time, and O(n4 polylog n) randomized time, where n is the total size of the grammars involved, and v is the length of a shortest string derivable from a nonterminal, maximized over all nonterminals. Our improvement is based on a version of Caucal's algorithm from [1]. © Springer-Verlag Berlin Heidelberg 2006.

Identifier

33745167277 (Scopus)

ISBN

[3540310231, 9783540310235]

Publication Title

Lecture Notes in Computer Science Including Subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics

External Full Text Location

https://doi.org/10.1007/11605157_7

e-ISSN

16113349

ISSN

03029743

First Page

78

Last Page

89

Volume

3845 LNCS

Grant

ITR-CCR-0313219

Fund Ref

Natural Sciences and Engineering Research Council of Canada

This document is currently not available here.

Share

COinS