Optimal selection and sorting via dynamic programming

  • Authors:
  • Micha Hofri

  • Affiliations:
  • Worcester Polytechnic Institute, Worcester, MA

  • Venue:
  • Journal of Experimental Algorithmics (JEA)
  • Year:
  • 2013

Quantified Score

Hi-index 0.00

Visualization

Abstract

We show how to find optimal algorithms for the selection of one or more order statistics over a small set of numbers, and as an extreme case, complete sorting. The criterion is using the smallest number of comparisons; separate derivations are performed for minimization on the average (over all permutations) or in the worst case. When the computational process establishes the optimal values, it also generates C-language functions that implement policies which achieve those optimal values. The search for the algorithms is driven by a Markov decision process, and the program provides the optimality proof as well.