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

Abstract

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

0

Turn this paper into a lesson

ArcXiv compiles a structured reading guide from this paper's metadata: plain-English importance, contributions, prerequisite concepts, which sections to read first, flashcards, and a quiz. Grounded in the abstract, never invented.

Discussion (0)

Sign in to join the discussion.

Loading comments…