{"title":"亚线性时间下的文本索引与检索","authors":"J. Munro, G. Navarro, Yakov Nekrich","doi":"10.4230/LIPIcs.CPM.2020.24","DOIUrl":null,"url":null,"abstract":"We introduce the first index that can be built in $o(n)$ time for a text of length $n$, and also queried in $o(m)$ time for a pattern of length $m$. On a constant-size alphabet, for example, our index uses $O(n\\log^{1/2+\\varepsilon}n)$ bits, is built in $O(n/\\log^{1/2-\\varepsilon} n)$ deterministic time, and finds the $\\mathrm{occ}$ pattern occurrences in time $O(m/\\log n + \\sqrt{\\log n}\\log\\log n + \\mathrm{occ})$, where $\\varepsilon>0$ is an arbitrarily small constant. As a comparison, the most recent classical text index uses $O(n\\log n)$ bits, is built in $O(n)$ time, and searches in time $O(m/\\log n + \\log\\log n + \\mathrm{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))$ time of a data structure with suffix array functionality, which can search for patterns in the almost optimal time, with an additive penalty of $O(\\sqrt{\\log_{M/B} n}\\log\\log n)$, where $M$ is the size of main memory available and $B$ is the disk block size.","PeriodicalId":236737,"journal":{"name":"Annual Symposium on Combinatorial Pattern Matching","volume":"25 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2017-12-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"9","resultStr":"{\"title\":\"Text Indexing and Searching in Sublinear Time\",\"authors\":\"J. Munro, G. Navarro, Yakov Nekrich\",\"doi\":\"10.4230/LIPIcs.CPM.2020.24\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"We introduce the first index that can be built in $o(n)$ time for a text of length $n$, and also queried in $o(m)$ time for a pattern of length $m$. On a constant-size alphabet, for example, our index uses $O(n\\\\log^{1/2+\\\\varepsilon}n)$ bits, is built in $O(n/\\\\log^{1/2-\\\\varepsilon} n)$ deterministic time, and finds the $\\\\mathrm{occ}$ pattern occurrences in time $O(m/\\\\log n + \\\\sqrt{\\\\log n}\\\\log\\\\log n + \\\\mathrm{occ})$, where $\\\\varepsilon>0$ is an arbitrarily small constant. As a comparison, the most recent classical text index uses $O(n\\\\log n)$ bits, is built in $O(n)$ time, and searches in time $O(m/\\\\log n + \\\\log\\\\log n + \\\\mathrm{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))$ time of a data structure with suffix array functionality, which can search for patterns in the almost optimal time, with an additive penalty of $O(\\\\sqrt{\\\\log_{M/B} n}\\\\log\\\\log n)$, where $M$ is the size of main memory available and $B$ is the disk block size.\",\"PeriodicalId\":236737,\"journal\":{\"name\":\"Annual Symposium on Combinatorial Pattern Matching\",\"volume\":\"25 1\",\"pages\":\"0\"},\"PeriodicalIF\":0.0000,\"publicationDate\":\"2017-12-01\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"9\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"Annual Symposium on Combinatorial Pattern Matching\",\"FirstCategoryId\":\"1085\",\"ListUrlMain\":\"https://doi.org/10.4230/LIPIcs.CPM.2020.24\",\"RegionNum\":0,\"RegionCategory\":null,\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"\",\"PubModel\":\"\",\"JCR\":\"\",\"JCRName\":\"\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"Annual Symposium on Combinatorial Pattern Matching","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.4230/LIPIcs.CPM.2020.24","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 9
摘要
我们介绍了第一个索引,它可以在$o(n)$ time中为长度为$n$的文本构建索引,也可以在$o(m)$ time中查询长度为$m$的模式。例如,在固定大小的字母表上,我们的索引使用$O(n\log^{1/2+\varepsilon}n)$位,在$O(n/\log^{1/2-\varepsilon} n)$确定时间内构建,并在$O(m/\log n + \sqrt{\log n}\log\log n + \mathrm{occ})$时间内找到$\mathrm{occ}$模式,其中$\varepsilon>0$是一个任意小的常数。作为比较,最新的经典文本索引使用$O(n\log n)$位,在$O(n)$时间内构建,并在$O(m/\log n + \log\log n + \mathrm{occ})$时间内搜索。我们建立了一个基于差异覆盖的新颖文本采样,它具有允许我们在恒定时间内有效计算最长公共前缀的特性。我们也将结果扩展到辅助内存模型,其中我们在$o(Sort(n))$时间内给出了带有后缀数组功能的数据结构的第一个构造,它可以在几乎最优的时间内搜索模式,并附带$O(\sqrt{\log_{M/B} n}\log\log n)$的附加惩罚,其中$M$是可用的主内存大小,$B$是磁盘块大小。
We introduce the first index that can be built in $o(n)$ time for a text of length $n$, and also queried in $o(m)$ time for a pattern of length $m$. On a constant-size alphabet, for example, our index uses $O(n\log^{1/2+\varepsilon}n)$ bits, is built in $O(n/\log^{1/2-\varepsilon} n)$ deterministic time, and finds the $\mathrm{occ}$ pattern occurrences in time $O(m/\log n + \sqrt{\log n}\log\log n + \mathrm{occ})$, where $\varepsilon>0$ is an arbitrarily small constant. As a comparison, the most recent classical text index uses $O(n\log n)$ bits, is built in $O(n)$ time, and searches in time $O(m/\log n + \log\log n + \mathrm{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))$ time of a data structure with suffix array functionality, which can search for patterns in the almost optimal time, with an additive penalty of $O(\sqrt{\log_{M/B} n}\log\log n)$, where $M$ is the size of main memory available and $B$ is the disk block size.