Re: If I wanted to shuffle 8 decks of cards
[ QUOTE ]
And I decided to this shuffle by picking two random cards from the 8 decks ans swapping their position, how many iterations would I need to have a properly shuffled 8 decks of cards?
Is this a good method of shuffling for statistial analysis?
[/ QUOTE ]
Do it this way. Randomly swap the card in slot 1 with the card in a randomly chosen slot (possibly itself!). Then swap slot 2's card with a card randomly chosen from slot 2...n. Swap 3's into 3...n, etc. This takes n-1 iterations, and is guaranteed random (up to the limits of your rng).
alThor
|