We consider document listing on string collections, that is, finding in which strings a given pattern appears. In particular, we focus on repetitive collections: a collection of size over alphabet is composed of copies of a string of size , and edits are applied on ranges of copies. We introduce the first document listing index with size , precisely bits, and with useful worst-case time guarantees: Given a pattern of length , the index reports the strings where it appears in time $O(m\log^{1+\epsilon} N \cdot \ndoc)\epsilon>0O(m\log N)\ndoc=0$). Our technique is to augment a range data structure that is commonly used on grammar-based indexes, so that instead of retrieving all the pattern occurrences, it computes useful summaries on them. We show that the idea has independent interest: we introduce the first grammar-based index that, on a text with a grammar of size , uses bits and counts the number of occurrences of a pattern in time $O(m^2 + m\log^{2+\epsilon} r)\epsilon>0O(z\log(N/z)\log N)Tz$ phrases, counting occurrences in time .

生成讲解博客的中文版本

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