FINDING THE GROWTH RATE OF A REGULAR OR CONTEXT-FREE LANGUAGE IN POLYNOMIAL TIME

2010 ◽  
Vol 21 (04) ◽  
pp. 597-618 ◽  
Author(s):  
PAWEŁ GAWRYCHOWSKI ◽  
DALIA KRIEGER ◽  
NARAD RAMPERSAD ◽  
JEFFREY SHALLIT

We give an O(n + t) time algorithm to determine whether an NFA with n states and t transitions accepts a language of polynomial or exponential growth. Given an NFA accepting a language of polynomial growth, we can also determine the order of polynomial growth in O(n+t) time. We also give polynomial time algorithms to solve these problems for context-free grammars.

10.37236/1944 ◽  
2005 ◽  
Vol 12 (1) ◽  
Author(s):  
Michael H. Albert ◽  
Steve Linton ◽  
Nik Ruškuc

We introduce the insertion encoding, an encoding of finite permutations. Classes of permutations whose insertion encodings form a regular language are characterized. Some necessary conditions are provided for a class of permutations to have insertion encodings that form a context free language. Applications of the insertion encoding to the evaluation of generating functions for classes of permutations, construction of polynomial time algorithms for enumerating such classes, and the illustration of bijective equivalence between classes are demonstrated.


1997 ◽  
Vol 134 (1) ◽  
pp. 59-74 ◽  
Author(s):  
Vivek Gore ◽  
Mark Jerrum ◽  
Sampath Kannan ◽  
Z. Sweedyk ◽  
Steve Mahaney

2013 ◽  
Vol 24 (07) ◽  
pp. 1067-1082 ◽  
Author(s):  
YO-SUB HAN ◽  
SANG-KI KO ◽  
KAI SALOMAA

The edit-distance between two strings is the smallest number of operations required to transform one string into the other. The distance between languages L1and L2is the smallest edit-distance between string wi∈ Li, i = 1, 2. We consider the problem of computing the edit-distance of a given regular language and a given context-free language. First, we present an algorithm that finds for the languages an optimal alignment, that is, a sequence of edit operations that transforms a string in one language to a string in the other. The length of the optimal alignment, in the worst case, is exponential in the size of the given grammar and finite automaton. Then, we investigate the problem of computing only the edit-distance of the languages without explicitly producing an optimal alignment. We design a polynomial time algorithm that calculates the edit-distance based on unary homomorphisms.


1983 ◽  
Vol 6 (2) ◽  
pp. 403-407 ◽  
Author(s):  
R. Chaudhuri ◽  
A. N. V. Rao

It is proved that for a probabilistic context-free languageL(G), the population density of a character (terminal symbol) is equal to its relative density in the words of a sampleSfromL(G)whenever the production probabilities of the grammarGare estimated by the relative frequencies of the corresponding productions in the sample.


Author(s):  
Raphaela Löbel ◽  
Michael Luttenberger ◽  
Helmut Seidl

A language over an alphabet [Formula: see text] of opening ([Formula: see text]) and closing ([Formula: see text]) brackets, is balanced if it is a subset of the Dyck language [Formula: see text] over [Formula: see text], and it is well-formed if all words are prefixes of words in [Formula: see text]. We show that well-formedness of a context-free language is decidable in polynomial time, and that the longest common reduced suffix can be computed in polynomial time. With this at a hand we decide for the class 2-TW of non-linear tree transducers with output alphabet [Formula: see text] whether or not the output language is balanced.


Author(s):  
Arturo Carpi ◽  
Flavio D’Alessandro

The problem of the commutative equivalence of context-free and regular languages is studied. Conditions ensuring that a context-free language of exponential growth is commutatively equivalent with a regular language are investigated.


2011 ◽  
Vol 22 (02) ◽  
pp. 289-299 ◽  
Author(s):  
ALBERTO BERTONI ◽  
CHRISTIAN CHOFFRUT ◽  
ROBERTO RADICIONI

We study the problem of testing whether a context-free language is included in a fixed set L0, where L0 is the language of words reducing to the empty word in the monoid defined by a complete string rewrite system. We prove that, if the monoid is cancellative, then our inclusion problem is polynomially reducible to the problem of testing equivalence of straight-line programs in the same monoid. As an application, we obtain a polynomial time algorithm for testing if a context-free language is included in a Dyck language (the best previous algorithm for this problem was doubly exponential).


Sign in / Sign up

Export Citation Format

Share Document