551 research outputs found
A new approach to the periodicity lemma on strings with holes
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
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
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
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
We show that deterministic finite automata equipped with two-way heads
are equivalent to deterministic machines with a single two-way input head and
linearly bounded counters if the accepted language is strictly bounded,
i.e., a subset of for a fixed sequence of symbols . 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
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 . We first enumerate the permutation class
, finding a new example
of an unbalanced Wilf equivalence. This result is equivalent to the enumeration
of permutations sortable by , where is the bubble
sort map. We then prove that the sets ,
,
and 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
for
with the exception of the set
. We also find an explicit formula for
, where
is the set of permutations in with 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
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
- …