TIP: Click on subject to list as thread! ANSI
echo: c_echo
to: CAREY BLOODWORTH
from: GEORGE WHITE
date: 1998-04-26 18:02:00
subject: Bubble And Squeak Sortin

Hi Carey,
You wrote to me:
CB>GW>CB>Frankly, that change is so minor, I personally don't consider it to 
be
CB>GW>CB>new algorithm, just a minor refinement to an old one.  (That's why I 
p
CB>GW>CB>it in tiny little quotes.)  I don't think changes that minor are 
worth
CB>GW>CB>giving it a new name.
CB>GW>That's like saying that parsnips and carrots are the same because they
CB>GW>are both root vegetables with a similar shape grown from seed.
CB>More like saying different brands of beer are alike.  Once you get rid
CB>of the cans and fancy logos, they all taste alike, and anything more
CB>than an occasional sip is going to make you puke, and _nobody_ is going
CB>to mistake even the best can/bottle/mug of beer for a good wine or
CB>even a decent soft drink!
CB>When you are talking about dung, what difference does it make what
CB>animal it came from.  It's still going to smell the same.
Quite a lot, quanitity for one thing :-)
CB>GW>CB>Personally, I still consider it to be a bubble sort, it just reduces 
t
CB>GW>CB>number of exchanges to only 'size'.
CB>GW>But it is now a totally different family of sorts, a selection sort.
CB>GW>Even though the loop structure is the same...
CB>But it's performance is still O(N^2).
CB>And, no, it's not a new family.
We'll have agree to disagree here. I think it is, and I don't think I'll
convince you to change you view.
CB>A _NEW_ family means it's not a simple, incredibly minor modification to
CB>another family.  They may not be the exact same algorithm, but they are
CB>definitely related and in the same family.  When you can make a change
CB>that minor, it doesn't instantly become a new algorithm.
But straight insertion and straight selection sort have identical loop
structures, does that make them the same?

CB>What I've said, in the few messages I wrote, was that there is a lot
CB>more to picking a 'best' sort than just doing the O().
And I agree with you totally. Which is why I'm interested in sorting
for my commercial work and have code for most of the major sorts.
CB>Going solely by the 'Big Oh', the qsort would have then and _always_
CB>been a better choice.  But it wasn't true.
I've never considered the theoretical side as more than an indication of
the potential of a sort. qsort() will not always be the best choice, as
I've said elsewhere in this discussion. If the same data structure has
to be ordered on muntiple keys, qsort() can't be used because it does
not retain any pre-existing ordering. I'm still looking for something
better than insertion or selection sorts, hence my interest.
George
 * SLMR 2.1a * Wastebasket: Something to throw things near.
--- Maximus/2 3.01
---------------
* Origin: DoNoR/2,Woking UK (44-1483-717905) (2:440/4)

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.