<s>
A	O
hybrid	B-Application
algorithm	I-Application
is	O
an	O
algorithm	O
that	O
combines	O
two	O
or	O
more	O
other	O
algorithms	O
that	O
solve	O
the	O
same	O
problem	O
,	O
either	O
choosing	O
one	O
based	O
on	O
some	O
characteristic	O
of	O
the	O
data	O
,	O
or	O
switching	O
between	O
them	O
over	O
the	O
course	O
of	O
the	O
algorithm	O
.	O
</s>
<s>
"	O
Hybrid	B-Application
algorithm	I-Application
"	O
does	O
not	O
refer	O
to	O
simply	O
combining	O
multiple	O
algorithms	O
to	O
solve	O
a	O
different	O
problem	O
–	O
many	O
algorithms	O
can	O
be	O
considered	O
as	O
combinations	O
of	O
simpler	O
pieces	O
–	O
but	O
only	O
to	O
combining	O
algorithms	O
that	O
solve	O
the	O
same	O
problem	O
,	O
but	O
differ	O
in	O
other	O
characteristics	O
,	O
notably	O
performance	O
.	O
</s>
<s>
divide-and-conquer	B-Algorithm
or	O
decrease-and-conquer	B-Algorithm
algorithms	O
,	O
where	O
the	O
size	O
of	O
the	O
data	O
decreases	O
as	O
one	O
moves	O
deeper	O
in	O
the	O
recursion	O
.	O
</s>
<s>
A	O
common	O
example	O
is	O
in	O
sorting	B-Algorithm
algorithms	I-Algorithm
,	O
where	O
the	O
insertion	O
sort	O
,	O
which	O
is	O
inefficient	O
on	O
large	O
data	O
,	O
but	O
very	O
efficient	O
on	O
small	O
data	O
(	O
say	O
,	O
five	O
to	O
ten	O
elements	O
)	O
,	O
is	O
used	O
as	O
the	O
final	O
step	O
,	O
after	O
primarily	O
applying	O
another	O
algorithm	O
,	O
such	O
as	O
merge	B-Algorithm
sort	I-Algorithm
or	O
quicksort	B-Algorithm
.	O
</s>
<s>
Merge	B-Algorithm
sort	I-Algorithm
and	O
quicksort	B-Algorithm
are	O
asymptotically	O
optimal	O
on	O
large	O
data	O
,	O
but	O
the	O
overhead	O
becomes	O
significant	O
if	O
applying	O
them	O
to	O
small	O
data	O
,	O
hence	O
the	O
use	O
of	O
a	O
different	O
algorithm	O
at	O
the	O
end	O
of	O
the	O
recursion	O
.	O
</s>
<s>
A	O
highly	O
optimized	O
hybrid	O
sorting	B-Algorithm
algorithm	I-Algorithm
is	O
Timsort	B-Algorithm
,	O
which	O
combines	O
merge	B-Algorithm
sort	I-Algorithm
,	O
insertion	O
sort	O
,	O
together	O
with	O
additional	O
logic	O
(	O
including	O
binary	O
search	O
)	O
in	O
the	O
merging	O
logic	O
.	O
</s>
<s>
A	O
general	O
procedure	O
for	O
a	O
simple	O
hybrid	O
recursive	O
algorithm	O
is	O
short-circuiting	O
the	O
base	O
case	O
,	O
also	O
known	O
as	O
arm's-length	B-Algorithm
recursion	I-Algorithm
.	O
</s>
<s>
Another	O
example	O
of	O
hybrid	B-Application
algorithms	I-Application
for	O
performance	O
reasons	O
are	O
introsort	O
and	O
introselect	B-Algorithm
,	O
which	O
combine	O
one	O
algorithm	O
for	O
fast	O
average	O
performance	O
,	O
falling	O
back	O
on	O
another	O
algorithm	O
to	O
ensure	O
(	O
asymptotically	O
)	O
optimal	O
worst-case	O
performance	O
.	O
</s>
<s>
Introsort	O
begins	O
with	O
a	O
quicksort	B-Algorithm
,	O
but	O
switches	O
to	O
a	O
heap	B-Application
sort	I-Application
if	O
quicksort	B-Algorithm
is	O
not	O
progressing	O
well	O
;	O
analogously	O
introselect	B-Algorithm
begins	O
with	O
quickselect	B-Algorithm
,	O
but	O
switches	O
to	O
median	B-Algorithm
of	I-Algorithm
medians	I-Algorithm
if	O
quickselect	B-Algorithm
is	O
not	O
progressing	O
well	O
.	O
</s>
<s>
Centralized	O
distributed	B-Operating_System
algorithms	I-Operating_System
can	O
often	O
be	O
considered	O
as	O
hybrid	B-Application
algorithms	I-Application
,	O
consisting	O
of	O
an	O
individual	O
algorithm	O
(	O
run	O
on	O
each	O
distributed	O
processor	O
)	O
,	O
and	O
a	O
combining	O
algorithm	O
(	O
run	O
on	O
a	O
centralized	O
distributor	O
)	O
–	O
these	O
correspond	O
respectively	O
to	O
running	O
the	O
entire	O
algorithm	O
on	O
one	O
processor	O
,	O
or	O
running	O
the	O
entire	O
computation	O
on	O
the	O
distributor	O
,	O
combining	O
trivial	O
results	O
(	O
a	O
one-element	O
data	O
set	O
from	O
each	O
processor	O
)	O
.	O
</s>
<s>
A	O
basic	O
example	O
of	O
these	O
algorithms	O
are	O
distribution	O
sorts	O
,	O
particularly	O
used	O
for	O
external	B-Algorithm
sorting	I-Algorithm
,	O
which	O
divide	O
the	O
data	O
into	O
separate	O
subsets	O
,	O
sort	O
the	O
subsets	O
,	O
and	O
then	O
combine	O
the	O
subsets	O
into	O
totally	O
sorted	O
data	O
;	O
examples	O
include	O
bucket	B-Algorithm
sort	I-Algorithm
and	O
flashsort	B-Algorithm
.	O
</s>
<s>
However	O
,	O
in	O
general	O
distributed	B-Operating_System
algorithms	I-Operating_System
need	O
not	O
be	O
hybrid	B-Application
algorithms	I-Application
,	O
as	O
individual	O
algorithms	O
or	O
combining	O
or	O
communication	O
algorithms	O
may	O
be	O
solving	O
different	O
problems	O
.	O
</s>
<s>
For	O
example	O
,	O
in	O
models	O
such	O
as	O
MapReduce	B-Operating_System
,	O
the	O
Map	O
and	O
Reduce	O
step	O
solve	O
different	O
problems	O
,	O
and	O
are	O
combined	O
to	O
solve	O
a	O
different	O
,	O
third	O
problem	O
.	O
</s>
