Efficient Algorithms

Volume 5760 of the series Lecture Notes in Computer Science pp 249-260

Finding Nearest Larger Neighbors

A Case Study in Algorithm Design and Analysis
  • Tetsuo AsanoAffiliated withSchool of Information Science, JAIST
  • , Sergey BeregAffiliated withDepartment of Computer Science, University of Texas at Dallas
  • , David KirkpatrickAffiliated withDepartment of Computer Science, University of British Columbia

* Final gross prices may vary according to local VAT.

Get Access


Designing and analysing efficient algorithms is important in practical applications, but it is also fun and frequently instructive, even for simple problems with no immediate applications. In this self-contained paper we try to convey some of fun of algorithm design and analysis. Hopefully, the reader will find the discussion instructive as well.

We focus our attention on a single problem that we call the All Nearest Larger Neighbors Problem. Part of the fun in designing algorithms for this problem is the rich variety of algorithms that arise under slightly different optimization criteria. We also illustrate several important analytic techniques, including amortization, and correctness arguments using non-trivial loop invariants.

We hope, in this modest way, to reflect our deep admiration for the many contributions of Kurt Mehlhorn to the theory, practice and appreciation of algorithm design and analysis.