On Thursday, July 26, 2001, at 02:08 , Abigail wrote:
> I believe that it produced the right results on the inputs you tested
> it with. But can you proof your trick will always sort the array?
Proof? No. Actually, given the list I used for input, only six
iterations of the for loop were required to sort.
> I doubt very much that this is a fair shuffle. See, for a fair shuffle
> each of the @list! possible permutations should have the same chance
> of resulting. And, under the assumption 'rand' is perfect', I don't see
> your shuffle doing that.
I don't believe it's a fair shuffle, either. For better or
worse, fairness and accuracy weren't part of my design goals. :-)
--
Craig S. Cottingham
[EMAIL PROTECTED]
PGP key available from:
<http://pgp.ai.mit.edu:11371/pks/lookup?op=get&search=0xA2FFBE41>
ID=0xA2FFBE41, fingerprint=6AA8 2E28 2404 8A95 B8FC 7EFC 136F
0CEF A2FF BE41