Given a string of length that is composed of runs of letters from the alphabet such that , we describe a data structure that, provided , stores the string in bits and supports select and access queries in time and rank queries in time. We show that bits are necessary for any such data structure and, thus, our solution is succinct. We also describe a data structure that uses $(1 + \epsilon)r\log\frac{n\sigma}{r} + O®\epsilon > 0$ is an arbitrary constant, with the same query times but without the restriction . By simple reductions to the colored predecessor problem, we show that the query times are optimal in the important case , for an arbitrary constant . We implement our solution and compare it with the state of the art, showing that the closest competitors consume 31-46% more space.

生成讲解博客的中文版本

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