
Given a string S of length N on a fixed alphabet of σ symbols, a grammar compressor produces a context-free grammar G of size n that generates S and only S. In this paper we describe data structures to support the following operations on a grammar-compressed string: access(S,i,j) (return substring S[i,j]), rank c (S,i) (return the number of occurrences of symbol c before position i in S), and select c (S,i) (return the position of the ith occurrence of c in S). Our main result for access is a method that requires \(\O(n\log N)\) bits of space and \(\O(\log N+m/\log_\sigma N)\) time to extract m = j − i + 1 consecutive symbols from S. Alternatively, we can achieve \(\O(\log_\tau N+m/\log_\sigma N)\) query time using \(\O(n\tau\log_\tau (N/n)\log N)\) bits of space, matching a lower bound stated by Verbin and Yu for strings where N is polynomially related to n when τ = log e N. For rank and select we describe data structures of size \(\O(n\sigma\log N)\) bits that support the two operations in \(\O(\log N)\) time. We also extend our other structure to support both operations in \(\O(\log_\tau N)\) time using \(\O(n\tau\sigma\log_\tau (N/n)\log N)\) bits of space. When τ = log e N the query time is O(logN/loglogN) and we provide a hardness result showing that significantly improving this would imply a major breakthrough on a hard graph-theoretical problem.
| selected citations These citations are derived from selected sources. This is an alternative to the "Influence" indicator, which also reflects the overall/total impact of an article in the research community at large, based on the underlying citation network (diachronically). | 22 | |
| popularity This indicator reflects the "current" impact/attention (the "hype") of an article in the research community at large, based on the underlying citation network. | Top 10% | |
| influence This indicator reflects the overall/total impact of an article in the research community at large, based on the underlying citation network (diachronically). | Top 10% | |
| impulse This indicator reflects the initial momentum of an article directly after its publication, based on the underlying citation network. | Top 10% |
