Anale: Seria Informatică (Dec 2009)

How many interchanges does the selection sort make for iid geometric(p) input?

  • SAHANI Debasish,
  • CHAKRABORTY Soubhik

Journal volume & issue
Vol. VII, no. 2
pp. 67 – 76

Abstract

Read online

The note derives an expression for the number of interchanges made by selection sort when the sorting elements are iid variates from geometric distribution. Empirical results reveal we can work with a simpler model compared to what is suggestive in theory. The morale is that statistical analysis of an algorithm’s complexity has something to offer in its own right and should be therefore ventured not with a predetermined mindset to verify what we already know in theory. Herein also lies the concept of an empirical O, a novel although subjective bound estimate over a finite input range obtained by running computer experiments. For an arbitrary algorithm, where theoretical results could be tedious, this could be of greater use.

Keywords