English

Combined Data Structure for Previous- and Next-Smaller-Values

Data Structures and Algorithms 2011-02-03 v1

Abstract

Let AA be a static array storing nn elements from a totally ordered set. We present a data structure of optimal size at most nlog2(3+22)+o(n)n\log_2(3+2\sqrt{2})+o(n) bits that allows us to answer the following queries on AA in constant time, without accessing AA: (1) previous smaller value queries, where given an index ii, we wish to find the first index to the left of ii where AA is strictly smaller than at ii, and (2) next smaller value queries, which search to the right of ii. As an additional bonus, our data structure also allows to answer a third kind of query: given indices i<ji<j, find the position of the minimum in A[i..j]A[i..j]. Our data structure has direct consequences for the space-efficient storage of suffix trees.

Keywords

Cite

@article{arxiv.1102.0395,
  title  = {Combined Data Structure for Previous- and Next-Smaller-Values},
  author = {Johannes Fischer},
  journal= {arXiv preprint arXiv:1102.0395},
  year   = {2011}
}

Comments

to appear in Theoretical Computer Science

R2 v1 2026-06-21T17:20:28.301Z