23,255 research outputs found

    Succinct Indexable Dictionaries with Applications to Encoding kk-ary Trees, Prefix Sums and Multisets

    Full text link
    We consider the {\it indexable dictionary} problem, which consists of storing a set S{0,...,m1}S \subseteq \{0,...,m-1\} for some integer mm, while supporting the operations of \Rank(x), which returns the number of elements in SS that are less than xx if xSx \in S, and -1 otherwise; and \Select(i) which returns the ii-th smallest element in SS. We give a data structure that supports both operations in O(1) time on the RAM model and requires B(n,m)+o(n)+O(lglgm){\cal B}(n,m) + o(n) + O(\lg \lg m) bits to store a set of size nn, where {\cal B}(n,m) = \ceil{\lg {m \choose n}} is the minimum number of bits required to store any nn-element subset from a universe of size mm. 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(lglgm)O(\lg \lg m) additive term in the space bound, answering a question raised by Fich and Miltersen, and Pagh. We present extensions and applications of our indexable dictionary data structure, including: An information-theoretically optimal representation of a kk-ary cardinal tree that supports standard operations in constant time, A representation of a multiset of size nn from {0,...,m1}\{0,...,m-1\} in B(n,m+n)+o(n){\cal B}(n,m+n) + o(n) bits that supports (appropriate generalizations of) \Rank and \Select operations in constant time, and A representation of a sequence of nn non-negative integers summing up to mm in B(n,m+n)+o(n){\cal B}(n,m+n) + o(n) bits that supports prefix sum queries in constant time.Comment: Final version of SODA 2002 paper; supersedes Leicester Tech report 2002/1

    Optimal expansions in non-integer bases

    Full text link
    For a given positive integer mm, let A={0,1,...,m}A=\set{0,1,...,m} and q(m,m+1)q \in (m,m+1). A sequence (ci)=c1c2...(c_i)=c_1c_2 ... consisting of elements in AA is called an expansion of xx if i=1ciqi=x\sum_{i=1}^{\infty} c_i q^{-i}=x. It is known that almost every xx belonging to the interval [0,m/(q1)][0,m/(q-1)] has uncountably many expansions. In this paper we study the existence of expansions (di)(d_i) of xx satisfying the inequalities i=1ndiqii=1nciqi\sum_{i=1}^n d_iq^{-i} \geq \sum_{i=1}^n c_i q^{-i}, n=1,2,...n=1,2,... for each expansion (ci)(c_i) of xx.Comment: 11 pages, 0 figures, to appear in Proc. Amer. Math. So

    Optimality of the Width-ww Non-adjacent Form: General Characterisation and the Case of Imaginary Quadratic Bases

    Get PDF
    Efficient scalar multiplication in Abelian groups (which is an important operation in public key cryptography) can be performed using digital expansions. Apart from rational integer bases (double-and-add algorithm), imaginary quadratic integer bases are of interest for elliptic curve cryptography, because the Frobenius endomorphism fulfils a quadratic equation. One strategy for improving the efficiency is to increase the digit set (at the prize of additional precomputations). A common choice is the width\nbd-ww non-adjacent form (\wNAF): each block of ww consecutive digits contains at most one non-zero digit. Heuristically, this ensures a low weight, i.e.\ number of non-zero digits, which translates in few costly curve operations. This paper investigates the following question: Is the \wNAF{}-expansion optimal, where optimality means minimising the weight over all possible expansions with the same digit set? The main characterisation of optimality of \wNAF{}s can be formulated in the following more general setting: We consider an Abelian group together with an endomorphism (e.g., multiplication by a base element in a ring) and a finite digit set. We show that each group element has an optimal \wNAF{}-expansion if and only if this is the case for each sum of two expansions of weight 1. This leads both to an algorithmic criterion and to generic answers for various cases. Imaginary quadratic integers of trace at least 3 (in absolute value) have optimal \wNAF{}s for w4w\ge 4. The same holds for the special case of base (±3±3)/2(\pm 3\pm\sqrt{-3})/2 and w2w\ge 2, which corresponds to Koblitz curves in characteristic three. In the case of τ=±1±i\tau=\pm1\pm i, optimality depends on the parity of ww. Computational results for small trace are given
    corecore