[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Random array (fwd)

Forwarded message:

> Date: Thu, 29 Oct 1998 20:04:57 -0800
> From: Jim Gillogly <[email protected]>
> Subject: Re: Random array

> One could modify Greg's suggestion slightly by attaching an auxiliary
> array of 256 random numbers to each of the members of the original
> array and then using the most efficient handy sort algorithm to sort
> those random numbers, dragging along their associated original array
> elements.  This way it doesn't have a chance to interfere with the
> operation of the sorting algorithm, at the cost of an extra array.

So you've got a set of arrays that have 256 numbers in them, whether they
are random or not is irrelevant since we're going to sort them and break
their randomness. It is merely sufficient that they all be reasonably (what
the hell ever that's going to mean) different, if they're all 6's for
example it isn't going to be very interesting.

If I understand the process. Each array would cycle through in parallel
sorting 2 elements of each array. Once that was finished we'd then sort the
arrays themselves according to some process. From your description it seems
to imply that you're going to sort the 1st element descending at that point.
This in effect mis-orders each array after every sort.

This sort of system is an IFS and could lead to determinism (ie a cycle of
sort patterns that repeat endlessly) or chaos (ie a pattern that doesn't
repeat). It in and of itself doesn't guarantee any randomness merely a
continously munged sort.

       To know what is right and not to do it is the worst cowardice.


       The Armadillo Group       ,::////;::-.          James Choate
       Austin, Tx               /:'///// ``::>/|/      [email protected]
       www.ssz.com            .',  ||||    `/( e\      512-451-7087
                           -====~~mm-'`-```-mm --'-