Sorting algorithm - 5 items, 7 comparisons
Date: Around 1995
I need a sorting algorithm to sort 5 items using only 7 comparisons. I
remember seeing a similar problem somewhere in my undergraduate days, but
cannot find it in my notes.
Similar formulas exist for finding the roots of a quartic equation.
Derivations are similar and may be found in some handbooks of math tables
and formulas. It is well-known that such formulas cannot be found for
quintic or higher degree polynomials in general.
Click here to return to the Mathematics Archives
Update: June 2012