Results 1  10
of
28
Range quantile queries: Another virtue of wavelet trees
 In Proc. 16th SPIRE, LNCS 5721
, 2009
"... Abstract. We show how to use a balanced wavelet tree as a data structure that stores a list of numbers and supports efficient range quantile queries. A range quantile query takes a rank and the endpoints of a sublist and returns the number with that rank in that sublist. For example, if the rank is ..."
Abstract

Cited by 33 (5 self)
 Add to MetaCart
(Show Context)
Abstract. We show how to use a balanced wavelet tree as a data structure that stores a list of numbers and supports efficient range quantile queries. A range quantile query takes a rank and the endpoints of a sublist and returns the number with that rank in that sublist. For example, if the rank is half the sublist’s length, then the query returns the sublist’s median. We also show how these queries can be used to support spaceefficient coloured range reporting and document listing. 1
Approximate Range Mode and Range Median Queries
 In Proceedings of the 22nd Symposium on Theoretical Aspects of Computer Science (STACS
, 2005
"... ABSTRACT. Mode and median are two of the most important statistics we use when we analyze data. In this paper, we consider data structures and algorithms for preprocessing a labelled list of length n so that, for any given i and j we can answer queries of the form: What is the mode or median label i ..."
Abstract

Cited by 23 (1 self)
 Add to MetaCart
ABSTRACT. Mode and median are two of the most important statistics we use when we analyze data. In this paper, we consider data structures and algorithms for preprocessing a labelled list of length n so that, for any given i and j we can answer queries of the form: What is the mode or median label in the sequence of labels between indices i and j. Our results are on an approximate version of this problem. Using O(n/(1 − α)) space, our data structure can find in O(log log 1 n) time an element whose number α of occurrences is at least α times of that of the mode, for some userspecified parameter 0 < α < 1. Data structures are proposed to achieve constant query time for α = 1/2, 1/3 and 1/4, using storage space of n log n, n log log n and n, respectively. We also show that if the elements are comparable, an O(n/(1−α)) space, O(1) query time data structure can answer range median queries with a guaranteed accuracy of α × ⌊j − i + 1/2⌋. 1
Range Selection and Median: Tight Cell Probe Lower Bounds and Adaptive Data Structures
"... Range selection is the problem of preprocessing an input array A of n unique integers, such that given a query (i, j, k), one can report the k’th smallest integer in the subarray A[i], A[i + 1],..., A[j]. In this paper we consider static data structures in the wordRAM for range selection and severa ..."
Abstract

Cited by 21 (6 self)
 Add to MetaCart
(Show Context)
Range selection is the problem of preprocessing an input array A of n unique integers, such that given a query (i, j, k), one can report the k’th smallest integer in the subarray A[i], A[i + 1],..., A[j]. In this paper we consider static data structures in the wordRAM for range selection and several natural special cases thereof. The first special case is known as range median, which arises when k is fixed to ⌊(j − i + 1)/2⌋. The second case, denoted prefix selection, arises when i is fixed to 0. Finally, we also consider the bounded rank prefix selection problem and the fixed rank range selection problem. In the former, data structures must support prefix selection queries under the assumption that k ≤ κ for some value κ ≤ n given at construction time, while in the latter, data structures must support range selection queries where k is fixed beforehand for all queries. We prove cell probe lower bounds for range selection, prefix selection and range median, stating that any data structure that uses S words of space needs Ω(log n / log(Sw/n)) time to answer a query. In particular, any data structure that uses n log O(1) n space needs Ω(log n / log log n) time to answer a query, and any data structure that supports queries in constant time, needs n 1+Ω(1) space. For data structures that uses n log O(1) n space this matches the best known upper bound. Additionally, we present a linear space data structure that supports range selection queries in O(log k / log log n + log log n) time. Finally, we prove that any data structure that uses S space, needs Ω(log κ / log(Sw/n)) time to answer a bounded rank prefix selection query and Ω(log k / log(Sw/n)) time to answer a fixed rank range selection query. This shows that our data structure is optimal except for small values of k. 1
LinearSpace Data Structures for Range Mode Query in Arrays ∗
"... A mode of a multiset S is an element a ∈ S of maximum multiplicity; that is, a occurs at least as frequently as any other element in S. Given an array A[1: n] of n elements, we consider a basic problem: constructing a static data structure that efficiently answers range mode queries on A. Each query ..."
Abstract

Cited by 20 (10 self)
 Add to MetaCart
(Show Context)
A mode of a multiset S is an element a ∈ S of maximum multiplicity; that is, a occurs at least as frequently as any other element in S. Given an array A[1: n] of n elements, we consider a basic problem: constructing a static data structure that efficiently answers range mode queries on A. Each query consists of an input pair of indices (i, j) for which a mode of A[i: j] must be returned. The best previous data structure with linear space, by Krizanc, Morin, and Smid (ISAAC 2003), requires O ( √ n log log n) query time. We improve their result and present an O(n)space data structure that supports range mode queries in O ( p n / log n) worstcase time. Furthermore, we present strong evidence that a query time significantly below √ n cannot be achieved by purely combinatorial techniques; we show that boolean matrix multiplication of two √ n × √ n matrices reduces to n range mode queries in an array of size O(n). Additionally, we give linearspace data structures for orthogonal range mode in higher dimensions (queries in near O(n 1−1/2d) time) and for halfspace range mode in higher dimensions (queries in O(n 1−1/d2) time).
Counting Inversions, Offline Orthogonal Range Counting, and Related Problems
"... We give an O(n √ lg n)time algorithm for counting the number of inversions in a permutation on n elements. This improves a longstanding previous bound of O(n lg n / lg lg n) that followed from Dietz’s data structure [WADS’89], and answers a question of Andersson and Petersson [SODA’95]. As Dietz’s ..."
Abstract

Cited by 14 (4 self)
 Add to MetaCart
We give an O(n √ lg n)time algorithm for counting the number of inversions in a permutation on n elements. This improves a longstanding previous bound of O(n lg n / lg lg n) that followed from Dietz’s data structure [WADS’89], and answers a question of Andersson and Petersson [SODA’95]. As Dietz’s result is known to be optimal for the related dynamic rank problem, our result demonstrates a significant improvement in the offline setting. Our new technique is quite simple: we perform a “vertical partitioning ” of a trie (akin to van Emde Boas trees), and use ideas from external memory. However, the technique finds numerous applications: for example, we obtain • in d dimensions, an algorithm to answer n offline orthogonal range counting queries in time O(n lg d−2+1/d n); • an improved construction time for online data structures for orthogonal range counting; • an improved update time for the partial sums problem; • faster Word RAM algorithms for finding the maximum depth in an arrangement of axisaligned rectangles, and for the slope selection problem. As a bonus, we also give a simple (1 + ε)approximation algorithm for counting inversions that runs in linear time, improving the previous O(n lg lg n) bound by Andersson and Petersson.
Range majority in constant time and linear space
 In Proc. ICALP, volume 6755 of LNCS
, 2011
"... Abstract. Given an array A of size n, we consider the problem of answering range majority queries: given a query range [i..j] where 1 ≤ i ≤ j ≤ n, return the majority element of the subarray A[i..j] if it exists. We describe a linear space data structure that answers range majority queries in const ..."
Abstract

Cited by 13 (7 self)
 Add to MetaCart
(Show Context)
Abstract. Given an array A of size n, we consider the problem of answering range majority queries: given a query range [i..j] where 1 ≤ i ≤ j ≤ n, return the majority element of the subarray A[i..j] if it exists. We describe a linear space data structure that answers range majority queries in constant time. We further generalize this problem by defining range αmajority queries: given a query range [i..j], return all the elements in the subarray A[i..j] with frequency greater than α(j−i+1). We prove an upper bound on the number of αmajorities that can exist in a subarray, assuming that query ranges are restricted to be larger than a given threshold. Using this upper bound, we generalize our range majority data structure to answer range αmajority queries in O ( 1 α) time using O(n lg ( 1 α + 1)) space, for any fixed α ∈ (0, 1). This result is interesting since other similar range query problems based on frequency have nearly logarithmic lower bounds on query time when restricted to linear space. 1
Range Medians
"... Abstract. We study a generalization of the classical median finding problem to batched query case: given an array of unsorted n items and k (not necessarily disjoint) intervals in the array, the goal is to determine the median in each of the intervals in the array. We give an algorithm that uses O(n ..."
Abstract

Cited by 12 (0 self)
 Add to MetaCart
(Show Context)
Abstract. We study a generalization of the classical median finding problem to batched query case: given an array of unsorted n items and k (not necessarily disjoint) intervals in the array, the goal is to determine the median in each of the intervals in the array. We give an algorithm that uses O(n log k + k log k log n) comparisons and show a lower bound of Ω(n log k) comparisons for this problem. This is optimal for k = O(n / log n). 1
Linearspace data structures for range minority query in arrays
 In Proceedings of the 13th Scandinavian Symposium and Workshops on Algorithm Theory (SWAT
, 2012
"... Abstract. We consider range queries in arrays that search for lowfrequency elements: least frequent elements and αminorities. An αminority of a query range has multiplicity no greater than an α fraction of the elements in the range. Our data structure for the least frequent element range query pro ..."
Abstract

Cited by 12 (6 self)
 Add to MetaCart
(Show Context)
Abstract. We consider range queries in arrays that search for lowfrequency elements: least frequent elements and αminorities. An αminority of a query range has multiplicity no greater than an α fraction of the elements in the range. Our data structure for the least frequent element range query problem requires O(n) space, O(n 3/2) preprocessing time, and O ( √ n) query time. A reduction from boolean matrix multiplication to this problem shows the hardness of simultaneous improvements in both preprocessing time and query time. Our data structure for the αminority range query problem requires O(n) space, supports queries in O(1/α) time, and allows α to be specified at query time. 1
Adaptive and Approximate Orthogonal Range Counting
"... We present three new results on one of the most basic problems in geometric data structures, 2D orthogonal range counting. All the results are in the wbit word RAM model. • It is well known that there are linearspace data structures for 2D orthogonal range counting with worstcase optimal query t ..."
Abstract

Cited by 7 (0 self)
 Add to MetaCart
We present three new results on one of the most basic problems in geometric data structures, 2D orthogonal range counting. All the results are in the wbit word RAM model. • It is well known that there are linearspace data structures for 2D orthogonal range counting with worstcase optimal query time O(logw n). We give an O(n log log n)space adaptive data structure that improves the query time to O(log log n + logw k), where k is the output count. When k = O(1), our bounds match the state of the art for the 2D orthogonal range emptiness problem [Chan, Larsen, and Pătra¸scu, SoCG 2011]. • We give an O(n log log n)space data structure for approximate 2D orthogonal range counting that can compute a (1 + δ)factor approximation to the count in O(log log n) time for any fixed constant δ> 0. Again, our bounds match the state of the art for the 2D orthogonal range emptiness problem. • Lastly, we consider the 1D range selection problem, where a query in an array involves finding the kth least element in a given subarray. This problem is closely related to 2D 3sided orthogonal range counting. Recently, Jørgensen and Larsen [SODA 2011] presented a linearspace adaptive data structure with query time O(log log n + log w k). We give a new linearspace structure that improves the query time to O(1 + log w k), exactly matching the lower bound proved by Jørgensen and Larsen.
Linearspace data structures for range frequency queries on arrays and trees
 In Proc. MFCS, volume 8087 of LNCS
, 2013
"... Abstract. We present O(n)space data structures to support various range frequency queries on a given array A[0: n − 1] or tree T with n nodes. Given a query consisting of an arbitrary pair of preorder rank indices (i, j), our data structures return a least frequent element, mode, or αminority of ..."
Abstract

Cited by 5 (4 self)
 Add to MetaCart
(Show Context)
Abstract. We present O(n)space data structures to support various range frequency queries on a given array A[0: n − 1] or tree T with n nodes. Given a query consisting of an arbitrary pair of preorder rank indices (i, j), our data structures return a least frequent element, mode, or αminority of the multiset of elements in the unique path with endpoints at indices i and j in A or T. We describe a data structure that supports range least frequent element queries on arrays in O( n/w) time, improving the Θ( n) worstcase time required by the data structure of Chan et al. (SWAT 2012), where w ∈ Ω(logn) is the word size in bits. We describe a data structure that supports range mode queries on trees in O(log log n n/w) time, improving the Θ( n logn) worstcase time required by the data structure of Krizanc et al. (ISAAC 2003). Finally, we describe a data structure that supports range αminority queries on trees in O(α−1 log log n) time, where α ∈ [0, 1] can be specified at query time. 1