3,732 research outputs found

    Prime normal form and equivalence of simple grammars

    Get PDF
    AbstractA prefix-free language is 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 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 O(n7log2n) and O(n5polylogv) 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

    Complexity of Problems of Commutative Grammars

    Full text link
    We consider commutative regular and context-free grammars, or, in other words, Parikh images of regular and context-free languages. By using linear algebra and a branching analog of the classic Euler theorem, we show that, under an assumption that the terminal alphabet is fixed, the membership problem for regular grammars (given v in binary and a regular commutative grammar G, does G generate v?) is P, and that the equivalence problem for context free grammars (do G_1 and G_2 generate the same language?) is in Π2P\mathrm{\Pi_2^P}

    Fast equivalence-checking for normed context-free processes

    Get PDF
    Bisimulation equivalence is decidable in polynomial time over normed graphs generated by a context-free grammar. We present a new algorithm, working in time O(n5)O(n^5), thus improving the previously known complexity O(n8∗polylog(n))O(n^8 * polylog(n)). It also improves the previously known complexity O(n6∗polylog(n))O(n^6 * polylog(n)) of the equality problem for simple grammars

    Acta Cybernetica : Tomus 4. Fasciculus 1.

    Get PDF
    • …
    corecore