scholarly journals A Quasi-polynomial-time Algorithm for Sampling Words from a Context-Free Language

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.


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.


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).


2011 ◽  
Vol 22 (08) ◽  
pp. 1813-1828 ◽  
Author(s):  
VOLKER DIEKERT ◽  
STEFFEN KOPECKI

The hairpin completion is an operation on formal languages which is inspired by the hairpin formation in biochemistry. Hairpin formations occur naturally within DNA-computing. It has been known that the hairpin completion of a regular language is linear context-free, but not regular, in general. However, for some time it is was open whether the regularity of the hairpin completion of a regular language is decidable. In 2009 this decidability problem has been solved positively in [5] by providing a polynomial time algorithm. In this paper we improve the complexity bound by showing that the decision problem is actually NL-complete. This complexity bound holds for both, the one-sided and the two-sided hairpin completions.


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.


2008 ◽  
Vol 19 (03) ◽  
pp. 717-727
Author(s):  
BALA RAVIKUMAR

For a string w ∈ {0,1, 2,…, d-1}*, let vald(w) denote the integer whose base d representation is the string w and let MSDd(x) denote the most significant or the leading digit of a positive integer x when x is written as a base d integer. Hirvensalo and Karhumäki [9] studied the problem of computing the leading digit in the ternary representation of 2x ans showed that this problem has a polynomial time algorithm. In [16], some applications are presented for the problem of computing the leading digit of AB for given inputs A and B. In this paper, we study this problem from a formal language point of view. Formally, we consider the language Lb,d,j = {w|w ∈ {0,1, 2,…, d-1}*, 1 ≤ j ≤ 9, MSDb(dvalb(w))) = j} (and some related classes of languages) and address the question of whether this and some related languages are context-free. Standard pumping lemma proofs seem to be very difficult for these languages. We present a unified and simple combinatorial technique that shows that these languages are not unambiguous context-free languages. The Benford-Newcomb distribution plays a central role in our proofs.


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.


2011 ◽  
Vol 22 (05) ◽  
pp. 1197-1209 ◽  
Author(s):  
YO-SUB HAN ◽  
KAI SALOMAA

Solid codes have a nice property called synchronization property, which is useful in data transmission. The property is derived from infix-freeness and overlap-freeness of solid codes. Since a code is a language, we look at solid codes from formal language viewpoint. In particular, we study regular solid codes (that are solid codes and regular). We first tackle the solid code decidability problem for regular languages and propose a polynomial time algorithm. We, then, investigate the decidability of the overlap-freeness property and show that it is decidable for regular languages but is undecidable for context-free languages. Then, we study the prime solid code decomposition of regular solid codes and propose an efficient algorithm for the prime solid code decomposition problem. We also demonstrate that a solid code does not always have a unique prime solid code decomposition.


Sign in / Sign up

Export Citation Format

Share Document