Chapter

Algorithms – ESA 2005

Volume 3669 of the series Lecture Notes in Computer Science pp 305-316

Cache-Oblivious Comparison-Based Algorithms on Multisets

  • Arash FarzanAffiliated withSchool of Computer Science, University of Waterloo
  • , Paolo FerraginaAffiliated withDepartment of Computer Science, University of Pisa
  • , Gianni FranceschiniAffiliated withDepartment of Computer Science, University of Pisa
  • , J. Ian MunroAffiliated withSchool of Computer Science, University of Waterloo

* Final gross prices may vary according to local VAT.

Get Access

Abstract

We study three comparison-based problems related to multisets in the cache-oblivious model: Duplicate elimination, multisorting and finding the most frequent element (the mode). We are interested in minimizing the cache complexity (or number of cache misses) of algorithms for these problems in the context under which cache size and block size are unknown. We give algorithms with cache complexities within a constant factor of the optimal for all the problems. In the case of determining the mode, the optimal algorithm is randomized as the deterministic algorithm differs from the lower bound by a sublogarithmic factor. We can achieve optimality either with a randomized method or if given, along with the input, lg lg of relative frequency of the mode with a constant additive error.