English
Related papers

Related papers: Optimal Square Detection Over General Alphabets

200 papers

The online square detection problem is to detect the first occurrence of a square in a string whose characters are provided as input one at a time. Recall that a square is a string that is a concatenation of two identical strings. In this…

Data Structures and Algorithms · Computer Science 2014-11-10 Dmitry Kosolobov

An order-preserving square in a string is a fragment of the form $uv$ where $u\neq v$ and $u$ is order-isomorphic to $v$. We show that a string $w$ of length $n$ over an alphabet of size $\sigma$ contains $\mathcal{O}(\sigma n)$…

Data Structures and Algorithms · Computer Science 2023-02-03 Paweł Gawrychowski , Samah Ghazawi , Gad M. Landau

We describe a RAM algorithm computing all runs (maximal repetitions) of a given string of length $n$ over a general ordered alphabet in $O(n\log^{\frac{2}3} n)$ time and linear space. Our algorithm outperforms all known solutions working in…

Data Structures and Algorithms · Computer Science 2015-11-24 Dmitry Kosolobov

We show that the number of distinct squares in a packed string of length $n$ over an alphabet of size $\sigma$ can be computed in $O(n/\log_\sigma n)$ time in the word-RAM model. This paper is the first to introduce a sublinear-time…

Data Structures and Algorithms · Computer Science 2025-09-03 Panagiotis Charalampopoulos , Manal Mohamed , Jakub Radoszewski , Wojciech Rytter , Tomasz Waleń , Wiktor Zuba

We study algorithms for solving three problems on strings. The first one is the Most Frequently String Search Problem. The problem is the following. Assume that we have a sequence of $n$ strings of length $k$. The problem is finding the…

Quantum Physics · Physics 2020-01-08 Kamil Khadiev , Artem Ilikaev

In the classic longest common substring (LCS) problem, we are given two strings $S$ and $T$, each of length at most $n$, over an alphabet of size $\sigma$, and we are asked to find a longest string occurring as a fragment of both $S$ and…

Data Structures and Algorithms · Computer Science 2025-11-18 Panagiotis Charalampopoulos , Tomasz Kociumaka , Jakub Radoszewski , Solon P. Pissis

Longest common extension queries (often called longest common prefix queries) constitute a fundamental building block in multiple string algorithms, for example computing runs and approximate pattern matching. We show that a sequence of $q$…

Data Structures and Algorithms · Computer Science 2016-04-08 Paweł Gawrychowski , Tomasz Kociumaka , Wojciech Rytter , Tomasz Waleń

A $k$-mismatch square is a string of the form $XY$ where $X$ and $Y$ are two equal-length strings that have at most $k$ mismatches. Kolpakov and Kucherov [Theor. Comput. Sci., 2003] defined two notions of $k$-mismatch repeats, called…

Data Structures and Algorithms · Computer Science 2025-09-03 Yuto Nakashima , Jakub Radoszewski , Tomasz Waleń

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…

Data Structures and Algorithms · Computer Science 2020-07-30 Takafumi Inoue , Shunsuke Inenaga , Hideo Bannai

We study quantum algorithms for several fundamental string problems, including Longest Common Substring, Lexicographically Minimal String Rotation, and Longest Square Substring. These problems have been widely studied in the stringology…

Data Structures and Algorithms · Computer Science 2021-10-22 Shyan Akmal , Ce Jin

Suppose an oracle knows a string $S$ that is unknown to us and that we want to determine. The oracle can answer queries of the form "Is $s$ a substring of $S$?". In 1995, Skiena and Sundaram showed that, in the worst case, any algorithm…

Data Structures and Algorithms · Computer Science 2021-10-20 Gabriele Fici , Nicola Prezza , Rossano Venturini

A run in a string is a maximal periodic substring. For example, the string $\texttt{bananatree}$ contains the runs $\texttt{anana} = (\texttt{an})^{3/2}$ and $\texttt{ee} = \texttt{e}^2$. There are less than $n$ runs in any length-$n$…

Data Structures and Algorithms · Computer Science 2021-02-18 Jonas Ellert , Johannes Fischer

Given strings $P$ and $Q$ the (exact) string matching problem is to find all positions of substrings in $Q$ matching $P$. The classical Knuth-Morris-Pratt algorithm [SIAM J. Comput., 1977] solves the string matching problem in linear time…

Data Structures and Algorithms · Computer Science 2010-09-08 Philip Bille

Determining whether an unordered collection of overlapping substrings (called shingles) can be uniquely decoded into a consistent string is a problem that lies within the foundation of a broad assortment of disciplines ranging from…

Discrete Mathematics · Computer Science 2012-04-17 Aryeh Kontorovich , Ari Trachtenberg

The suffix array is a fundamental data structure for many applications that involve string searching and data compression. Designing time/space-efficient suffix array construction algorithms has attracted significant attention and…

Data Structures and Algorithms · Computer Science 2018-11-12 Zhize Li , Jian Li , Hongwei Huo

Permutation patterns and pattern avoidance have been intensively studied in combinatorics and computer science, going back at least to the seminal work of Knuth on stack-sorting (1968). Perhaps the most natural algorithmic question in this…

Data Structures and Algorithms · Computer Science 2019-04-17 László Kozma

Described are two algorithms to find long approximate palindromes in a string, for example a DNA sequence. A simple algorithm requires O(n)-space and almost always runs in $O(k.n)$-time where n is the length of the string and k is the…

Data Structures and Algorithms · Computer Science 2007-05-23 L. Allison

In this paper we present a really simple linear-time algorithm constructing a context-free grammar of size O(g log (N/g)) for the input string, where N is the size of the input string and g the size of the optimal grammar generating this…

Data Structures and Algorithms · Computer Science 2014-03-19 Artur Jeż

We solve the problems of detecting and counting various forms of regularities in a string represented as a Straight Line Program (SLP). Given an SLP of size $n$ that represents a string $s$ of length $N$, our algorithm compute all runs and…

Data Structures and Algorithms · Computer Science 2013-04-29 Tomohiro I , Wataru Matsubara , Kouji Shimohira , Shunsuke Inenaga , Hideo Bannai , Masayuki Takeda , Kazuyuki Narisawa , Ayumi Shinohara

A fundamental concept related to strings is that of repetitions. It has been extensively studied in many versions, from both purely combinatorial and algorithmic angles. One of the most basic questions is how many distinct squares, i.e.,…

Data Structures and Algorithms · Computer Science 2024-03-12 Panagiotis Charalampopoulos , Paweł Gawrychowski , Samah Ghazawi
‹ Prev 1 2 3 10 Next ›