"Gordon Burditt" <(E-Mail Removed)> a écrit dans le message de

news:

http://www.velocityreviews.com/forums/(E-Mail Removed)...

> >Is there anybody still taking bubblesort seriously? Isn't it just a

>>teaching toy?

>

> It isn't that terrible if the number of items to sort is 3 or fewer.

>

>>No, I'm told that it predates selection sort and insertion

>>sort... But I still can't imagine how anybody could come up with something

>>like that having serious purposes.

>

> Bubblesort is a reasonable auxiliary sorting method to use with

> bogosort. Bogosort: You generate all possible orders of the data

> to be sorted, count how many entries are out of sequence for each

> order, then sort (using an auxiliary sorting method) the orders by

> number of entries that are out of sequence, and take the smallest

> one. The purpose of this is to change an algorithm that is n log

> n in CPU time and n in memory to n! log n! in CPU time and n*n! in

> memory. Bogosort is not used much outside of "cost plus" contracts.

>

> A first-level bogosort uses some other algorithm (e.g. bubblesort)

> as an auxiliary sorting method. An Nth-level (N > 1) bogosort uses a

> (N-1)th level bogosort as an auxiliary sorting method.
What a nice suggestion for our Fortune 500 coder

--

Chqrlie.