Re: Shuffle problem
- To: mathgroup at smc.vnet.net
- Subject: [mg84972] Re: [mg84960] Shuffle problem
- From: Andrzej Kozlowski <akoz at mimuw.edu.pl>
- Date: Mon, 21 Jan 2008 06:57:18 -0500 (EST)
- References: <200801210911.EAA09615@smc.vnet.net>
On 21 Jan 2008, at 09:11, angela wrote:
> Hi;
>
> Is there a way to get Mathematica 6.01 to randomly shuffle a list:
> Is there a built in command that I am blind to?
>
> For example:
>
> {t,t,t,h,h,h} would become something like {t,h,h,t,t,h}
>
> The lists are of arbitrary length. I wrote my own function but it is
> kind of slow.
>
> Thanks;
> Angela
>
RandomSample[{t, t, t, h, h, h}]
{t, h, h, h, t, t}
Andrzej Kozlowski
- References:
- Shuffle problem
- From: angela <mpopyft@lycos.com>
- Shuffle problem