10 research outputs found

    Ranking and Unranking k-subsequence universal words

    Full text link
    A subsequence of a word ww is a word uu such that u=w[i1]w[i2],w[iu]u = w[i_1] w[i_2] , \dots w[i_{|u|}], for some set of indices 1i1<i2<<ikw1 \leq i_1 < i_2 < \dots < i_k \leq |w|. A word ww is kk-subsequence universal over an alphabet Σ\Sigma if every word in Σk\Sigma^k appears in ww as a subsequence. In this paper, we provide new algorithms for kk-subsequence universal words of fixed length nn over the alphabet Σ={1,2,,σ}\Sigma = \{1,2,\dots, \sigma\}. Letting U(n,k,σ)\mathcal{U}(n,k,\sigma) denote the set of nn-length kk-subsequence universal words over Σ\Sigma, we provide: * an O(nkσ)O(n k \sigma) time algorithm for counting the size of U(n,k,σ)\mathcal{U}(n,k,\sigma); * an O(nkσ)O(n k \sigma) time algorithm for ranking words in the set U(n,k,σ)\mathcal{U}(n,k,\sigma); * an O(nkσ)O(n k \sigma) time algorithm for unranking words from the set U(n,k,σ)\mathcal{U}(n,k,\sigma); * an algorithm for enumerating the set U(n,k,σ)\mathcal{U}(n,k,\sigma) with O(nσ)O(n \sigma) delay after O(nkσ)O(n k \sigma) preprocessing

    Existential Definability over the Subword Ordering

    Get PDF
    We study first-order logic (FO) over the structure consisting of finite words over some alphabet A, together with the (non-contiguous) subword ordering. In terms of decidability of quantifier alternation fragments, this logic is well-understood: If every word is available as a constant, then even the ?? (i.e., existential) fragment is undecidable, already for binary alphabets A. However, up to now, little is known about the expressiveness of the quantifier alternation fragments: For example, the undecidability proof for the existential fragment relies on Diophantine equations and only shows that recursively enumerable languages over a singleton alphabet (and some auxiliary predicates) are definable. We show that if |A| ? 3, then a relation is definable in the existential fragment over A with constants if and only if it is recursively enumerable. This implies characterizations for all fragments ?_i: If |A| ? 3, then a relation is definable in ?_i if and only if it belongs to the i-th level of the arithmetical hierarchy. In addition, our result yields an analogous complete description of the ?_i-fragments for i ? 2 of the pure logic, where the words of A^* are not available as constants

    Tropical Representations and Identities of the Stylic Monoid

    Get PDF
    We exhibit a faithful representation of the stylic monoid of every finite rank as a monoid of upper unitriangular matrices over the tropical semiring. Thus, we show that the stylic monoid of finite rank nn generates the pseudovariety Jn\boldsymbol{\mathcal{J}}_n, which corresponds to the class of all piecewise testable languages of height nn, in the framework of Eilenberg's correspondence. From this, we obtain the equational theory of the stylic monoids of finite rank, show that they are finitely based if and only if n3n \leq 3, and that their identity checking problem is decidable in linearithmic time. We also establish connections between the stylic monoids and other plactic-like monoids, and solve the finite basis problem for the stylic monoid with involution.Comment: 22 pages. Added results on the finite basis problem for the stylic monoid with involution and updated reference

    kk-Universality of Regular Languages

    Full text link
    A subsequence of a word ww is a word uu such that u=w[i1]w[i2]w[ik]u = w[i_1] w[i_2] \dots w[i_{k}], for some set of indices 1i1<i2<<ikw1 \leq i_1 < i_2 < \dots < i_k \leq \lvert w\rvert. A word ww is kk-subsequence universal over an alphabet Σ\Sigma if every word in Σk\Sigma^k appears in ww as a subsequence. In this paper, we study the intersection between the set of kk-subsequence universal words over some alphabet Σ\Sigma and regular languages over Σ\Sigma. We call a regular language LL \emph{kk-\exists-subsequence universal} if there exists a kk-subsequence universal word in LL, and \emph{kk-\forall-subsequence universal} if every word of LL is kk-subsequence universal. We give algorithms solving the problems of deciding if a given regular language, represented by a finite automaton recognising it, is \emph{kk-\exists-subsequence universal} and, respectively, if it is \emph{kk-\forall-subsequence universal}, for a given kk. The algorithms are FPT w.r.t.~the size of the input alphabet, and their run-time does not depend on kk; they run in polynomial time in the number nn of states of the input automaton when the size of the input alphabet is O(logn)O(\log n). Moreover, we show that the problem of deciding if a given regular language is \emph{kk-\exists-subsequence universal} is NP-complete, when the language is over a large alphabet. Further, we provide algorithms for counting the number of kk-subsequence universal words (paths) accepted by a given deterministic (respectively, nondeterministic) finite automaton, and ranking an input word (path) within the set of kk-subsequence universal words accepted by a given finite automaton

    Ranking and Unranking k-Subsequence Universal Words

    Get PDF
    A subsequence of a word w is a word u such that u= w[ i1] w[ i2], ⋯ w[ i|u|], for some set of indices 1 ≤ i1&amp;lt; i2&amp;lt; ⋯ &amp;lt; ik≤ | w|. A word w is k-subsequence universal over an alphabet Σ if every word in Σk appears in w as a subsequence. In this paper, we provide new algorithms for k-subsequence universal words of fixed length n over the alphabet Σ= { 1, 2, ⋯, σ}. Letting U(n, k, σ) denote the set of n-length k-subsequence universal words over Σ, we provide: an O(nkσ) time algorithm for counting the size of U(n, k, σ) ;an O(nkσ) time algorithm for ranking words in the set U(n, k, σ) ;an O(nkσ) time algorithm for unranking words from the set U(n, k, σ) ;an algorithm for enumerating the set U(n, k, σ) with O(nσ) delay after O(nkσ) preprocessing.</p

    k-Universality of Regular Languages

    Get PDF
    A subsequence of a word w is a word u such that u = w[i1]w[i2] . . . w[ik], for some set of indices 1 ≤ i1 < i2 < · · · < ik ≤ |w|. A word w is k-subsequence universal over an alphabet Σ if every word in Σk appears in w as a subsequence. In this paper, we study the intersection between the set of k-subsequence universal words over some alphabet Σ and regular languages over Σ. We call a regular language L k-∃-subsequence universal if there exists a k-subsequence universal word in L, and k-∀-subsequence universal if every word of L is k-subsequence universal. We give algorithms solving the problems of deciding if a given regular language, represented by a finite automaton recognising it, is k-∃-subsequence universal and, respectively, if it is k-∀-subsequence universal, for a given k. The algorithms are FPT w.r.t. the size of the input alphabet, and their run-time does not depend on k; they run in polynomial time in the number n of states of the input automaton when the size of the input alphabet is O(log n). Moreover, we show that the problem of deciding if a given regular language is k-∃-subsequence universal is NP-complete, when the language is over a large alphabet. Further, we provide algorithms for counting the number of k-subsequence universal words (paths) accepted by a given deterministic (respectively, nondeterministic) finite automaton, and ranking an input word (path) within the set of k-subsequence universal words accepted by a given finite automaton

    On Special k-Spectra, k-Locality, and Collapsing Prefix Normal Words

    Get PDF
    The domain of Combinatorics on Words, first introduced by Axel Thue in 1906, covers by now many subdomains. In this work we are investigating scattered factors as a representation of non-complete information and two measurements for words, namely the locality of a word and prefix normality, which have applications in pattern matching. In the first part of the thesis we investigate scattered factors: A word u is a scattered factor of w if u can be obtained from w by deleting some of its letters. That is, there exist the (potentially empty) words u1, u2, . . . , un, and v0,v1,...,vn such that u = u1u2 ̈ ̈ ̈un and w = v0u1v1u2v2 ̈ ̈ ̈unvn. First, we consider the set of length-k scattered factors of a given word w, called the k-spectrum of w and denoted by ScatFactk(w). We prove a series of properties of the sets ScatFactk(w) for binary weakly-0-balanced and, respectively, weakly-c-balanced words w, i.e., words over a two- letter alphabet where the number of occurrences of each letter is the same, or, respectively, one letter has c occurrences more than the other. In particular, we consider the question which cardinalities n = | ScatFactk (w)| are obtainable, for a positive integer k, when w is either a weakly-0- balanced binary word of length 2k, or a weakly-c-balanced binary word of length 2k ́ c. Second, we investigate k-spectra that contain all possible words of length k, i.e., k-spectra of so called k-universal words. We present an algorithm deciding whether the k-spectra for given k of two words are equal or not, running in optimal time. Moreover, we present several results regarding k-universal words and extend this notion to circular universality that helps in investigating how the universality of repetitions of a given word can be determined. We conclude the part about scattered factors with results on the reconstruction problem of words from scattered factors that asks for the minimal information, like multisets of scattered factors of a given length or the number of occurrences of scattered factors from a given set, necessary to uniquely determine a word. We show that a word w P {a, b} ̊ can be reconstructed from the number of occurrences of at most min(|w|a, |w|b) + 1 scattered factors of the form aib, where |w|a is the number of occurrences of the letter a in w. Moreover, we generalise the result to alphabets of the form {1, . . . , q} by showing that at most ∑q ́1 |w|i (q ́ i + 1) scattered factors suffices to reconstruct w. Both results i=1 improve on the upper bounds known so far. Complexity time bounds on reconstruction algorithms are also considered here. In the second part we consider patterns, i.e., words consisting of not only letters but also variables, and in particular their locality. A pattern is called k-local if on marking the pattern in a given order never more than k marked blocks occur. We start with the proof that determining the minimal k for a given pattern such that the pattern is k-local is NP- complete. Afterwards we present results on the behaviour of the locality of repetitions and palindromes. We end this part with the proof that the matching problem becomes also NP-hard if we do not consider a regular pattern - for which the matching problem is efficiently solvable - but repetitions of regular patterns. In the last part we investigate prefix normal words which are binary words in which each prefix has at least the same number of 1s as any factor of the same length. First introduced in 2011 by Fici and Lipták, the problem of determining the index (amount of equivalence classes for a given word length) of the prefix normal equivalence relation is still open. In this paper, we investigate two aspects of the problem, namely prefix normal palindromes and so-called collapsing words (extending the notion of critical words). We prove characterizations for both the palindromes and the collapsing words and show their connection. Based on this, we show that still open problems regarding prefix normal words can be split into certain subproblems
    corecore