comp.lang.ada
 help / color / mirror / Atom feed
From: NKSW39B@prodigy.com (Matthew Givens)
Subject: Re: Anyone help develop an algorythm?
Date: 1997/04/28
Date: 1997-04-28T00:00:00+00:00	[thread overview]
Message-ID: <5k14hk$37vc@newssvr01-int.news.prodigy.com> (raw)
In-Reply-To: 5jqds4$mfa@top.mitre.org


mfb@mbunix.mitre.org (Michael F Brenner) wrote:
>
>
>Slow sort is an interesting development, but might not satisfy the 
realtime
>criterion for certain non-genetic embedded systems. Taking the basic 
loop
>
>     loop
>         find two elements which are out of order
>         swap them
>     end loop

-- SNIP --

>     -- This sort takes time linear in the number of elements of your
>     -- array on any machine in which inputting, outputting, searching
>     -- for the next non-zero index, imaging, indexing arrays, and
>     -- reading and writing bits in bit arrays can be done in constant
>     -- time; the main exception to this will be searching for the next
>     -- non-zero index. The BESM-6 computer produced by Russia has a
>     -- hardware op-code to do this, however, it is only useful for
>     -- sorting arrays whose object values range from 0..7 with no 
repeats.

Hmmmm, not too many years ago I made my own contribution to the world of 
sorting algorythms with RandomSort.  It was simple, really.  Take the 
array elements, and assign them randomly to a second array.  Then scan 
the second array to see if it's sorted.  If not, scrap everything and do 
it again.  It's worse than the Slow Sort, because there's a chance 
(depending on the Psuedo-Random number generator being used and the seed 
value fed to it) that the list will NEVER be sorted.  It has happened to 
me (I think that almost 24 hours for a 25 element array kind of points to 
never, don't you?).

-
If at first you don't succeed, destroy all evidence that you ever tried. 
<< Iceman >>





  reply	other threads:[~1997-04-28  0:00 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-04-24  0:00 Anyone help develop an algorythm? Marin David Condic, 561.796.8997, M/S 731-93
1997-04-25  0:00 ` Michael F Brenner
1997-04-28  0:00   ` Matthew Givens [this message]
1997-04-28  0:00 ` Matthew Givens
  -- strict thread matches above, loose matches on Subject: below --
1997-04-20  0:00 Matthew Givens
1997-04-20  0:00 ` Robert A Duff
1997-04-22  0:00   ` Steve Doiel
1997-04-20  0:00 ` Joel VanLaven
1997-04-22  0:00   ` Robert Dewar
1997-04-20  0:00 ` Robert Dewar
1997-04-23  0:00   ` Matthew Givens
1997-04-23  0:00     ` Robert Dewar
1997-04-20  0:00 ` Tucker Taft
1997-04-20  0:00 ` Tom Moran
1997-04-22  0:00   ` Michael F Brenner
     [not found] ` <e8yijs.fg1.0.-s@inmet.camb.inmet.com>
1997-04-23  0:00   ` Matthew Givens
1997-04-23  0:00     ` Tucker Taft
1997-04-23  0:00     ` Robert Dewar
1997-04-28  0:00       ` Matthew Givens
     [not found] ` <335af137.54d7@bix.com>
1997-04-28  0:00   ` Matthew Givens
1997-04-28  0:00     ` Robert Dewar
1997-04-29  0:00       ` Matthew Givens
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox