Cache Oblivious Algorithms for the RMQ and the RMSQ Problems |
| |
Authors: | Masud Hasan Tanaeem M. Moosa M. Sohel Rahman |
| |
Affiliation: | 1.Department of Computer Science and Engineering,Bangladesh University of Engineering and Technology,Dhaka,Bangladesh;2.Algorithm Design group, Department of Computer Science,King’s College London,London,UK |
| |
Abstract: | In the Range Minimum/Maximum Query (RMQ) and Range Maximum-Sum Segment Query (RMSQ) problems, we are given an array which we can preprocess in order to answer subsequent queries. In the RMQ query, we are given a range on the array and we need to find the maximum/minimum element within that range. On the other hand, in RMSQ query, we need to return the segment within the given query range that gives the maximum sum. In this paper, we present cache oblivious optimal algorithms for both of the above problems. In particular, for both the problems, we have presented linear time data structures having optimal cache miss. The data structures can answer the corresponding queries in constant time with constant cache miss. |
| |
Keywords: | |
本文献已被 SpringerLink 等数据库收录! |
|