Selection from read-only memory with limited workspace

2014 
Given an unordered array of elements drawn from a totally ordered set and an integer in the range from 1 to , in the classic selection problem the task is to find the -th smallest element in the array. We study the complexity of this problem in the : The input array is stored on read-only memory, and the algorithm has access to a limited amount of workspace. We prove that the linear-time prune-and-search algorithm—presented in most textbooks on algorithms—can be modified to use bits instead of words of extra space. Prior to our work, the best known algorithm by Frederickson could perform the task with bits of extra space in time. Our result separates the space-restricted random-access model and the multi-pass streaming model, since we can surpass the lower bound known for the latter model. We also generalize our algorithm for the case when the size of the workspace is bits, where . The running time of our generalized algorithm is , slightly improving over the bound of Frederickson's algorithm. To obtain the improvements mentioned above, we developed a new data structure, called the wavelet stack, that we use for repeated pruning. We expect the wavelet stack to be a useful tool in other applications as well.
    • Correction
    • Source
    • Cite
    • Save
    • Machine Reading By IdeaReader
    0
    References
    0
    Citations
    NaN
    KQI
    []