Pavel Kankovsky <[EMAIL PROTECTED]> writes:
> On 2 Aug 2000, Frank D. Cringle wrote:
> 
> > Generating a random permutation algorithmically is not too easy.
> 
> Oh really?
> 
> [ swap each element with a randomly chosen partner ]

Yes, that will do it.  When I was originally working with this stuff
the context involved using "real" random bits and we needed to
conserve them.  In principle you only need log2(N!) bits, and then it
is hard.  I had forgotten the details.  I also made a typo in the
reference to Sedgewick's article.  It was 1977, not 1997.  Time flies
when you are having fun.

-- 
Frank Cringle,      [EMAIL PROTECTED]
voice: (+49 2304) 467101; fax: 943357

Reply via email to