Counting Colours in Compressed Strings
Abstract
Suppose we are asked to preprocess a string \(s [1..n]\) such that later, given a substring's endpoints, we can quickly count how many distinct characters it contains. In this paper we give a data structure for this problem that takes \(n H0 (s) + n + n H0 (s)\) bits, where \(H0 (s)\) is the 0th-order empirical entropy of s, and answers queries in 1 + ε n time for any constant \(ε > 0\). We also show how our data structure can be made partially dynamic.
0
Turn this paper into a lesson
ArcXiv compiles a structured reading guide from this paper's metadata: plain-English importance, contributions, prerequisite concepts, which sections to read first, flashcards, and a quiz. Grounded in the abstract, never invented.