http://www.perlmonks.org?node_id=533237


in reply to Array Shuffle

I don't have a solution to this, but an interesting bit of mathematical trivia is that if you shuffle at random the odds that none of the elements ends up in the original space approaches 1/e as n -> infinity.

Replies are listed 'Best First'.
Re^2: Array Shuffle
by QM (Parson) on Feb 28, 2006 at 18:24 UTC
    So on average, for large n, 3 shuffles should suffice?

    -QM
    --
    Quantum Mechanics: The dreams stuff is made of