<s>
The	O
package-merge	B-Algorithm
algorithm	I-Algorithm
is	O
an	O
O(nL )	O
-time	O
algorithm	O
for	O
finding	O
an	O
optimal	O
length-limited	O
Huffman	B-General_Concept
code	I-General_Concept
for	O
a	O
given	O
distribution	O
on	O
a	O
given	O
alphabet	O
of	O
size	O
n	O
,	O
where	O
no	O
code	O
word	O
is	O
longer	O
than	O
L	O
.	O
It	O
is	O
a	O
greedy	B-Algorithm
algorithm	I-Algorithm
,	O
and	O
a	O
generalization	O
of	O
Huffman	B-General_Concept
's	I-General_Concept
original	I-General_Concept
algorithm	I-General_Concept
.	O
</s>
<s>
Use	O
the	O
package-merge	B-Algorithm
algorithm	I-Algorithm
to	O
select	O
the	O
set	O
of	O
coins	O
of	O
minimum	O
numismatic	O
value	O
whose	O
denominations	O
total	O
n1	O
.	O
</s>
<s>
The	O
optimal	O
length-limited	O
Huffman	B-General_Concept
code	I-General_Concept
will	O
encode	O
symbol	O
i	O
with	O
a	O
bit	O
string	O
of	O
length	O
hi	O
.	O
</s>
<s>
The	O
canonical	B-Algorithm
Huffman	I-Algorithm
code	I-Algorithm
can	O
easily	O
be	O
constructed	O
by	O
a	O
simple	O
bottom-up	O
greedy	B-Algorithm
method	I-Algorithm
,	O
given	O
that	O
the	O
hi	O
are	O
known	O
,	O
and	O
this	O
can	O
be	O
the	O
basis	O
for	O
fast	O
data	B-General_Concept
compression	I-General_Concept
.	O
</s>
<s>
However	O
,	O
the	O
original	O
paper	O
,	O
"	O
A	O
fast	O
algorithm	O
for	O
optimal	O
length-limited	O
Huffman	B-General_Concept
codes	I-General_Concept
"	O
,	O
shows	O
how	O
this	O
can	O
be	O
improved	O
to	O
O(nL )	O
-time	O
and	O
O(n )	O
-space	O
.	O
</s>
<s>
Many	O
other	O
improvements	O
have	O
been	O
made	O
to	O
the	O
package-merge	B-Algorithm
algorithm	I-Algorithm
to	O
reduce	O
the	O
multiplicative	O
constant	O
and	O
to	O
make	O
it	O
faster	O
in	O
special	O
cases	O
,	O
such	O
as	O
those	O
problems	O
having	O
repeated	O
pis	O
.	O
</s>
<s>
Methods	O
involving	O
graph	O
theory	O
have	O
been	O
shown	O
to	O
have	O
better	O
asymptotic	O
space	O
complexity	O
than	O
the	O
package-merge	B-Algorithm
algorithm	I-Algorithm
,	O
but	O
these	O
have	O
not	O
seen	O
as	O
much	O
practical	O
application	O
.	O
</s>
