Text Indexing and Searching in Sublinear Time

Abstract

We introduce the first index that can be built in o(n) time for a text of length n, and can also be queried in o(q) time for a pattern of length q. On an alphabet of size σ, our index uses O(n nσ) bits, is built in O(n(( n)2+σ)/σ n) deterministic time, and computes the number occ of occurrences of the pattern in time O(q/σ n+ n). Each such occurrence can then be found in O( nσ) time. By slightly increasing the space and construction time, to O(n( nσ+ σ n)) and O(n3/2σ/1/2- n), respectively, for any constant 0<<1/2, we can find the occ pattern occurrences in time O(q/σ n + σ n n + occ). We build on a novel text sampling based on difference covers, which enjoys properties that allow us efficiently computing longest common prefixes in constant time. We extend our results to the secondary memory model as well, where we give the first construction in o(Sort(n)) I/Os of a data structure with suffix array functionality; this data structure supports pattern matching queries with optimal or nearly-optimal cost.

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.

Discussion (0)

Sign in to join the discussion.

Loading comments…