Given a string $S$ of length $n$, the classic string indexing problem is to preprocess $S$ into a compact data structure that supports efficient subsequent pattern queries. In this paper we consider the basic variant where the pattern is given in compressed form and the goal is to achieve query time that is fast in terms of the compressed size of the pattern. This captures the common client-server scenario, where a client submits a query and communicates it in compressed form to a server. Instead of the server decompressing the query before processing it, we consider how to efficiently process the compressed query directly. Our main result is a novel linear space data structure that achieves near-optimal query time for patterns compressed with the classic Lempel-Ziv compression scheme. Along the way we develop several data structural techniques of independent interest, including a novel data structure that compactly encodes all LZ77 compressed suffixes of a string in linear space and a general decomposition of tries that reduces the search time from logarithmic in the size of the trie to logarithmic in the length of the pattern.
翻译:给定长度为 $n$ 的字符串 $S$,经典字符串索引问题是将 $S$ 预处理为紧凑的数据结构,以支持高效的后续模式查询。本文研究基本变体问题:模式以压缩形式给出,目标是在模式压缩规模上实现快速的查询时间。这捕捉了常见的客户端-服务器场景,其中客户端提交查询并以压缩形式传输给服务器。我们考虑如何直接高效处理压缩查询,而非服务器在处理前先解压查询。我们的主要成果是一种新颖的线性空间数据结构,能够针对使用经典Lempel-Ziv压缩方案压缩的模式实现接近最优的查询时间。在此过程中,我们开发了几种具有独立兴趣的数据结构技术,包括一种在线性空间中紧凑编码字符串所有LZ77压缩后缀的新颖数据结构,以及一种将搜索时间从与字典树大小呈对数关系降低到与模式长度呈对数关系的字典树通用分解方法。