scholarly journals Practical Experiments with Regular Approximation of Context-Free Languages

2000 ◽  
Vol 26 (1) ◽  
pp. 17-44 ◽  
Author(s):  
Mark-Jan Nederhof

Several methods are discussed that construct a finite automaton given a context-free grammar, including both methods that lead to subsets and those that lead to supersets of the original context-free language. Some of these methods of regular approximation are new, and some others are presented here in a more refined form with respect to existing literature. Practical experiments with the different methods of regular approximation are performed for spoken-language input: hypotheses from a speech recognizer are filtered through a finite automaton.

10.37236/4571 ◽  
2015 ◽  
Vol 22 (2) ◽  
Author(s):  
Murray Elder ◽  
Geoffrey Lee ◽  
Andrew Rechnitzer

We prove that the class of permutations generated by passing an ordered sequence $12\dots n$ through a stack of depth 2 and an infinite stack in series is in bijection with an unambiguous context-free language, where a permutation of length $n$ is encoded by a string of length $3n$. It follows that the sequence counting the number of permutations of each length has an algebraic generating function. We use the explicit context-free grammar to compute the generating function:\[\sum_{n\geq 0} c_n t^n = \frac{(1+q)\left(1+5q-q^2-q^3-(1-q)\sqrt{(1-q^2)(1-4q-q^2)}\right)}{8q}\]where $c_n$ is the number of permutations of length $n$ that can be generated, and $q \equiv q(t) = \frac{1-2t-\sqrt{1-4t}}{2t}$ is a simple variant of the Catalan generating function. This in turn implies that $c_n^{1/n} \to 2+2\sqrt{5}$.


2007 ◽  
Vol 18 (06) ◽  
pp. 1293-1302 ◽  
Author(s):  
MARTIN KUTRIB ◽  
ANDREAS MALCHER

We investigate the intersection of Church-Rosser languages and (strongly) context-free languages. The intersection is still a proper superset of the deterministic context-free languages as well as of their reversals, while its membership problem is solvable in linear time. For the problem whether a given Church-Rosser or context-free language belongs to the intersection we show completeness for the second level of the arithmetic hierarchy. The equivalence of Church-Rosser and context-free languages is Π1-complete. It is proved that all considered intersections are pairwise incomparable. Finally, closure properties under several operations are investigated.


2014 ◽  
Vol 577 ◽  
pp. 917-920
Author(s):  
Long Pang ◽  
Xiao Hong Su ◽  
Pei Jun Ma ◽  
Ling Ling Zhao

The pointer alias is indispensable for program analysis. Comparing to point-to set, it’s more efficient to formulate the alias as the context free language (CFL) reachability problem. However, the precision is limited to flow-insensitivity. To solve this problem, we propose a flow sensitive, demand-driven analysis algorithm for answering may-alias queries. First the partial single static assignment is used to discriminate the address-taken pointers. Then the order of control flow is encoded in the level linearization code to ease comparison. Finally, the query of alias in demand driven is converted into the search of CFL reachability with feasible flows. The experiments demonstrate the effectiveness of the proposed approach.


2011 ◽  
Vol 14 ◽  
pp. 34-71 ◽  
Author(s):  
Eric M. Freden ◽  
Teresa Knudson ◽  
Jennifer Schofield

AbstractThe computation of growth series for the higher Baumslag–Solitar groups is an open problem first posed by de la Harpe and Grigorchuk. We study the growth of the horocyclic subgroup as the key to the overall growth of these Baumslag–Solitar groups BS(p,q), where 1<p<q. In fact, the overall growth series can be represented as a modified convolution product with one of the factors being based on the series for the horocyclic subgroup. We exhibit two distinct algorithms that compute the growth of the horocyclic subgroup and discuss the time and space complexity of these algorithms. We show that when p divides q, the horocyclic subgroup has a geodesic combing whose words form a context-free (in fact, one-counter) language. A theorem of Chomsky–Schützenberger allows us to compute the growth series for this subgroup, which is rational. When p does not divide q, we show that no geodesic combing for the horocyclic subgroup forms a context-free language, although there is a context-sensitive geodesic combing. We exhibit a specific linearly bounded Turing machine that accepts this language (with quadratic time complexity) in the case of BS(2,3) and outline the Turing machine construction in the general case.


Sign in / Sign up

Export Citation Format

Share Document