<s>
In	O
computer	B-General_Concept
science	I-General_Concept
,	O
brute-force	B-Algorithm
search	I-Algorithm
or	O
exhaustive	B-Algorithm
search	I-Algorithm
,	O
also	O
known	O
as	O
generate	O
and	O
test	O
,	O
is	O
a	O
very	O
general	O
problem-solving	O
technique	O
and	O
algorithmic	B-Algorithm
paradigm	I-Algorithm
that	O
consists	O
of	O
systematically	O
enumerating	O
all	O
possible	O
candidates	O
for	O
the	O
solution	O
and	O
checking	O
whether	O
each	O
candidate	O
satisfies	O
the	O
problem	O
's	O
statement	O
.	O
</s>
<s>
While	O
a	O
brute-force	B-Algorithm
search	I-Algorithm
is	O
simple	O
to	O
implement	O
and	O
will	O
always	O
find	O
a	O
solution	O
if	O
it	O
exists	O
,	O
implementation	O
costs	O
are	O
proportional	O
to	O
the	O
number	O
of	O
candidate	O
solutionswhich	O
in	O
many	O
practical	O
problems	O
tends	O
to	O
grow	O
very	O
quickly	O
as	O
the	O
size	O
of	O
the	O
problem	O
increases	O
( §Combinatorial	O
explosion	O
)	O
.	O
</s>
<s>
Therefore	O
,	O
brute-force	B-Algorithm
search	I-Algorithm
is	O
typically	O
used	O
when	O
the	O
problem	O
size	O
is	O
limited	O
,	O
or	O
when	O
there	O
are	O
problem-specific	O
heuristics	B-Algorithm
that	O
can	O
be	O
used	O
to	O
reduce	O
the	O
set	O
of	O
candidate	O
solutions	O
to	O
a	O
manageable	O
size	O
.	O
</s>
<s>
This	O
is	O
the	O
case	O
,	O
for	O
example	O
,	O
in	O
critical	O
applications	O
where	O
any	O
errors	O
in	O
the	O
algorithm	O
would	O
have	O
very	O
serious	O
consequences	O
or	O
when	O
using	B-Application
a	I-Application
computer	I-Application
to	I-Application
prove	I-Application
a	I-Application
mathematical	I-Application
theorem	I-Application
.	O
</s>
<s>
Brute-force	B-Algorithm
search	I-Algorithm
is	O
also	O
useful	O
as	O
a	O
baseline	O
method	O
when	O
benchmarking	O
other	O
algorithms	O
or	O
metaheuristics	B-Algorithm
.	O
</s>
<s>
Indeed	O
,	O
brute-force	B-Algorithm
search	I-Algorithm
can	O
be	O
viewed	O
as	O
the	O
simplest	O
metaheuristic	B-Algorithm
.	O
</s>
<s>
Brute	B-Algorithm
force	I-Algorithm
search	I-Algorithm
should	O
not	O
be	O
confused	O
with	O
backtracking	B-Algorithm
,	O
where	O
large	O
sets	O
of	O
solutions	O
can	O
be	O
discarded	O
without	O
being	O
explicitly	O
enumerated	O
(	O
as	O
in	O
the	O
textbook	O
computer	O
solution	O
to	O
the	O
eight	O
queens	O
problem	O
above	O
)	O
.	O
</s>
<s>
The	O
brute-force	O
method	O
for	O
finding	O
an	O
item	O
in	O
a	O
tablenamely	O
,	O
check	O
all	O
entries	O
of	O
the	O
latter	O
,	O
sequentiallyis	O
called	O
linear	B-Algorithm
search	I-Algorithm
.	O
</s>
<s>
)	O
The	O
brute-force	B-Algorithm
search	I-Algorithm
algorithm	O
above	O
will	O
call	O
output	O
for	O
every	O
candidate	O
that	O
is	O
a	O
solution	O
to	O
the	O
given	O
instance	O
P	O
.	O
The	O
algorithm	O
is	O
easily	O
modified	O
to	O
stop	O
after	O
finding	O
the	O
first	O
solution	O
,	O
or	O
a	O
specified	O
number	O
of	O
solutions	O
;	O
or	O
after	O
testing	O
a	O
specified	O
number	O
of	O
candidates	O
,	O
or	O
after	O
spending	O
a	O
given	O
amount	O
of	O
CPU	B-General_Concept
time	O
.	O
</s>
<s>
For	O
instance	O
,	O
if	O
we	O
look	O
for	O
the	O
divisors	O
of	O
a	O
number	O
as	O
described	O
above	O
,	O
the	O
number	O
of	O
candidates	O
tested	O
will	O
be	O
the	O
given	O
number	O
n	O
.	O
So	O
if	O
n	O
has	O
sixteen	O
decimal	O
digits	O
,	O
say	O
,	O
the	O
search	O
will	O
require	O
executing	O
at	O
least	O
1015	O
computer	O
instructions	O
,	O
which	O
will	O
take	O
several	O
days	O
on	O
a	O
typical	O
PC	B-Device
.	O
</s>
<s>
=	O
3,628,800	O
candidates	O
to	O
consider	O
,	O
which	O
a	O
typical	O
PC	B-Device
can	O
generate	O
and	O
test	O
in	O
less	O
than	O
one	O
second	O
.	O
</s>
<s>
This	O
unwelcome	O
phenomenon	O
is	O
commonly	O
called	O
the	O
combinatorial	O
explosion	O
,	O
or	O
the	O
curse	B-Algorithm
of	I-Algorithm
dimensionality	I-Algorithm
.	O
</s>
<s>
One	O
example	O
of	O
a	O
case	O
where	O
combinatorial	O
complexity	O
leads	O
to	O
solvability	O
limit	O
is	O
in	O
solving	O
chess	B-Application
.	O
</s>
<s>
Chess	B-Application
is	O
not	O
a	O
solved	O
game	O
.	O
</s>
<s>
In	O
2005	O
,	O
all	O
chess	B-Application
game	O
endings	O
with	O
six	O
pieces	O
or	O
less	O
were	O
solved	O
,	O
showing	O
the	O
result	O
of	O
each	O
position	O
if	O
played	O
perfectly	O
.	O
</s>
<s>
It	O
took	O
ten	O
more	O
years	O
to	O
complete	O
the	O
tablebase	O
with	O
one	O
more	O
chess	B-Application
piece	O
added	O
,	O
thus	O
completing	O
a	O
7-piece	O
tablebase	O
.	O
</s>
<s>
Adding	O
one	O
more	O
piece	O
to	O
a	O
chess	B-Application
ending	O
(	O
thus	O
making	O
an	O
8-piece	O
tablebase	O
)	O
is	O
considered	O
intractable	O
due	O
to	O
the	O
added	O
combinatorial	O
complexity	O
.	O
</s>
<s>
One	O
way	O
to	O
speed	O
up	O
a	O
brute-force	O
algorithm	O
is	O
to	O
reduce	O
the	O
search	O
space	O
,	O
that	O
is	O
,	O
the	O
set	O
of	O
candidate	O
solutions	O
,	O
by	O
using	O
heuristics	B-Algorithm
specific	O
to	O
the	O
problem	O
class	O
.	O
</s>
<s>
In	O
applications	O
that	O
require	O
only	O
one	O
solution	O
,	O
rather	O
than	O
all	O
solutions	O
,	O
the	O
expected	O
running	O
time	O
of	O
a	O
brute	B-Algorithm
force	I-Algorithm
search	I-Algorithm
will	O
often	O
depend	O
on	O
the	O
order	O
in	O
which	O
the	O
candidates	O
are	O
tested	O
.	O
</s>
<s>
There	O
are	O
many	O
other	O
search	O
methods	O
,	O
or	O
metaheuristics	B-Algorithm
,	O
which	O
are	O
designed	O
to	O
take	O
advantage	O
of	O
various	O
kinds	O
of	O
partial	O
knowledge	O
one	O
may	O
have	O
about	O
the	O
solution	O
.	O
</s>
<s>
Heuristics	B-Algorithm
can	O
also	O
be	O
used	O
to	O
make	O
an	O
early	O
cutoff	O
of	O
parts	O
of	O
the	O
search	O
.	O
</s>
<s>
One	O
example	O
of	O
this	O
is	O
the	O
minimax	B-Algorithm
principle	I-Algorithm
for	O
searching	O
game	O
trees	O
,	O
that	O
eliminates	O
many	O
subtrees	O
at	O
an	O
early	O
stage	O
in	O
the	O
search	O
.	O
</s>
<s>
In	O
certain	O
fields	O
,	O
such	O
as	O
language	O
parsing	O
,	O
techniques	O
such	O
as	O
chart	B-Application
parsing	I-Application
can	O
exploit	O
constraints	O
in	O
the	O
problem	O
to	O
reduce	O
an	O
exponential	O
complexity	O
problem	O
into	O
a	O
polynomial	O
complexity	O
problem	O
.	O
</s>
<s>
In	O
many	O
cases	O
,	O
such	O
as	O
in	O
Constraint	B-Application
Satisfaction	I-Application
Problems	I-Application
,	O
one	O
can	O
dramatically	O
reduce	O
the	O
search	O
space	O
by	O
means	O
of	O
Constraint	B-Application
propagation	I-Application
,	O
that	O
is	O
efficiently	O
implemented	O
in	O
Constraint	B-Application
programming	I-Application
languages	O
.	O
</s>
<s>
For	O
example	O
,	O
in	O
computer	B-Application
chess	I-Application
,	O
rather	O
than	O
computing	O
the	O
full	O
minimax	B-Algorithm
tree	O
of	O
all	O
possible	O
moves	O
for	O
the	O
remainder	O
of	O
the	O
game	O
,	O
a	O
more	O
limited	O
tree	O
of	O
minimax	B-Algorithm
possibilities	O
is	O
computed	O
,	O
with	O
the	O
tree	O
being	O
pruned	O
at	O
a	O
certain	O
number	O
of	O
moves	O
,	O
and	O
the	O
remainder	O
of	O
the	O
tree	O
being	O
approximated	O
by	O
a	O
static	B-General_Concept
evaluation	I-General_Concept
function	I-General_Concept
.	O
</s>
<s>
This	O
strategy	O
can	O
in	O
theory	O
be	O
used	O
against	O
any	O
encrypted	O
data	O
(	O
except	O
a	O
one-time	B-Algorithm
pad	I-Algorithm
)	O
by	O
an	O
attacker	O
who	O
is	O
unable	O
to	O
take	O
advantage	O
of	O
any	O
weakness	O
in	O
an	O
encryption	O
system	O
that	O
would	O
otherwise	O
make	O
his	O
or	O
her	O
task	O
easier	O
.	O
</s>
