Space-efficient Data Structure for Next/Previous Larger/Smaller Value Queries

Abstract

Given an array of size n from a total order, we consider the problem of constructing a data structure that supports various queries (range minimum/maximum queries with their variants and next/previous larger/smaller queries) efficiently. In the encoding model (i.e., the queries can be answered without the input array), we propose a (3.701n + o(n))-bit data structure, which supports all these queries in O(()n) time, for any positive constant integer (here, (1) n = n, and for > 1, () n = ((-1) n)). The space of our data structure matches the current best upper bound of Tsur (Inf. Process. Lett., 2019), which does not support the queries efficiently. Also, we show that at least 3.16n-( n) bits are necessary for answering all the queries. Our result is obtained by generalizing Gawrychowski and Nicholson's (3n - ( n))-bit lower bound (ICALP, 15) for answering range minimum and maximum queries on a permutation of size n.

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…