Encoding two-dimensional range top-k queries revisited
We consider the problem of encoding two-dimensional arrays, whose elements come from a total order, for answering top-k queries. The aim is to obtain encodings that use space close to the information-theoretic lower bound, which can be constructed efficiently. For 2 × n arrays, we first give upper and lower bounds on space for answering sorted and unsorted 3-sided top-k queries. For m × n arrays, with m < n and k < mn, we obtain (m(k+1)n n+4nm(m-1)+o(n))-bit encoding for answering sorted 4-sided top-k queries. This improves the (O(mnn),m^2(k+1)n n +mm+o(n))-bit encoding of Jo et al. [CPM, 2016] when m = o(n). This is a consequence of a new encoding that encodes a 2 × n array to support sorted 4-sided top-k queries on it using an additional 4n bits, in addition to the encodings to support the top-k queries on individual rows. This new encoding is a non-trivial generalization of the encoding of Jo et al. [CPM, 2016] that supports sorted 4-sided top-2 queries on it using an additional 3n bits. We also give almost optimal space encodings for 3-sided top-k queries, and show lower bounds on encodings for 3-sided and 4-sided top-k queries.
READ FULL TEXT