551 research outputs found

    A new approach to the periodicity lemma on strings with holes

    Get PDF
    We first give an elementary proof of the periodicity lemma for strings containing one hole (variously called a "wild card", a "don't-care" or an "indeterminate letter" in the literature). The proof is modelled on Euclid's algorithm for the greatest common divisor and is simpler than the original proof given in [J. Berstel, L. Boasson, Partial words and a theorem of Fine and Wilf, Theoret. Comput. Sci. 218 (1999) 135-141]. We then study the two-hole case, where our result agrees with the one given in [F. Blanchet-Sadri, Robert A. Hegstrom, Partial words and a theorem of Fine and Wilf revisited, Theoret. Comput. Sci. 270 (1-2) (2002) 401-419] but is more easily proved and enables us to identify a maximum-length prefix or suffix of the string to which the periodicity lemma does apply. Finally, we extend our result to three or more holes using elementary methods, and state a version of the periodicity lemma that applies to all strings with or without holes. We describe an algorithm that, given the locations of the holes in a string, computes maximum-length substrings to which the periodicity lemma applies, in time proportional to the number of holes. Our approach is quite different from that used by Blanchet-Sadri and Hegstrom, and also simpler

    Periods in Partial Words: An Algorithm

    Get PDF
    Partial words are finite sequences over a finite alphabet that may contain some holes. A variant of the celebrated Fine–Wilf theorem shows the existence of a bound L=L(h,p,q) such that if a partial word of length at least L with h holes has periods p and q, then it also has period gcd(p,q). In this paper, we associate a graph with each p - and q -periodic word, and study two types of vertex connectivity on such a graph: modified degree connectivity and r -set connectivity where r = q mod p. As a result, we give an algorithm for computing L(h,p,q) in the general case and show how to use it to derive the closed formulas

    Properties of Pseudo-Primitive Words and their Applications

    Full text link
    A pseudo-primitive word with respect to an antimorphic involution \theta is a word which cannot be written as a catenation of occurrences of a strictly shorter word t and \theta(t). Properties of pseudo-primitive words are investigated in this paper. These properties link pseudo-primitive words with essential notions in combinatorics on words such as primitive words, (pseudo)-palindromes, and (pseudo)-commutativity. Their applications include an improved solution to the extended Lyndon-Sch\"utzenberger equation u_1 u_2 ... u_l = v_1 ... v_n w_1 ... w_m, where u_1, ..., u_l \in {u, \theta(u)}, v_1, ..., v_n \in {v, \theta(v)}, and w_1, ..., w_m \in {w, \theata(w)} for some words u, v, w, integers l, n, m \ge 2, and an antimorphic involution \theta. We prove that for l \ge 4, n,m \ge 3, this equation implies that u, v, w can be expressed in terms of a common word t and its image \theta(t). Moreover, several cases of this equation where l = 3 are examined.Comment: Submitted to International Journal of Foundations of Computer Scienc

    Periodicity properties on partial words

    Get PDF
    The concept of periodicity has played over the years a centra1 role in the development of combinatorics on words and has been a highly valuable too1 for the design and analysis of algorithms. Fine and Wilf’s famous periodicity result, which is one of the most used and known results on words, has extensions to partia1 words, or sequences that may have a number of “do not know” symbols. These extensions fal1 into two categories: the ones that relate to strong periodicity and the ones that relate to weak periodicity. In this paper, we obtain consequences by generalizing, in particular, the combinatoria1 property that “for any word u over {a, b}, ua or ub is primitive,” which proves in some sense that there exist very many primitive partia1 words

    Bounded Counter Languages

    Full text link
    We show that deterministic finite automata equipped with kk two-way heads are equivalent to deterministic machines with a single two-way input head and k1k-1 linearly bounded counters if the accepted language is strictly bounded, i.e., a subset of a1a2...ama_1^*a_2^*... a_m^* for a fixed sequence of symbols a1,a2,...,ama_1, a_2,..., a_m. Then we investigate linear speed-up for counter machines. Lower and upper time bounds for concrete recognition problems are shown, implying that in general linear speed-up does not hold for counter machines. For bounded languages we develop a technique for speeding up computations by any constant factor at the expense of adding a fixed number of counters

    Enumeration of Stack-Sorting Preimages via a Decomposition Lemma

    Full text link
    We give three applications of a recently-proven "Decomposition Lemma," which allows one to count preimages of certain sets of permutations under West's stack-sorting map ss. We first enumerate the permutation class s1(Av(231,321))=Av(2341,3241,45231)s^{-1}(\text{Av}(231,321))=\text{Av}(2341,3241,45231), finding a new example of an unbalanced Wilf equivalence. This result is equivalent to the enumeration of permutations sortable by Bs{\bf B}\circ s, where B{\bf B} is the bubble sort map. We then prove that the sets s1(Av(231,312))s^{-1}(\text{Av}(231,312)), s1(Av(132,231))=Av(2341,1342,3241,3142)s^{-1}(\text{Av}(132,231))=\text{Av}(2341,1342,\underline{32}41,\underline{31}42), and s1(Av(132,312))=Av(1342,3142,3412,3421)s^{-1}(\text{Av}(132,312))=\text{Av}(1342,3142,3412,34\underline{21}) are counted by the so-called "Boolean-Catalan numbers," settling a conjecture of the current author and another conjecture of Hossain. This completes the enumerations of all sets of the form s1(Av(τ(1),,τ(r)))s^{-1}(\text{Av}(\tau^{(1)},\ldots,\tau^{(r)})) for {τ(1),,τ(r)}S3\{\tau^{(1)},\ldots,\tau^{(r)}\}\subseteq S_3 with the exception of the set {321}\{321\}. We also find an explicit formula for s1(Avn,k(231,312,321))|s^{-1}(\text{Av}_{n,k}(231,312,321))|, where Avn,k(231,312,321)\text{Av}_{n,k}(231,312,321) is the set of permutations in Avn(231,312,321)\text{Av}_n(231,312,321) with kk descents. This allows us to prove a conjectured identity involving Catalan numbers and order ideals in Young's lattice.Comment: 20 pages, 4 figures. arXiv admin note: text overlap with arXiv:1903.0913

    String Periods in the Order-Preserving Model

    Get PDF
    The order-preserving model (op-model, in short) was introduced quite recently but has already attracted significant attention because of its applications in data analysis. We introduce several types of periods in this setting (op-periods). Then we give algorithms to compute these periods in time O(n), O(n log log n), O(n log^2 log n/log log log n), O(n log n) depending on the type of periodicity. In the most general variant the number of different periods can be as big as Omega(n^2), and a compact representation is needed. Our algorithms require novel combinatorial insight into the properties of such periods
    corecore