We introduce the first index that can be built in time for a text of length , and can also be queried in time for a pattern of length . On an alphabet of size , our index uses bits, is built in deterministic time, and computes the number of occurrences of the pattern in time . Each such occurrence can then be found in time. By slightly increasing the space and construction time, to $O(n(\sqrt{\log n\log\sigma}+ \log\sigma\log^\varepsilon n))O(n\log^{3/2}\sigma/\log^{1/2-\varepsilon} n)0<\varepsilon<1/2O(q/\log_\sigma n + \sqrt{\log_\sigma n}\log\log n + )$. 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 I/Os of a data structure with suffix array functionality; this data structure supports pattern matching queries with optimal or nearly-optimal cost.

生成讲解博客的中文版本

生成AI智能校验的中文版本