607 research outputs found

    Polynomial equality testing for terms with shared substructures

    Get PDF
    Sharing of substructures like subterms and subcontexts in terms is a common method for space-efficient representation of terms, which allows for example to represent exponentially large terms in polynomial space, or to represent terms with iterated substructures in a compact form. We present singleton tree grammars as a general formalism for the treatment of sharing in terms. Singleton tree grammars (STG) are recursion-free context-free tree grammars without alternatives for non-terminals and at most unary second-order nonterminals. STGs generalize Plandowski's singleton context free grammars to terms (trees). We show that the test, whether two different nonterminals in an STG generate the same term can be done in polynomial time, which implies that the equality test of terms with shared terms and contexts, where composition of contexts is permitted, can be done in polynomial time in the size of the representation. This will allow polynomial-time algorithms for terms exploiting sharing. We hope that this technique will lead to improved upper complexity bounds for variants of second order unification algorithms, in particular for variants of context unification and bounded second order unification

    On Infinite Words Determined by Indexed Languages

    Full text link
    We characterize the infinite words determined by indexed languages. An infinite language LL determines an infinite word Ī±\alpha if every string in LL is a prefix of Ī±\alpha. If LL is regular or context-free, it is known that Ī±\alpha must be ultimately periodic. We show that if LL is an indexed language, then Ī±\alpha is a morphic word, i.e., Ī±\alpha can be generated by iterating a morphism under a coding. Since the other direction, that every morphic word is determined by some indexed language, also holds, this implies that the infinite words determined by indexed languages are exactly the morphic words. To obtain this result, we prove a new pumping lemma for the indexed languages, which may be of independent interest.Comment: Full version of paper accepted for publication at MFCS 201
    • ā€¦
    corecore