{"title":"Space-Efficient Data Structure for Next/Previous Larger/Smaller Value Queries","authors":"Seungbum Jo, Geunho Kim","doi":"10.1007/s00453-025-01325-9","DOIUrl":null,"url":null,"abstract":"<div><p>Given an array of size <i>n</i> from a total order, we consider the problem of constructing a data structure that supports various queries (range minimum/maximum queries with their variants and next/previous larger/smaller queries) efficiently. In the encoding model (i.e., the queries can be answered without the input array), we propose a <span>\\((3.701n + o(n))\\)</span>-bit data structure, which supports all these queries in <span>\\(O(\\log ^{(\\ell )}n)\\)</span> time, for any positive constant integer <span>\\(\\ell \\)</span> (here, <span>\\(\\log ^{(1)} n = \\log n\\)</span>, and for <span>\\(\\ell > 1\\)</span>, <span>\\(\\log ^{(\\ell )} n = \\log ({\\log ^{(\\ell -1)}} n)\\)</span>). The space of our data structure matches the current best upper bound of Tsur (Inf. Process. Lett., 2019), which does not support the queries efficiently. Also, we show that at least <span>\\(3.16n-\\Theta (\\log n)\\)</span> bits are necessary for answering all the queries. Our result is obtained by generalizing Gawrychowski and Nicholson’s <span>\\((3n - \\Theta (\\log n))\\)</span>-bit lower bound (ICALP, 15) for answering range minimum and maximum queries on a permutation of size <i>n</i>.</p></div>","PeriodicalId":50824,"journal":{"name":"Algorithmica","volume":"87 10","pages":"1369 - 1392"},"PeriodicalIF":0.7000,"publicationDate":"2025-05-31","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Algorithmica","FirstCategoryId":"94","ListUrlMain":"https://link.springer.com/article/10.1007/s00453-025-01325-9","RegionNum":4,"RegionCategory":"计算机科学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"Q4","JCRName":"COMPUTER SCIENCE, SOFTWARE ENGINEERING","Score":null,"Total":0}
引用次数: 0
Abstract
Given an array of size n from a total order, we consider the problem of constructing a data structure that supports various queries (range minimum/maximum queries with their variants and next/previous larger/smaller queries) efficiently. In the encoding model (i.e., the queries can be answered without the input array), we propose a \((3.701n + o(n))\)-bit data structure, which supports all these queries in \(O(\log ^{(\ell )}n)\) time, for any positive constant integer \(\ell \) (here, \(\log ^{(1)} n = \log n\), and for \(\ell > 1\), \(\log ^{(\ell )} n = \log ({\log ^{(\ell -1)}} n)\)). The space of our data structure matches the current best upper bound of Tsur (Inf. Process. Lett., 2019), which does not support the queries efficiently. Also, we show that at least \(3.16n-\Theta (\log n)\) bits are necessary for answering all the queries. Our result is obtained by generalizing Gawrychowski and Nicholson’s \((3n - \Theta (\log n))\)-bit lower bound (ICALP, 15) for answering range minimum and maximum queries on a permutation of size n.
期刊介绍:
Algorithmica is an international journal which publishes theoretical papers on algorithms that address problems arising in practical areas, and experimental papers of general appeal for practical importance or techniques. The development of algorithms is an integral part of computer science. The increasing complexity and scope of computer applications makes the design of efficient algorithms essential.
Algorithmica covers algorithms in applied areas such as: VLSI, distributed computing, parallel processing, automated design, robotics, graphics, data base design, software tools, as well as algorithms in fundamental areas such as sorting, searching, data structures, computational geometry, and linear programming.
In addition, the journal features two special sections: Application Experience, presenting findings obtained from applications of theoretical results to practical situations, and Problems, offering short papers presenting problems on selected topics of computer science.