Measures of Presortedness and Optimal Sorting Algorithms

  • Authors:
  • Heikki Mannila

  • Affiliations:
  • Department of Computer Science, University Of Helsinki, Helsinki, Finland.

  • Venue:
  • IEEE Transactions on Computers
  • Year:
  • 1985

Quantified Score

Hi-index 14.98

Visualization

Abstract

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. A new insertion sort algorithm 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.