Question:
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.

Replies:
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.

NEWTON is an electronic community for Science, Math, and Computer Science K-12 Educators, sponsored and operated by Argonne National Laboratory's Educational Programs, Andrew Skipor, Ph.D., Head of Educational Programs.