28,592 research outputs found

    Decomposition and Descriptional Complexity of Shuffle on Words and Finite Languages

    Get PDF
    We investigate various questions related to the shuffle operation on words and finite languages. First we investigate a special variant of the shuffle decomposition problem for regular languages, namely, when the given regular language is the shuffle of finite languages. The shuffle decomposition into finite languages is, in general not unique. Thatis,therearelanguagesL^,L2,L3,L4withLiluL2= ÂŁ3luT4but{L\,L2}^ {I/3, L4}. However, if all four languages are singletons (with at least two combined letters), it follows by a result of Berstel and Boasson [6], that the solution is unique; that is {L\,L2} = {L3,L4}. We extend this result to show that if L\ and L2 are arbitrary finite sets and Lz and Z-4 are singletons (with at least two letters in each), the solution is unique. This is as strong as it can be, since we provide examples showing that the solution can be non-unique already when (1) both L\ and L2 are singleton sets over different unary alphabets; or (2) L\ contains two words and L2 is singleton. We furthermore investigate the size of shuffle automata for words. It was shown by Campeanu, K. Salomaa and Yu in [11] that the minimal shuffle automaton of two regular languages requires 2mn states in the worst case (where the minimal automata of the two component languages had m and n states, respectively). It was also recently shown that there exist words u and v such that the minimal shuffle iii DFA for u and v requires an exponential number of states. We study the size of shuffle DFAs for restricted cases of words, namely when the words u and v are both periods of a common underlying word. We show that, when the underlying word obeys certain conditions, then the size of the minimal shuffle DFA for u and v is at most quadratic. Moreover we provide an efficient algorithm, which decides for a given DFA A and two words u and v, whether u lu u C L(A)

    Streaming Property Testing of Visibly Pushdown Languages

    Get PDF
    In the context of language recognition, we demonstrate the superiority of streaming property testers against streaming algorithms and property testers, when they are not combined. Initiated by Feigenbaum et al., a streaming property tester is a streaming algorithm recognizing a language under the property testing approximation: it must distinguish inputs of the language from those that are Δ\varepsilon-far from it, while using the smallest possible memory (rather than limiting its number of input queries). Our main result is a streaming Δ\varepsilon-property tester for visibly pushdown languages (VPL) with one-sided error using memory space poly((log⁥n)/Δ)\mathrm{poly}((\log n) / \varepsilon). This constructions relies on a (non-streaming) property tester for weighted regular languages based on a previous tester by Alon et al. We provide a simple application of this tester for streaming testing special cases of instances of VPL that are already hard for both streaming algorithms and property testers. Our main algorithm is a combination of an original simulation of visibly pushdown automata using a stack with small height but possible items of linear size. In a second step, those items are replaced by small sketches. Those sketches relies on a notion of suffix-sampling we introduce. This sampling is the key idea connecting our streaming tester algorithm to property testers.Comment: 23 pages. Major modifications in the presentatio

    Digraph Complexity Measures and Applications in Formal Language Theory

    Full text link
    We investigate structural complexity measures on digraphs, in particular the cycle rank. This concept is intimately related to a classical topic in formal language theory, namely the star height of regular languages. We explore this connection, and obtain several new algorithmic insights regarding both cycle rank and star height. Among other results, we show that computing the cycle rank is NP-complete, even for sparse digraphs of maximum outdegree 2. Notwithstanding, we provide both a polynomial-time approximation algorithm and an exponential-time exact algorithm for this problem. The former algorithm yields an O((log n)^(3/2))- approximation in polynomial time, whereas the latter yields the optimum solution, and runs in time and space O*(1.9129^n) on digraphs of maximum outdegree at most two. Regarding the star height problem, we identify a subclass of the regular languages for which we can precisely determine the computational complexity of the star height problem. Namely, the star height problem for bideterministic languages is NP-complete, and this holds already for binary alphabets. Then we translate the algorithmic results concerning cycle rank to the bideterministic star height problem, thus giving a polynomial-time approximation as well as a reasonably fast exact exponential algorithm for bideterministic star height.Comment: 19 pages, 1 figur

    Edit Distance for Pushdown Automata

    Get PDF
    The edit distance between two words w1,w2w_1, w_2 is the minimal number of word operations (letter insertions, deletions, and substitutions) necessary to transform w1w_1 to w2w_2. The edit distance generalizes to languages L1,L2\mathcal{L}_1, \mathcal{L}_2, where the edit distance from L1\mathcal{L}_1 to L2\mathcal{L}_2 is the minimal number kk such that for every word from L1\mathcal{L}_1 there exists a word in L2\mathcal{L}_2 with edit distance at most kk. We study the edit distance computation problem between pushdown automata and their subclasses. The problem of computing edit distance to a pushdown automaton is undecidable, and in practice, the interesting question is to compute the edit distance from a pushdown automaton (the implementation, a standard model for programs with recursion) to a regular language (the specification). In this work, we present a complete picture of decidability and complexity for the following problems: (1)~deciding whether, for a given threshold kk, the edit distance from a pushdown automaton to a finite automaton is at most kk, and (2)~deciding whether the edit distance from a pushdown automaton to a finite automaton is finite.Comment: An extended version of a paper accepted to ICALP 2015 with the same title. The paper has been accepted to the LMCS journa
    • 

    corecore