Automata, Languages and Programming

Volume 172 of the series Lecture Notes in Computer Science pp 324-336


Measures of presortedness and optimal sorting algorithms

Extended abstract
  • Heikki MannilaAffiliated withDepartment of Computer Science, University of Helsinki

* Final gross prices may vary according to local VAT.

Get Access


The concept of presortedness and its use in sorting are studied. Natural ways to measure presortedness are given and some general properties necessary for a measure are proposed. A concept of a sorting algorithm optimal with respect to a measure of presortedness is defined, and examples of such algorithms are given. An insertion sort is shown to be optimal with respect to three natural measures. The problem of finding an optimal algorithm for an arbitrary measure is studied and partial results are proven.