<s>
In	O
information	O
theory	O
,	O
Shannon	B-Protocol
's	I-Protocol
source	I-Protocol
coding	I-Protocol
theorem	I-Protocol
(	O
or	O
noiseless	O
coding	O
theorem	O
)	O
establishes	O
the	O
limits	O
to	O
possible	O
data	B-General_Concept
compression	I-General_Concept
,	O
and	O
the	O
operational	O
meaning	O
of	O
the	O
Shannon	O
entropy	B-Algorithm
.	O
</s>
<s>
Named	O
after	O
Claude	O
Shannon	O
,	O
the	O
source	B-Protocol
coding	I-Protocol
theorem	I-Protocol
shows	O
that	O
(	O
in	O
the	O
limit	O
,	O
as	O
the	O
length	O
of	O
a	O
stream	O
of	O
independent	O
and	O
identically-distributed	O
random	O
variable	O
(	O
i.i.d.	O
)	O
</s>
<s>
data	O
tends	O
to	O
infinity	O
)	O
it	O
is	O
impossible	O
to	O
compress	O
the	O
data	O
such	O
that	O
the	O
code	O
rate	O
(	O
average	O
number	O
of	O
bits	O
per	O
symbol	O
)	O
is	O
less	O
than	O
the	O
Shannon	O
entropy	B-Algorithm
of	O
the	O
source	O
,	O
without	O
it	O
being	O
virtually	O
certain	O
that	O
information	O
will	O
be	O
lost	O
.	O
</s>
<s>
However	O
it	O
is	O
possible	O
to	O
get	O
the	O
code	O
rate	O
arbitrarily	O
close	O
to	O
the	O
Shannon	O
entropy	B-Algorithm
,	O
with	O
negligible	O
probability	O
of	O
loss	O
.	O
</s>
<s>
The	O
source	B-Protocol
coding	I-Protocol
theorem	I-Protocol
for	O
symbol	O
codes	O
places	O
an	O
upper	O
and	O
a	O
lower	O
bound	O
on	O
the	O
minimal	O
possible	O
expected	O
length	O
of	O
codewords	O
as	O
a	O
function	O
of	O
the	O
entropy	B-Algorithm
of	O
the	O
input	O
word	O
(	O
which	O
is	O
viewed	O
as	O
a	O
random	O
variable	O
)	O
and	O
of	O
the	O
size	O
of	O
the	O
target	O
alphabet	O
.	O
</s>
<s>
Source	B-General_Concept
coding	I-General_Concept
is	O
a	O
mapping	O
from	O
(	O
a	O
sequence	O
of	O
)	O
symbols	O
from	O
an	O
information	O
source	O
to	O
a	O
sequence	O
of	O
alphabet	O
symbols	O
(	O
usually	O
bits	O
)	O
such	O
that	O
the	O
source	O
symbols	O
can	O
be	O
exactly	O
recovered	O
from	O
the	O
binary	O
bits	O
(	O
lossless	O
source	B-General_Concept
coding	I-General_Concept
)	O
or	O
recovered	O
within	O
some	O
distortion	O
(	O
lossy	O
source	B-General_Concept
coding	I-General_Concept
)	O
.	O
</s>
<s>
This	O
is	O
the	O
concept	O
behind	O
data	B-General_Concept
compression	I-General_Concept
.	O
</s>
<s>
In	O
information	O
theory	O
,	O
the	O
source	B-Protocol
coding	I-Protocol
theorem	I-Protocol
(	O
Shannon	O
1948	O
)	O
informally	O
states	O
that	O
(	O
MacKay	O
2003	O
,	O
pg	O
.	O
</s>
<s>
random	O
variables	O
each	O
with	O
entropy	B-Algorithm
can	O
be	O
compressed	O
into	O
more	O
than	O
bits	O
with	O
negligible	O
risk	O
of	O
information	O
loss	O
,	O
as	O
;	O
but	O
conversely	O
,	O
if	O
they	O
are	O
compressed	O
into	O
fewer	O
than	O
bits	O
it	O
is	O
virtually	O
certain	O
that	O
information	O
will	O
be	O
lost.The	O
coded	O
sequence	O
represents	O
the	O
compressed	O
message	O
in	O
a	O
biunivocal	O
way	O
,	O
under	O
the	O
assumption	O
that	O
the	O
decoder	O
knows	O
the	O
source	O
.	O
</s>
<s>
Consequently	O
,	O
when	O
the	O
entropy	B-Algorithm
encoding	O
is	O
applied	O
the	O
transmitted	O
message	O
is	O
.	O
</s>
<s>
with	O
entropy	B-Algorithm
in	O
the	O
discrete-valued	O
case	O
and	O
differential	O
entropy	B-Algorithm
in	O
the	O
continuous-valued	O
case	O
.	O
</s>
<s>
The	O
Source	B-Protocol
coding	I-Protocol
theorem	I-Protocol
states	O
that	O
for	O
any	O
,	O
i.e.	O
</s>
<s>
for	O
any	O
rate	O
larger	O
than	O
the	O
entropy	B-Algorithm
of	O
the	O
source	O
,	O
there	O
is	O
large	O
enough	O
and	O
an	O
encoder	O
that	O
takes	O
i.i.d.	O
</s>
<s>
Now	O
we	O
just	O
encode	O
the	O
sequences	O
in	O
the	O
typical	O
set	O
,	O
and	O
usual	O
methods	O
in	O
source	B-General_Concept
coding	I-General_Concept
show	O
that	O
the	O
cardinality	O
of	O
this	O
set	O
is	O
smaller	O
than	O
.	O
</s>
