Compressed range minimum queries

Paweł Gawrychowski, Seungbum Jo, Shay Mozes, Oren Weimann

Research output: Contribution to journalArticlepeer-review

Abstract

Given a string S of n integers in [0,σ), a range minimum query RMQ(i,j) asks for the index of the smallest integer in S[i…j]. It is well known that the problem can be solved with a succinct data structure of size 2n+o(n) and constant query-time. In this paper we show how to preprocess S into a compressed representation that allows fast range minimum queries. This allows for sublinear size data structures with logarithmic query time. The most natural approach is to use string compression and construct a data structure for answering range minimum queries directly on the compressed string. We investigate this approach in the context of grammar compression. We then consider an alternative approach. Instead of compressing S using string compression, we compress the Cartesian tree of S using tree compression. We show that this approach can be exponentially better than the former, is never worse by more than an O(σ) factor (i.e. for constant alphabets it is never asymptotically worse), and can in fact be worse by an Ω(σ) factor.

Original languageEnglish
Pages (from-to)39-48
Number of pages10
JournalTheoretical Computer Science
Volume812
DOIs
StatePublished - 6 Apr 2020

Bibliographical note

Funding Information:
Preliminary version of this paper appeared in SPIRE 2018. The work is supported in part by Israel Science Foundation grant 592/17.

Publisher Copyright:
© 2019 Elsevier B.V.

Keywords

  • Cartesian tree
  • Grammar compression
  • RMQ
  • SLP
  • Tree compression

ASJC Scopus subject areas

  • Theoretical Computer Science
  • Computer Science (all)

Fingerprint

Dive into the research topics of 'Compressed range minimum queries'. Together they form a unique fingerprint.

Cite this