
Porat and Porat [FOCS 2009] described the first efficient randomised algorithm for the pattern matching problem in the streaming model, using 𝒪(logmlogn) bits for a text of length n and a pattern of length m, against the lower bound of (log n) bits. Since then, multiple papers considered many variants of this problem, but with virtually no progress on the lower bounds side, leaving a logarithmic gap in the space complexity for the very basic variant. We discuss a modification of the lower bound of Ergun, Jowhari, and Saglam [RANDOM 2010] against a restricted class of algorithms for the streaming pattern matching problem. Then, we show that the standard approach via communication complexity does not suffice to obtain a better lower bound, by presenting an efficient communication protocol.
The Damerau–Levenshtein distance between two strings is the minimum number of insertions, deletions, substitutions, and adjacent transpositions required to transform one string into the other. Unlike the standard Levenshtein distance, it accounts for the common typing error of adjacent character swaps. When edits are restricted so that no substring is edited more than once, existing algorithms for Levenshtein distance can be extended with relatively minor changes to support transpositions. However, in the unrestricted setting (i.e., edits may overlap or interact arbitrarily), the problem becomes significantly more complex, and existing techniques no longer apply directly. In this work, we show that even in the unrestricted setting, the Damerau–Levenshtein distance can be computed efficiently. We present two algorithms that extend the classic O(n + k^2) edit-distance frameworks of Myers (Algorithmica ’86) and Landau and Vishkin (JCSS ’88), adapting them to accommodate unrestricted transpositions. The first algorithm runs in O(σ n + k^2) time, where σ is the alphabet size. The second achieves O(n + k^2 log n) time for integer alphabets. Here, n is the length of the input strings and k is the distance threshold. Experimental results show that our algorithms achieve substantial speedups over k-independent methods when k is small.
A cover (or quasiperiod) of a string S is a shorter string C such that every position of S is contained in some occurrence of C as a substring. The notion of cover was introduced by Apostolico and Ehrenfeucht over 30 years ago [Theor. Comput. Sci. 1993] and it has received significant attention from the combinatorial pattern matching community. In this note, we show how to efficiently test whether S admits a cover. We design an algorithm that, given n=|S| , q ∈ [n] , ϵ∈ℝ^+ , and oracle access to S, uses 𝒪(q^3 ϵ ^-1log q ) letter queries to test whether S has a cover C of length at most q or is ϵ -far from having such a cover. Our insights also lead to a simple streaming algorithm for short covers.
The Longest Common Subsequence (LCS) problem is a classical problem in computer science. Numerous variants of the LCS problem have been proposed due to its significance. In this paper, we study a new variant of the LCS problem that combines two settings: the input strings are compressed using run-length encoding (RLE) and the solution must consist of matching substrings of length k, as in the LCSk problem. We propose two algorithms to address the challenges of the klength substring constraint. The first requires O(nM + mN) timewhere n and m are the lengths of the uncompressed input strings, N and M are the lengths of the compressed input strings. The second requires O(N + M + min{n + |C| log log m, m + |C| log log n}) time, where |C| denotes the number of required k-length matching substrings between the input strings.
We introduce new entropy measures for tries taking into account the distribution of the edge labels. To do that, we study the combinatorial problem of counting the number of tries with a given symbol distribution. We provide an alternative proof for the closed formula counting the tries belonging to such a class. This formula allows us to directly define the worst-case entropy for the aforementioned set of tries. Moreover, we propose a new notion of k-th order empirical entropy for tries and we show that the relationships between these two entropy measures are similar to those between the corresponding well-known measures for strings. Contrary to the label entropy [FOCS ’05], which was designed to compress the labels of a node-labeled ordered tree, our empirical entropy considers not only the labels, but the entire structure of the trie. Finally, we relate our empirical entropy to the repetitiveness measure r proposed by Prezza [SODA ’21], which counts the number of runs in the XBWT of the trie. We show that these measures exhibit relations analogous to those of their string counterparts.