Re: That is not the algorithm I proposed

From: Douglas A. Gwyn (DAGwyn_at_null.net)
Date: 11/24/04


Date: Wed, 24 Nov 2004 06:57:41 -0500

Paul Tomkins wrote:
> dest[i]=source[C[i]];

Sorry, that just puts the issue of shuffling onto
the shoulders of whatever constructs the contents
of the array C. It is utterly uninteresting how
"cards" are moved around once the shuffling order
has been determined; a card can be entirely
represented by its index number, so the array C
itself already represents a shuffled deck of
cards. The important question is how to perform
a fair shuffle in the first place. In my
previous posting I assumed that context.



Relevant Pages

  • Re: A second beginners question
    ... I am working on shuffling my array. ... > basics of shuffling the array, ... > close CONTROL2; ... then in the very next line destroy @newgroup by closing the block. ...
    (perl.beginners)
  • Re: Randomly outputting an array
    ... That was a stupid question, ... there are lots of ways of shuffling an array that ... for shuffling an array and I realized why it's structured exactly the ... Algorithm P given by Professor Knuth in Seminumerical Algorithms, ...
    (comp.programming)
  • Re: Random numbers with no duplicates
    ... This is a similar requirement to shuffling a pack of cards. ... them using random numbers to index the array and swap contents. ... demon <dot> co uk ...
    (alt.comp.lang.learn.c-cpp)
  • Re: Random number again
    ... The "fill the array section" fills an array so that ... It basically randomly picks two items in the array and swaps them. ... With 12 numbers, doing 20 swaps should do a pretty good job shuffling, even if occasionally, the same slots got swapped. ... Dim raynumis just creating an array that can hold 12 different numbers. ...
    (microsoft.public.powerpoint)
  • Re: Q: Algorithm M vs. P of Knuths book
    ... > a PRNG) in some sense more random by shuffling it through ... > other hand, if one has an array filled with the numbers, ... > of the array elements with algorithm P and then output ... We might consider the entropy of an element's output position ...
    (sci.crypt)