D
Dr John Stockton
JRS: In article <[email protected]>, seen in
I was explicitly referring to the Shuffle algorithm; immediately above
what you quoted I had written "(assuming, that is, a perfect Random
function)." which you evidently failed to appreciate; ISTM evident that
it must apply to the paragraph below.
The words "Please Give URL" appeared earlier in my previous article ...
news:comp.lang.javascript said:JRS: In article <[email protected]>, seen in
I, like many others here, am a dial-up off-line user; so, where known,news:comp.lang.javascript said:By reading the FAQ and following its "shuffling" reference, you could
have found
function Shuffle(Q) { var R, T, J
for (J=Q.length-1 ; J>0 ; J--)
{ R=Random(J+1) ; T=Q[J] ; Q[J]=Q[R] ; Q[R]=T }
return Q }
which is AFAICS the best possible Shuffle.
"Please Give URL". The algorithm in the sci.crypto FAQ seems to be
equivalent to the above, encoded in C.I certainly don't believe that.
"Thus, for example, if m = 2**32, certain permutations of 13 elements
will never occur, since 13! is approximately 1.45x2**32"
Knuth TAoCP, p. 146, vol. 2 third edition.
I was explicitly referring to the Shuffle algorithm; immediately above
what you quoted I had written "(assuming, that is, a perfect Random
function)." which you evidently failed to appreciate; ISTM evident that
it must apply to the paragraph below.
Which stand for?
The words "Please Give URL" appeared earlier in my previous article ...