Re: Randomly outputting an array



Arthur J. O'Dwyer said:


On Sun, 16 Jul 2006, Logan Shaw wrote:
Ico wrote:
Ico <usenet@xxxxxxx> wrote:

Is N times swapping two elements considered enough to truly 'randomize'
an array ?

That was a stupid question, please ignore me...

Actually, it's not a stupid question. It's a very good question.
The answer is definitely "no".

No, the answer is "it depends."

My knee-jerk reaction was also "no", but then I realized that Ico was
replying to Richard Heathfield's post, which is an obvious "yes"

<blush>

(or should be, if he didn't make any unnecessary mistakes).

Don't worry. All my mistakes are strictly necessary. (And I didn't make the
unnecessary mistake of which you are thinking.)

<snip>

--
Richard Heathfield
"Usenet is a strange place" - dmr 29/7/1999
http://www.cpax.org.uk
email: rjh at above domain (but drop the www, obviously)
.



Relevant Pages

  • 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)
  • Objects and Arrays...
    ... this is probably a stupid question. ... and when I try to join another array it doesn't ... only stores xpto2 ...
    (perl.beginners)
  • Re: random selection without replacement
    ... I am sorry this is a very stupid question. ... Therefore I change the array values after the first run. ... And yes,these routines are written by me. ... Prev by Date: ...
    (comp.lang.fortran)
  • Re: How many RAID arrays on a single controller?
    ... I feel it might be a stupid question, ... do all RAID controllers ... only handle a single array? ... you necessarily have to use TWO separate controllers (offering at least ...
    (comp.sys.ibm.pc.hardware.storage)
  • Re: Objects and Arrays...
    ... Pedro Miguel Freire Custódio wrote: ... > this is probably a stupid question. ... and when I try to join another array it doesn't ...
    (perl.beginners)