Question: Bad shuffling. Suppose that you choose a random integer between 0 and n-1 in our shuffling code instead of one between i and n-1. Show
Bad shuffling. Suppose that you choose a random integer between 0 and n-1 in our shuffling code instead of one between i and n-1. Show that the resulting order is not equally likely to be one of the n! possibilities. Run the test of the previous exercise for this version.
Step by Step Solution
3.40 Rating (150 Votes )
There are 3 Steps involved in it
Certainly lets delve into this concept A correct implementation of the FisherYates or Knuth shuffle ... View full answer
Get step-by-step solutions from verified subject matter experts
