Because then it's not a random shuffle? If you randomly shuffle something the order you currently have should be just as likely as any other
On 28 January 2013 12:29, shady <[email protected]> wrote: > Why do we use Fisher Yates > algorithm<http://en.wikipedia.org/wiki/Fisher%E2%80%93Yates_shuffle#The_modern_algorithm> > when > in the worst case there is no shuffle at all ? > we can modify it by generating random number not inclusive of the element > that we are about to swap.... > > -- > You received this message because you are subscribed to the Google Groups > "Algorithm Geeks" group. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit https://groups.google.com/groups/opt_out. > > > -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
