We introduce the first grammar-compressed representation of a sequence that supports searches in time that depends only logarithmically on the size of the grammar. Given a text that is represented by a (context-free) grammar of (terminal and nonterminal) symbols and size (measured as the sum of the lengths of the right hands of the rules), a basic grammar-based representation of takes bits of space. Our representation requires bits of space, for any . It can find the positions of the occurrences of a pattern of length in in $O((m^2/\epsilon)\lg (\frac{\lg u}{\lg n}) +occ\lg n)\ellTO(\ell+h\lg(N/h))h$ is the height of the grammar tree.

生成讲解博客的中文版本

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