Related papers: Order-Preserving Squares in Strings
Let $S$ be a string of length $n$ over an alphabet $\Sigma$ and let $Q$ be a subset of $\Sigma$ of size $q \geq 2$. The 'co-occurrence problem' is to construct a compact data structure that supports the following query: given an integer $w$…
The order preserving pattern matching (OPPM) problem is, given a pattern string $p$ and a text string $t$, find all substrings of $t$ which have the same relative orders as $p$. In this paper, we consider two variants of the OPPM problem…
The longest square subsequence (LSS) problem consists of computing a longest subsequence of a given string $S$ that is a square, i.e., a longest subsequence of form $XX$ appearing in $S$. It is known that an LSS of a string $S$ of length…
Given a pattern x of length m and a text y of length n, both over an ordered alphabet, the order-preserving pattern matching problem consists in finding all substrings of the text with the same relative order as the pattern. It is an…
An upward drawing of a tree is a drawing such that no parents are below their children. It is order-preserving if the edges to children appear in prescribed order around each node. Chan showed that any tree has an upward order-preserving…
Given a string $T$ of length $n$ over an alphabet $\Sigma\subset \{1,2,\ldots,n^{O(1)}\}$ of size $\sigma$, we are to preprocess $T$ so that given a range $[i,j]$, we can return a representation of a shortest string over $\Sigma$ that is…
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).…
We present a new algorithm for subsequence matching in grammar compressed strings. Given a grammar of size $n$ compressing a string of size $N$ and a pattern string of size $m$ over an alphabet of size $\sigma$, our algorithm uses…
The random access problem for compressed strings is to build a data structure that efficiently supports accessing the character in position $i$ of a string given in compressed form. Given a grammar of size $n$ compressing a string of size…
Given a string of length $n$ that is composed of $r$ runs of letters from the alphabet $\{0,1,\ldots,\sigma{-}1\}$ such that $2 \le \sigma \le r$, we describe a data structure that, provided $r \le n / \log^{\omega(1)} n$, stores the string…
A \emph{square} is a word of the form $uu$, where $u$ is a nonempty finite word. Given a finite word $w$ of length $n$, let $[w]$ denote the corresponding \emph{circular word}, i.e., the set of all cyclic rotations of $w$. We study the…
We investigate the problem of the maximum number of cubic subwords (of the form $www$) in a given word. We also consider square subwords (of the form $ww$). The problem of the maximum number of squares in a word is not well understood.…
A word is square-free if it does not contain a nonempty word of the form $XX$ as a factor. A famous 1906 result of Thue asserts that there exist arbitrarily long square-free words over a $3$-letter alphabet. We study square-free words with…
A word w is rich if it has |w|+1 many distinct palindromic factors, including the empty word. A word is square-free if it does not have a factor uu, where u is a non-empty word. Pelantov\'a and Starosta (Discrete Math. 313 (2013)) proved…
We consider string matching with variable length gaps. Given a string $T$ and a pattern $P$ consisting of strings separated by variable length gaps (arbitrary strings of length in a specified range), the problem is to find all ending…
A left-variable word over an alphabet~$A$ is a word over~$A \cup \{\star\}$ whose first letter is the distinguished symbol~$\star$ standing for a placeholder. The Ordered Variable Word theorem ($\mathsf{OVW}$), also known as…
We study the following rearrangement problem: Given $n$ words, rearrange and concatenate them so that the obtained string is lexicographically smallest (or largest, respectively). We show that this problem reduces to sorting the given words…
We consider the problem of encoding a string of length $n$ from an integer alphabet of size $\sigma$ so that access and substring equality queries (that is, determining the equality of any two substrings) can be answered efficiently. Any…
An occurrence of a repeated substring $u$ in a string $S$ is called a net occurrence if extending the occurrence to the left or to the right decreases the number of occurrences to 1. The net frequency (NF) of a repeated substring $u$ in a…
A {\em square} is a word of the form $uu$. In this paper we prove that for a given finite word $w$, the number of distinct square factors of $w$ is bounded by $|w|-|\Alphabet(w)|+1$, where $|w|$ denotes the length of $w$ and…