<s>
While	O
this	O
method	O
is	O
more	O
difficult	O
,	O
it	O
is	O
often	O
used	O
in	O
casinos	B-Application
because	O
it	O
minimizes	O
the	O
risk	O
of	O
exposing	O
cards	O
during	O
the	O
shuffle	O
.	O
</s>
<s>
The	O
cards	O
then	O
alternately	O
fall	O
into	O
each	O
other	O
,	O
much	O
like	O
a	O
zipper	B-Application
.	O
</s>
<s>
Casinos	B-Application
often	O
equip	O
their	O
tables	O
with	O
shuffling	O
machines	O
instead	O
of	O
having	O
croupiers	O
shuffle	O
the	O
cards	O
,	O
as	O
it	O
gives	O
the	O
casino	B-Application
a	O
few	O
advantages	O
,	O
including	O
an	O
increased	O
complexity	O
to	O
the	O
shuffle	O
and	O
therefore	O
an	O
increased	O
difficulty	O
for	O
players	O
to	O
make	O
predictions	O
,	O
even	O
if	O
they	O
are	O
collaborating	O
with	O
croupiers	O
.	O
</s>
<s>
Players	O
with	O
superstitions	O
often	O
regard	O
with	O
suspicion	O
any	O
electronic	O
equipment	O
,	O
so	O
casinos	B-Application
sometimes	O
still	O
have	O
the	O
croupiers	O
perform	O
the	O
shuffling	O
at	O
tables	O
that	O
typically	O
attract	O
those	O
crowds	O
(	O
e.g.	O
,	O
baccarat	O
tables	O
)	O
.	O
</s>
<s>
For	O
most	O
games	O
,	O
four	O
to	O
seven	O
riffle	O
shuffles	O
are	O
sufficient	O
:	O
for	O
unsuited	O
games	O
such	O
as	O
blackjack	B-Application
,	O
four	O
riffle	O
shuffles	O
are	O
sufficient	O
,	O
while	O
for	O
suited	O
games	O
,	O
seven	O
riffle	O
shuffles	O
are	O
necessary	O
.	O
</s>
<s>
But	O
in	O
club	O
play	O
,	O
good	O
bridge	O
players	O
take	O
advantage	O
of	O
non-randomness	O
after	O
four	O
shuffles	O
,	O
and	O
top	O
blackjack	B-Application
players	O
supposedly	O
track	O
aces	O
through	O
the	O
deck	O
;	O
this	O
is	O
known	O
as	O
"	O
ace	O
tracking	O
"	O
,	O
or	O
more	O
generally	O
,	O
as	O
"	O
shuffle	O
tracking	O
"	O
.	O
</s>
<s>
Diaconis	O
released	O
a	O
response	O
indicating	O
that	O
you	O
only	O
need	O
four	O
shuffles	O
for	O
un-suited	O
games	O
such	O
as	O
blackjack	B-Application
.	O
</s>
<s>
For	O
example	O
,	O
seven	O
shuffles	O
of	O
a	O
new	O
deck	O
leaves	O
an	O
81%	O
probability	O
of	O
winning	O
New	O
Age	O
Solitaire	B-Algorithm
where	O
the	O
probability	O
is	O
50%	O
with	O
a	O
uniform	O
random	O
deck	O
.	O
</s>
<s>
If	O
a	O
computer	O
has	O
access	O
to	O
purely	O
random	O
numbers	O
,	O
it	O
is	O
capable	O
of	O
generating	O
a	O
"	O
perfect	O
shuffle	O
"	O
,	O
a	O
random	B-Algorithm
permutation	I-Algorithm
of	O
the	O
cards	O
;	O
beware	O
that	O
this	O
terminology	O
(	O
an	O
algorithm	O
that	O
perfectly	O
randomizes	O
the	O
deck	O
)	O
differs	O
from	O
"	O
a	O
perfectly	O
executed	O
single	O
shuffle	O
"	O
,	O
notably	O
a	O
perfectly	O
interleaving	O
faro	O
shuffle	O
.	O
</s>
<s>
The	O
Fisher	B-Algorithm
–	I-Algorithm
Yates	I-Algorithm
shuffle	I-Algorithm
,	O
popularized	O
by	O
Donald	O
Knuth	O
,	O
is	O
simple	O
(	O
a	O
few	O
lines	O
of	O
code	O
)	O
and	O
efficient	O
(O(n )	O
on	O
an	O
n-card	O
deck	O
,	O
assuming	O
constant	O
time	O
for	O
fundamental	O
steps	O
)	O
algorithm	O
for	O
doing	O
this	O
.	O
</s>
<s>
Shuffling	O
can	O
be	O
seen	O
as	O
the	O
opposite	O
of	O
sorting	B-Algorithm
.	O
</s>
<s>
A	O
new	O
alternative	O
to	O
Fisher-Yates	B-Algorithm
,	O
which	O
does	O
not	O
use	O
any	O
array	O
memory	O
operations	O
,	O
is	O
the	O
use	O
a	O
Pseudo	O
Random	O
Index	O
Generator	O
(	O
PRIG	O
)	O
function	O
algorithm	O
.	O
</s>
<s>
This	O
will	O
generate	O
a	O
random	B-Algorithm
permutation	I-Algorithm
,	O
unless	O
any	O
of	O
the	O
random	O
numbers	O
generated	O
are	O
the	O
same	O
as	O
any	O
others	O
(	O
i.e.	O
</s>
<s>
If	O
using	O
efficient	O
sorting	B-Algorithm
such	O
as	O
mergesort	B-Algorithm
or	O
heapsort	B-Application
this	O
is	O
an	O
O(n log n )	O
average	O
and	O
worst-case	O
algorithm	O
.	O
</s>
<s>
For	O
this	O
reason	O
,	O
many	O
online	O
gambling	O
sites	O
provide	O
descriptions	O
of	O
their	O
shuffling	B-Algorithm
algorithms	I-Algorithm
and	O
the	O
sources	O
of	O
randomness	O
used	O
to	O
drive	O
these	O
algorithms	O
,	O
with	O
some	O
gambling	O
sites	O
also	O
providing	O
auditors	O
 '	O
reports	O
of	O
the	O
performance	O
of	O
their	O
systems	O
.	O
</s>
