Encoding Range Minimum Queries

نویسندگان

  • Pooya Davoodi
  • Gonzalo Navarro
  • Rajeev Raman
  • S. Srinivasa Rao
چکیده

We consider the problem of encoding range minimum queries (RMQs): given an array A[1..n] of distinct totally ordered values, to pre-process A and create a data structure that can answer the query RMQ(i, j), which returns the index containing the smallest element in A[i..j], without access to the array A at query time. We give a data structure whose space usage is 2n + o(n) bits, which is asymptotically optimal for worst-case data, and answers RMQs in O(1) worstcase time. This matches the previous result of Fischer and Heun, but is obtained ∗An extended abstract of some of the results in Sections 1 and 2 appeared in Proc. 18th Annual International Conference on Computing and Combinatorics (COCOON 2012), Springer LNCS 7434, pp. 396–407. †Research supported by NSF grant CCF-1018370 and BSF grant 2010437. ‡Partially funded by Millennium Nucleus Information and Coordination in Networks ICM/FIC P10-024F, Chile. §Research partly supported by Basic Science Research Program through the National Research Foundation of Korea funded by the Ministry of Education, Science and Technology (Grant number 2012-0008241). 1 ar X iv :1 31 1. 43 94 v1 [ cs .D S] 1 8 N ov 2 01 3 in a more natural way. Furthermore, our result can encode the RMQs of a random array A in 1.919n + o(n) bits in expectation, which is not known to hold for Fischer and Heun’s result. We then generalize our result to the encoding range top-2 query (RT2Q) problem, which is like the encoding RMQ problem except that the query RT2Q(i, j) returns the indices of both the smallest and second-smallest elements of A[i..j]. We introduce a data structure using 3.272n+o(n) bits that answers RT2Qs in constant time, and also give lower bounds on the effective entropy of RT2Q.

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Optimal Encodings for Range Min-Max and Top-k

In this paper we consider various encoding problems for range queries on arrays. In these problems, the goal is that the encoding occupies the information theoretic minimum space required to answer a particular set of range queries. Given an array A[1..n] a range top-k query on an arbitrary range [i, j] ⊆ [1, n] asks us to return the ordered set of indices {`1, ..., `k} such that A[`m] is the m...

متن کامل

Simultaneous Encodings for Range and Next/Previous Larger/Smaller Value Queries

Given an array of n elements from a total order, we propose encodings that support various range queries (range minimum, range maximum and their variants), and previous and next smaller/larger value queries. When query time is not of concern, we obtain a 4.088n+o(n)-bit encoding that supports all these queries. For the case when we need to support all these queries in constant time, we give an ...

متن کامل

The Encoding Complexity of Two Dimensional Range Minimum Data Structures

In the two-dimensional range minimum query problem an input matrix A of dimension m× n, m ≤ n, has to be preprocessed into a data structure such that given a query rectangle within the matrix, the position of a minimum element within the query range can be reported. We consider the space complexity of the encoding variant of the problem where queries have access to the constructed data structur...

متن کامل

Encoding Two-Dimensional Range Top-k Queries

We consider various encodings that support range Top-k queries on a two-dimensional array containing elements from a total order. For an m × n array, with m ≤ n, we first propose an almost optimal encoding for answering one-sided Top-k queries, whose query range is restricted to [1 . . .m][1 . . . a], for 1 ≤ a ≤ n. Next, we propose an encoding for the general Top-k queries that takes m2 lg ((k...

متن کامل

Efficient Range Minimum Queries using Binary Indexed Trees

We present new results on Binary Indexed Trees in order to efficiently solve Range Minimum Queries. We introduce a way of using the Binary Indexed Trees so that we can answer different types of queries, e.g. the range minimum query, in O (log N ) time complexity per operation, outperforming in speed similar data structures like Segment/Range Trees or the Sparse Table Algorithm.

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:
  • CoRR

دوره abs/1311.4394  شماره 

صفحات  -

تاریخ انتشار 2013