View Single Post
Old 04 January 2012, 18:14   #6
Thorham
Computer Nerd
 
Thorham's Avatar
 
Join Date: Sep 2007
Location: Rotterdam/Netherlands
Age: 47
Posts: 3,788
Quote:
Originally Posted by Ed Cruse View Post
Doesn't a shuffle algorithm still have to have some kind of random generator in it? The shuffle still has to be random and therefor can still have a bias.
The only source of bias in the Durstenfeld shuffling algorithm comes from not handling mod bias (I can give you an explanation of this). When this is taken care of, the algorithm itself is bias free, and the only source of bias comes from the RNG used, and is therefore external (because the RNG isn't part of the shuffling algorithm).

Another shuffling algorithm (a very bad one) picks two random numbers and swaps the entries in the list you're shuffling based on those two picks. This is a biased method. Even when your RNG is completely bias free, this shuffling algorithm's output will still be biased.
Thorham is offline  
 
Page generated in 0.04474 seconds with 11 queries