<s>
A	O
Gilbreath	B-Algorithm
shuffle	I-Algorithm
is	O
a	O
way	O
to	O
shuffle	B-Application
a	O
deck	O
of	O
cards	O
,	O
named	O
after	O
mathematician	O
Norman	O
Gilbreath	O
(	O
also	O
known	O
for	O
Gilbreath	O
's	O
conjecture	O
)	O
.	O
</s>
<s>
Gilbreath	O
's	O
principle	O
describes	O
the	O
properties	O
of	O
a	O
deck	O
that	O
are	O
preserved	O
by	O
this	O
type	O
of	O
shuffle	B-Application
,	O
and	O
a	O
Gilbreath	O
permutation	B-Algorithm
is	O
a	O
permutation	B-Algorithm
that	O
can	O
be	O
formed	O
by	O
a	O
Gilbreath	B-Algorithm
shuffle	I-Algorithm
.	O
</s>
<s>
A	O
Gilbreath	B-Algorithm
shuffle	I-Algorithm
consists	O
of	O
the	O
following	O
two	O
steps	O
:	O
</s>
<s>
Although	O
seemingly	O
highly	O
random	O
,	O
Gilbreath	B-Algorithm
shuffles	I-Algorithm
preserve	O
many	O
properties	O
of	O
the	O
initial	O
deck	O
.	O
</s>
<s>
For	O
instance	O
,	O
if	O
the	O
initial	O
deck	O
of	O
cards	O
alternates	O
between	O
black	O
and	O
red	O
cards	O
,	O
then	O
after	O
a	O
single	O
Gilbreath	B-Algorithm
shuffle	I-Algorithm
the	O
deck	O
will	O
still	O
have	O
the	O
property	O
that	O
,	O
if	O
it	O
is	O
grouped	O
into	O
consecutive	O
pairs	O
of	O
cards	O
,	O
each	O
pair	O
will	O
have	O
one	O
black	O
card	O
and	O
one	O
red	O
card	O
.	O
</s>
<s>
Similarly	O
,	O
if	O
a	O
Gilbreath	B-Algorithm
shuffle	I-Algorithm
is	O
used	O
on	O
a	O
deck	O
of	O
cards	O
where	O
every	O
card	O
has	O
the	O
same	O
suit	O
as	O
the	O
card	O
four	O
positions	O
prior	O
,	O
and	O
the	O
resulting	O
deck	O
is	O
grouped	O
into	O
consecutive	O
sets	O
of	O
four	O
cards	O
,	O
then	O
each	O
set	O
will	O
contain	O
one	O
card	O
of	O
each	O
suit	O
.	O
</s>
<s>
Mathematically	O
,	O
Gilbreath	B-Algorithm
shuffles	I-Algorithm
can	O
be	O
described	O
by	O
Gilbreath	O
permutations	B-Algorithm
,	O
permutations	B-Algorithm
of	O
the	O
numbers	O
from	O
1	O
to	O
n	O
that	O
can	O
be	O
obtained	O
by	O
a	O
Gilbreath	B-Algorithm
shuffle	I-Algorithm
with	O
a	O
deck	O
of	O
cards	O
labeled	O
with	O
these	O
numbers	O
in	O
order	O
.	O
</s>
<s>
Gilbreath	O
permutations	B-Algorithm
can	O
be	O
characterized	O
by	O
the	O
property	O
that	O
every	O
prefix	O
contains	O
a	O
consecutive	O
set	O
of	O
numbers	O
.	O
</s>
<s>
For	O
instance	O
,	O
the	O
permutation	B-Algorithm
(	O
5	O
,	O
6	O
,	O
4	O
,	O
7	O
,	O
8	O
,	O
3	O
,	O
2	O
,	O
9	O
,	O
1	O
,	O
10	O
)	O
is	O
a	O
Gilbreath	O
permutation	B-Algorithm
for	O
n	O
=	O
10	O
that	O
can	O
be	O
obtained	O
by	O
dealing	O
off	O
the	O
first	O
four	O
or	O
five	O
cards	O
and	O
riffling	O
them	O
with	O
the	O
rest	O
.	O
</s>
<s>
Equivalently	O
,	O
in	O
terms	O
of	O
permutation	B-Algorithm
patterns	I-Algorithm
,	O
the	O
Gilbreath	O
permutations	B-Algorithm
are	O
the	O
permutations	B-Algorithm
that	O
avoid	O
the	O
two	O
patterns	O
132	O
and	O
312	O
.	O
</s>
<s>
A	O
Gilbreath	B-Algorithm
shuffle	I-Algorithm
may	O
be	O
uniquely	O
determined	O
by	O
specifying	O
which	O
of	O
the	O
positions	O
in	O
the	O
resulting	O
shuffled	O
deck	O
are	O
occupied	O
by	O
cards	O
that	O
were	O
dealt	O
off	O
into	O
the	O
second	O
pile	O
,	O
and	O
which	O
positions	O
are	O
occupied	O
by	O
cards	O
that	O
were	O
not	O
dealt	O
off	O
.	O
</s>
<s>
Therefore	O
,	O
there	O
are	O
possible	O
ways	O
of	O
performing	O
a	O
Gilbreath	B-Algorithm
shuffle	I-Algorithm
on	O
a	O
deck	O
of	O
cards	O
.	O
</s>
<s>
However	O
,	O
each	O
Gilbreath	O
permutation	B-Algorithm
may	O
be	O
obtained	O
from	O
two	O
different	O
Gilbreath	B-Algorithm
shuffles	I-Algorithm
,	O
as	O
the	O
first	O
position	O
of	O
the	O
permutation	B-Algorithm
may	O
have	O
come	O
from	O
either	O
of	O
the	O
two	O
piles	O
.	O
</s>
<s>
Therefore	O
,	O
there	O
are	O
distinct	O
Gilbreath	O
permutations	B-Algorithm
.	O
</s>
<s>
The	O
cyclic	B-Algorithm
Gilbreath	O
permutations	B-Algorithm
of	O
order	O
are	O
in	O
one-to-one	O
correspondence	O
with	O
the	O
real	O
numbers	O
for	O
which	O
the	O
iteration	O
(	O
starting	O
from	O
)	O
underlying	O
the	B-Algorithm
Mandelbrot	I-Algorithm
set	I-Algorithm
is	O
periodic	O
with	O
period	O
.	O
</s>
<s>
In	O
this	O
correspondence	O
,	O
the	O
permutation	B-Algorithm
that	O
corresponds	O
to	O
a	O
given	O
value	O
describes	O
the	O
numerical	O
sorted	O
order	O
of	O
the	O
iterates	O
for	O
.	O
</s>
<s>
A	O
theorem	O
called	O
"	O
the	O
ultimate	O
Gilbreath	O
principle	O
"	O
states	O
that	O
,	O
for	O
a	O
permutation	B-Algorithm
of	O
,	O
the	O
following	O
four	O
properties	O
are	O
equivalent	O
:	O
</s>
<s>
is	O
a	O
Gilbreath	O
permutation	B-Algorithm
.	O
</s>
