We consider the indexable dictionary problem which consists in storing a set S ⊆ {0,…, m - 1} for some integer m, while supporting the operations of rank(x), which returns the number of elements in S that are less than x if x ε S, and -1 otherwise; and select(i) which returns the i-th smallest element in S.We give a structure that supports both operations in O(1) time on the RAM model and requires B(n,m) + o(n) + O(lg lg m) bits to store a set of size n, where B(n,m) = ⌈lg (nm)⌉ is the minimum number of bits required to store any n-element subset from a universe of size m. Previous dictionaries taking this space only supported (yes/no) membership queries in O(1) time. In the cell probe model we can remove the O(lg lg m) additive termin the space bound, answering a question raised by Fich and Miltersen, and Pagh.We also present two applications of our dictionary structure:• An information-theoretically optimal representation for k-ary cardinal trees (aka k-ary tries). Our structure uses C(n,k) + o(n + lg k) bits to store a k-ary tree with n nodes and can support parent, i-th child, child labeled i, and the degree of a node in constant time, where C(n,k) is the minimum number of bits to store any n-node k-ary tree. Previous space efficient representations for cardinal k-ary trees required C(n,k) + Ω(n) bits.• An optimal representation for multisets where (appropriate generalisations of) the select and rank operations can be supported in O(1) time. Our structure uses B(n, m + n) + o(n) + O(lg lg m) bits to represent a multiset ofsize n from an m element set; the first term is the minimum number of bits required to represent such a multiset.
展开▼
机译:我们考虑可索引字典 I>问题,该问题包括为某些整数存储一组 S I>⊆{0,…, m I>-1} m, I>,同时支持 rank I>( x I>)的操作,该操作返回 S I>中小于<如果 x I>ε S,则I> x I>,否则为-1;和 select I>( i I>),它返回 S中第 i I>个最小的元素。 I>这两种操作都在RAM模型上以 O I>(1)的时间进行,并且需要 B I>( n,m I>)+ o I> ( n I>)+ O I>(lg lg m I>)位来存储一组大小为 n的 I>,其中 B I>( n,m I>)=⌈lg( n I> INF> m I> SUP>)⌉是存储大小为 m的Universe中任何 n I>个元素子集所需的最少位数。 )在 O I>(1)时间内进行成员资格查询。在细胞探针模型中,我们可以删除空间边界中的 O I>(lg lg m I>)加法项,回答Fich,Miltersen和Pagh提出的问题。字典结构的两个应用:•信息理论上表示 k元基数树 I>的最佳表示形式(又称 k I> ary尝试数)。我们的结构使用 C I>( n,k I>)+ o I>( n I> + lg k I >)位以存储具有 n I>个节点的 k I>元树,并且可以支持父级 i I>子级,子级标记为 i的子级, I>和恒定时间的节点度,其中 C I>( n,k I>)是存储任何 n < / I>-节点 k I> -ary树。以前用于基数 k I>元树的空间有效表示形式需要 C I>( n,k I>)+Ω( n I>)位的最佳表示形式,其中 select I>和 rank I>操作(适当的概括)可以在 O I>(1)时间内得到支持。我们的结构使用 B I>( n,m + n I>)+ o I>( n I>)+ O < / I>(lg lg lg m I>)位表示 m I>个元素集的大小为 n I>的多集;第一项是表示这种多重集所需的最小位数。
展开▼