Re: shuffling a deck of cards
- To: mathgroup at smc.vnet.net
- Subject: [mg31802] Re: shuffling a deck of cards
- From: atelesforos at hotmail.com (Orestis Vantzos)
- Date: Sun, 2 Dec 2001 04:25:40 -0500 (EST)
- References: <9ua3bv$17h$1@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
singleShuffle[list_] := Sort[list, Function[If[Random[] > .5, True, False]]] This function will "shuffle" any list using Sort. You probably ought to nest it a couple of times to get better results. As in betterShuffle[list_,n_:5]:=Nest[singleShuffle,list,n] Orestis