<s>
A	O
randomized	B-General_Concept
algorithm	I-General_Concept
is	O
an	O
algorithm	O
that	O
employs	O
a	O
degree	O
of	O
randomness	O
as	O
part	O
of	O
its	O
logic	O
or	O
procedure	O
.	O
</s>
<s>
One	O
has	O
to	O
distinguish	O
between	O
algorithms	O
that	O
use	O
the	O
random	O
input	O
so	O
that	O
they	O
always	O
terminate	O
with	O
the	O
correct	O
answer	O
,	O
but	O
where	O
the	O
expected	O
running	O
time	O
is	O
finite	O
(	O
Las	O
Vegas	O
algorithms	O
,	O
for	O
example	O
Quicksort	B-Algorithm
)	O
,	O
and	O
algorithms	O
which	O
have	O
a	O
chance	O
of	O
producing	O
an	O
incorrect	O
result	O
(	O
Monte	O
Carlo	O
algorithms	O
,	O
for	O
example	O
the	O
Monte	O
Carlo	O
algorithm	O
for	O
the	O
MFAS	O
problem	O
)	O
or	O
fail	O
to	O
produce	O
a	O
result	O
either	O
by	O
signaling	O
a	O
failure	O
or	O
failing	O
to	O
terminate	O
.	O
</s>
<s>
In	O
some	O
cases	O
,	O
probabilistic	B-General_Concept
algorithms	I-General_Concept
are	O
the	O
only	O
practical	O
means	O
of	O
solving	O
a	O
problem	O
.	O
</s>
<s>
In	O
common	O
practice	O
,	O
randomized	B-General_Concept
algorithms	I-General_Concept
are	O
approximated	O
using	O
a	O
pseudorandom	B-Algorithm
number	I-Algorithm
generator	I-Algorithm
in	O
place	O
of	O
a	O
true	O
source	O
of	O
random	O
bits	O
;	O
such	O
an	O
implementation	O
may	O
deviate	O
from	O
the	O
expected	O
theoretical	O
behavior	O
and	O
mathematical	O
guarantees	O
which	O
may	O
depend	O
on	O
the	O
existence	O
of	O
an	O
ideal	O
true	O
random	O
number	O
generator	O
.	O
</s>
<s>
As	O
a	O
motivating	O
example	O
,	O
consider	O
the	O
problem	O
of	O
finding	O
an	O
‘	O
a’	O
in	O
an	O
array	B-Data_Structure
of	O
n	O
elements	O
.	O
</s>
<s>
Input	O
:	O
An	O
array	B-Data_Structure
of	O
n≥2	O
elements	O
,	O
in	O
which	O
half	O
are	O
‘	O
a	O
’s	O
and	O
the	O
other	O
half	O
are	O
‘	O
b	O
’s	O
.	O
</s>
<s>
Output	O
:	O
Find	O
an	O
‘	O
a’	O
in	O
the	O
array	B-Data_Structure
.	O
</s>
<s>
Randomized	B-General_Concept
algorithms	I-General_Concept
are	O
particularly	O
useful	O
when	O
faced	O
with	O
a	O
malicious	O
"	O
adversary	O
"	O
or	O
attacker	O
who	O
deliberately	O
tries	O
to	O
feed	O
a	O
bad	O
input	O
to	O
the	O
algorithm	O
(	O
see	O
worst-case	B-General_Concept
complexity	I-General_Concept
and	O
competitive	B-Algorithm
analysis	I-Algorithm
(	O
online	O
algorithm	O
)	O
)	O
such	O
as	O
in	O
the	O
Prisoner	O
's	O
dilemma	O
.	O
</s>
<s>
In	O
cryptographic	O
applications	O
,	O
pseudo-random	B-Error_Name
numbers	I-Error_Name
cannot	O
be	O
used	O
,	O
since	O
the	O
adversary	O
can	O
predict	O
them	O
,	O
making	O
the	O
algorithm	O
effectively	O
deterministic	O
.	O
</s>
<s>
Therefore	O
,	O
either	O
a	O
source	O
of	O
truly	O
random	O
numbers	O
or	O
a	O
cryptographically	B-Algorithm
secure	I-Algorithm
pseudo-random	I-Algorithm
number	I-Algorithm
generator	I-Algorithm
is	O
required	O
.	O
</s>
<s>
Another	O
area	O
in	O
which	O
randomness	O
is	O
inherent	O
is	O
quantum	B-Architecture
computing	I-Architecture
.	O
</s>
<s>
The	O
Monte	O
Carlo	O
algorithm	O
(	O
related	O
to	O
the	O
Monte	B-Algorithm
Carlo	I-Algorithm
method	I-Algorithm
for	O
simulation	O
)	O
is	O
guaranteed	O
to	O
complete	O
in	O
an	O
amount	O
of	O
time	O
that	O
can	O
be	O
bounded	O
by	O
a	O
function	O
the	O
input	O
size	O
and	O
its	O
parameter	O
k	O
,	O
but	O
allows	O
a	O
small	O
probability	O
of	O
error	O
.	O
</s>
<s>
Computational	B-General_Concept
complexity	I-General_Concept
theory	O
models	O
randomized	B-General_Concept
algorithms	I-General_Concept
as	O
probabilistic	O
Turing	B-Architecture
machines	I-Architecture
.	O
</s>
<s>
The	O
most	O
basic	O
randomized	B-General_Concept
complexity	I-General_Concept
class	O
is	O
RP	O
,	O
which	O
is	O
the	O
class	O
of	O
decision	O
problems	O
for	O
which	O
there	O
is	O
an	O
efficient	O
(	O
polynomial	O
time	O
)	O
randomized	B-General_Concept
algorithm	I-General_Concept
(	O
or	O
probabilistic	O
Turing	B-Architecture
machine	I-Architecture
)	O
which	O
recognizes	O
NO-instances	O
with	O
absolute	O
certainty	O
and	O
recognizes	O
YES-instances	O
with	O
a	O
probability	O
of	O
at	O
least	O
1/2	O
.	O
</s>
<s>
BPP	O
represents	O
the	O
class	O
of	O
efficient	O
randomized	B-General_Concept
algorithms	I-General_Concept
.	O
</s>
<s>
An	O
important	O
line	O
of	O
research	O
in	O
randomized	B-General_Concept
algorithms	I-General_Concept
in	O
number	O
theory	O
can	O
be	O
traced	O
back	O
to	O
Pocklington	O
's	O
algorithm	O
,	O
from	O
1917	O
,	O
which	O
finds	O
square	O
roots	O
modulo	O
prime	O
numbers	O
.	O
</s>
<s>
The	O
study	O
of	O
randomized	B-General_Concept
algorithms	I-General_Concept
in	O
number	O
theory	O
was	O
spurred	O
by	O
the	O
1977	O
discovery	O
of	O
a	O
randomized	O
primality	B-Algorithm
test	I-Algorithm
(	O
i.e.	O
,	O
determining	O
the	O
primality	B-Algorithm
of	O
a	O
number	O
)	O
by	O
Robert	O
M	O
.	O
Solovay	O
and	O
Volker	O
Strassen	O
.	O
</s>
<s>
Soon	O
afterwards	O
Michael	O
O	O
.	O
Rabin	O
demonstrated	O
that	O
the	O
1976	O
Miller	B-Algorithm
's	I-Algorithm
primality	I-Algorithm
test	I-Algorithm
can	O
be	O
turned	O
into	O
a	O
randomized	B-General_Concept
algorithm	I-General_Concept
.	O
</s>
<s>
At	O
that	O
time	O
,	O
no	O
practical	O
deterministic	B-General_Concept
algorithm	I-General_Concept
for	O
primality	B-Algorithm
was	O
known	O
.	O
</s>
<s>
Observe	O
that	O
this	O
implies	O
that	O
the	O
primality	B-Algorithm
problem	O
is	O
in	O
Co-RP	O
.	O
</s>
<s>
If	O
one	O
randomly	O
chooses	O
100	O
numbers	O
less	O
than	O
a	O
composite	O
number	O
n	O
,	O
then	O
the	O
probability	O
of	O
failing	O
to	O
find	O
such	O
a	O
"	O
witness	O
"	O
is	O
(	O
1/4	O
)	O
100	O
so	O
that	O
for	O
most	O
practical	O
purposes	O
,	O
this	O
is	O
a	O
good	O
primality	B-Algorithm
test	I-Algorithm
.	O
</s>
<s>
Indeed	O
,	O
even	O
though	O
a	O
deterministic	O
polynomial-time	O
primality	B-Algorithm
test	I-Algorithm
has	O
since	O
been	O
found	O
(	O
see	O
AKS	B-Algorithm
primality	I-Algorithm
test	I-Algorithm
)	O
,	O
it	O
has	O
not	O
replaced	O
the	O
older	O
probabilistic	O
tests	O
in	O
cryptographic	O
software	B-Application
nor	O
is	O
it	O
expected	O
to	O
do	O
so	O
for	O
the	O
foreseeable	O
future	O
.	O
</s>
<s>
Quicksort	B-Algorithm
is	O
a	O
familiar	O
,	O
commonly	O
used	O
algorithm	O
in	O
which	O
randomness	O
can	O
be	O
useful	O
.	O
</s>
<s>
Many	O
deterministic	O
versions	O
of	O
this	O
algorithm	O
require	O
O(n2 )	O
time	O
to	O
sort	O
n	O
numbers	O
for	O
some	O
well-defined	O
class	O
of	O
degenerate	O
inputs	O
(	O
such	O
as	O
an	O
already	O
sorted	O
array	B-Data_Structure
)	O
,	O
with	O
the	O
specific	O
class	O
of	O
inputs	O
that	O
generate	O
this	O
behavior	O
defined	O
by	O
the	O
protocol	O
for	O
pivot	O
selection	O
.	O
</s>
<s>
In	O
computational	O
geometry	O
,	O
a	O
standard	O
technique	O
to	O
build	O
a	O
structure	O
like	O
a	O
convex	O
hull	O
or	O
Delaunay	B-Algorithm
triangulation	I-Algorithm
is	O
to	O
randomly	O
permute	O
the	O
input	O
points	O
and	O
then	O
insert	O
them	O
one	O
by	O
one	O
into	O
the	O
existing	O
structure	O
.	O
</s>
<s>
Output	O
:	O
A	O
cut	B-Algorithm
partitioning	O
the	O
vertices	O
into	O
L	O
and	O
R	O
,	O
with	O
the	O
minimum	O
number	O
of	O
edges	O
between	O
L	O
and	O
R	O
.	O
</s>
<s>
output	O
the	O
minimum	O
cut	B-Algorithm
among	O
C1	O
,	O
C2	O
,	O
...	O
,	O
Cm	O
.	O
</s>
<s>
In	O
each	O
execution	O
of	O
the	O
outer	O
loop	O
,	O
the	O
algorithm	O
repeats	O
the	O
inner	O
loop	O
until	O
only	O
2	O
nodes	O
remain	O
,	O
the	O
corresponding	O
cut	B-Algorithm
is	O
obtained	O
.	O
</s>
<s>
After	O
m	O
times	O
executions	O
of	O
the	O
outer	O
loop	O
,	O
we	O
output	O
the	O
minimum	O
cut	B-Algorithm
among	O
all	O
the	O
results	O
.	O
</s>
<s>
After	O
execution	O
,	O
we	O
get	O
a	O
cut	B-Algorithm
of	O
size	O
3	O
.	O
</s>
<s>
Note	O
that	O
still	O
has	O
min	O
cut	B-Algorithm
of	O
size	O
k	O
,	O
so	O
by	O
Lemma	O
2	O
,	O
it	O
still	O
has	O
at	O
least	O
edges	O
.	O
</s>
<s>
The	O
algorithm	O
finds	O
the	O
min	O
cut	B-Algorithm
with	O
probability	O
,	O
in	O
time	O
.	O
</s>
<s>
For	O
instance	O
,	O
in	O
computational	B-General_Concept
complexity	I-General_Concept
,	O
it	O
is	O
unknown	O
whether	O
P	O
=	O
BPP	O
,	O
i.e.	O
,	O
we	O
do	O
not	O
know	O
whether	O
we	O
can	O
take	O
an	O
arbitrary	O
randomized	B-General_Concept
algorithm	I-General_Concept
that	O
runs	O
in	O
polynomial	O
time	O
with	O
a	O
small	O
error	O
probability	O
and	O
derandomize	O
it	O
to	O
run	O
in	O
polynomial	O
time	O
without	O
using	O
randomness	O
.	O
</s>
<s>
There	O
are	O
specific	O
methods	O
that	O
can	O
be	O
employed	O
to	O
derandomize	O
particular	O
randomized	B-General_Concept
algorithms	I-General_Concept
:	O
</s>
<s>
changing	O
the	O
randomized	B-General_Concept
algorithm	I-General_Concept
to	O
use	O
a	O
hash	B-Error_Name
function	I-Error_Name
as	O
a	O
source	O
of	O
randomness	O
for	O
the	O
algorithm	O
's	O
tasks	O
,	O
and	O
then	O
derandomizing	O
the	O
algorithm	O
by	O
brute-forcing	B-Algorithm
all	O
possible	O
parameters	O
(	O
seeds	O
)	O
of	O
the	O
hash	B-Error_Name
function	I-Error_Name
.	O
</s>
<s>
When	O
the	O
model	O
of	O
computation	O
is	O
restricted	O
to	O
Turing	B-Architecture
machines	I-Architecture
,	O
it	O
is	O
currently	O
an	O
open	O
question	O
whether	O
the	O
ability	O
to	O
make	O
random	O
choices	O
allows	O
some	O
problems	O
to	O
be	O
solved	O
in	O
polynomial	O
time	O
that	O
cannot	O
be	O
solved	O
in	O
polynomial	O
time	O
without	O
this	O
ability	O
;	O
this	O
is	O
the	O
question	O
of	O
whether	O
P	O
=	O
BPP	O
.	O
</s>
<s>
Based	O
on	O
the	O
initial	O
motivating	O
example	O
:	O
given	O
an	O
exponentially	O
long	O
string	O
of	O
2k	O
characters	O
,	O
half	O
a	O
's	O
and	O
half	O
b	O
's	O
,	O
a	O
random-access	B-Application
machine	I-Application
requires	O
2k−1	O
lookups	O
in	O
the	O
worst-case	O
to	O
find	O
the	O
index	O
of	O
an	O
a	O
;	O
if	O
it	O
is	O
permitted	O
to	O
make	O
random	O
choices	O
,	O
it	O
can	O
solve	O
this	O
problem	O
in	O
an	O
expected	O
polynomial	O
number	O
of	O
lookups	O
.	O
</s>
<s>
The	O
natural	O
way	O
of	O
carrying	O
out	O
a	O
numerical	O
computation	O
in	O
embedded	B-Architecture
systems	I-Architecture
or	O
cyber-physical	B-General_Concept
systems	I-General_Concept
is	O
to	O
provide	O
a	O
result	O
that	O
approximates	O
the	O
correct	O
one	O
with	O
high	O
probability	O
(	O
or	O
Probably	O
Approximately	O
Correct	O
Computation	O
(	O
PACC	O
)	O
)	O
.	O
</s>
<s>
The	O
volume	O
of	O
a	O
convex	O
body	O
can	O
be	O
estimated	O
by	O
a	O
randomized	B-General_Concept
algorithm	I-General_Concept
to	O
arbitrary	O
precision	O
in	O
polynomial	O
time	O
.	O
</s>
<s>
Bárány	O
and	O
Füredi	O
showed	O
that	O
no	O
deterministic	B-General_Concept
algorithm	I-General_Concept
can	O
do	O
the	O
same	O
.	O
</s>
<s>
More	O
specifically	O
,	O
a	O
limited	O
Turing	B-Architecture
machine	I-Architecture
can	O
be	O
simulated	O
with	O
arbitrarily	O
high	O
probability	O
of	O
running	O
correctly	O
for	O
all	O
time	O
,	O
only	O
if	O
a	O
random	O
chemical	O
reaction	O
network	O
is	O
used	O
.	O
</s>
<s>
With	O
a	O
simple	O
nondeterministic	O
chemical	O
reaction	O
network	O
(	O
any	O
possible	O
reaction	O
can	O
happen	O
next	O
)	O
,	O
the	O
computational	O
power	O
is	O
limited	O
to	O
primitive	B-Architecture
recursive	I-Architecture
functions	I-Architecture
.	O
</s>
