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美元的字符串,典型的字符串索引问题在于将美元预先处理成一个紧凑的数据结构,支持高效的后续模式查询。 在本文中,我们考虑基本变量,即该模式以压缩形式给出,目标是达到与该模式压缩大小相比快速的查询时间。这包含一个共同的客户端-服务器情景,即客户以压缩形式提交查询并将其传送到服务器。我们考虑的是,如何在处理前将查询解压缩,而不是服务器解压缩,而是如何直接处理压缩查询。我们的主要结果是一个新颖的线性空间数据结构,它为与经典的 Lempel-Ziv 压缩计划压缩模式相近最佳的查询时间。我们在此过程中,我们开发了几个独立感兴趣的数据结构技术,包括一个将线性空间中所有LZ77压缩后缀编码的新型数据结构,以及一个将缩短搜索时间从三角形大小的对数到图案长度的对数进行一般解剖。