home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / rec / games / programm / 4736 < prev    next >
Encoding:
Internet Message Format  |  1992-11-18  |  1.8 KB

  1. Path: sparky!uunet!charon.amdahl.com!pacbell.com!sgiblab!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!linac!att!ucbvax!ucdavis!hamlet.ucdavis.edu!f110019
  2. From: f110019@hamlet.ucdavis.edu (Julian Burger)
  3. Newsgroups: rec.games.programmer
  4. Subject: Re: Advice needed for fastest sort algorthm
  5. Message-ID: <19387@ucdavis.ucdavis.edu>
  6. Date: 18 Nov 92 21:46:29 GMT
  7. References: <1992Nov11.043526.26732@netcom.com> <1992Nov11.161052.5552@panther.mot.com> <1992Nov12.154308.4827@cbnews.cb.att.com>
  8. Sender: usenet@ucdavis.ucdavis.edu
  9. Organization: Computing Services, UC Davis
  10. Lines: 26
  11.  
  12. In article <1992Nov12.154308.4827@cbnews.cb.att.com> nak@cbnews.cb.att.com (neil.a.kirby) writes:
  13. >In article <1992Nov11.161052.5552@panther.mot.com> asu@panther4.panther.mot.com (Russ Trotter) writes:
  14. >>I hate to jump on this seemingly runaway train but.... 
  15. >>
  16. >>In one of my classes, I remember the teacher saying that it
  17. >>had been proven that O(n log n) was the best one could do
  18. >>for _comparison_ based sorting...  Is this a more correct assertion?
  19. _single key comparison_...
  20.  
  21. [... lots of stuff on sorting condensed into the following character: % ...]
  22.  
  23. >*THE* thing to remeber in all of this is that order notation is applicable
  24. >only as n rises.  Bubble sort has a very low overhead, it works well on
  25. >semi-sorted data, and most programmers can write it correctly.  That third
  26. >point should not be ignored.  Classical quicksort has to be modified to
  27. >keep from choking (O n*n )on sorted data.
  28.  
  29. The *OTHER* thing to remember is that the order O(xxx) of the algorithm 
  30. represents the number of OPERATIONS required to do the sorting.  The
  31. operations for each algorithm are not necessarily the same.  For instance, a
  32. single key comparison is a simple inequality test, but for a radix sort you
  33. need to isolate each digit of the radix and work with that.
  34.  
  35. >Neil Kirby
  36.  
  37. JB @ UCD
  38.