Inverse Range Selection Queries

  • M. Oğuzhan KülekciEmail author
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 9954)


On a given sequence \(X=\langle x_1x_2\ldots x_n \rangle \), the range selection queries denoted by Q(ijk) return the \(k^{th}\)-smallest element on \(\langle x_ix_{i+1}\ldots x_j \rangle \). The problem has received significant attention in recent years and many solutions aiming to achieve this task with a cost lower than dynamically sorting the elements on the queried range have been proposed. The reverse problem interestingly has not yet received that much attention, although there exists practical usage scenarios especially in the time–series analysis. This study investigates the inverse range selection query \( \bar{Q}(\upsilon ,k)\) that aims to detect all possible intervals on X such that the \(k^{th}\)-smallest element is less than or equal to \(\upsilon \). We present the basic solution first and then discuss how that basic solution can be implemented with different data structures previously proposed for regular range selection queries.


Range Query Maximal Range Reverse Problem Range Selection Wavelet Tree 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.



The author thanks to the anonymous reviewers of the paper for their valuable corrections and comments.


  1. 1.
    Chan, T.M., Wilkinson, B.T.: Adaptive and approximate orthogonal range counting. In: Proceedings of the Twenty-Fourth Annual ACM-SIAM Symposium on Discrete Algorithms (SODA), pp. 241–251 (2013)Google Scholar
  2. 2.
    Gagie, T., Puglisi, S.J., Turpin, A.: Range quantile queries: another virtue of wavelet trees. In: Karlgren, J., Tarhio, J., Hyyrö, H. (eds.) SPIRE 2009. LNCS, vol. 5721, pp. 1–6. Springer, Heidelberg (2009)CrossRefGoogle Scholar
  3. 3.
    Grossi, R., Gupta, A., Vitter, J.S.: High-order entropy-compressed text indexes. In: Proceedings of the 14th Annual ACM-SIAM Symposium on Discrete Algorithms, pp. 841–850. SIAM (2003)Google Scholar
  4. 4.
    Hoare, C.A.R.: Algorithm 65: find. Commun. ACM 4(7), 321–322 (1961)CrossRefGoogle Scholar
  5. 5.
    Jørgensen, A.G., Larsen, K.G.: Range selection and median: tight cell probe lower bounds and adaptive data structures. In: Proceedings of the Twenty-Second Annual ACM-SIAM Symposium on Discrete Algorithms, pp. 805–813 (2011)Google Scholar
  6. 6.
    Krizanc, D., Morin, P., Smid, M.: Range mode and range median queries on lists and trees. Nord. J. Comput. 12(1), 1–17 (2005)MathSciNetzbMATHGoogle Scholar
  7. 7.
    Külekci, M.O., Thankachan, S.V.: Range selection queries in data aware space and time. In: Data Compression Conference (DCC), pp. 73–82. IEEE (2015)Google Scholar
  8. 8.
    Külekci, M.O.: Enhanced variable-length codes: improved compression with efficient random access. In: Data Compression Conference (DCC), pp. 362–371. IEEE (2014)Google Scholar
  9. 9.
    Navarro, G.: Wavelet trees for all. In: Kärkkäinen, J., Stoye, J. (eds.) CPM 2012. LNCS, vol. 7354, pp. 2–26. Springer, Heidelberg (2012)CrossRefGoogle Scholar
  10. 10.
    Okanohara, D., Sadakane, K.: Practical entropy-compressed rank/select dictionary. In: Proceedings of the Meeting on Algorithm Engineering & Expermiments, pp. 60–70. Society for Industrial and Applied Mathematics, Philadelphia (2007).
  11. 11.
    Petersen, H., Grabowski, S.: Range mode and range median queries in constant time and sub-quadratic space. Inform. Process. Lett. 109(4), 225–228 (2009)MathSciNetCrossRefzbMATHGoogle Scholar

Copyright information

© Springer International Publishing AG 2016

Authors and Affiliations

  1. 1.Informatics Instituteİstanbul Technical UniversityIstanbulTurkey

Personalised recommendations