From: Avi Bryant Date: 2001-05-08T14:25:16+09:00 Subject: [ruby-talk:14844] Re: How to do it the Ruby-way 3 On Tue, 8 May 2001 14:10:38 +0900 Mathieu Bouchard wrote: > I'm not really good at probabilities, but it seems to me that the latter > makes a perfectly fair shuffler (given a perfectly fair rand() function), > and that your "j = rand len" cannot make a perfectly fair shuffler, > because N**N is usually not divisible by factorial(N). It's nonetheless > possible that yours is very close to being a fair one; can you show me > that it is? You might want to look at the discussion here: http://c2.com/cgi/wiki?LinearShuffle