A few words on Information Theory....
Information Theory is primarily concerned with ways to quantify information.
It's based on the idea that the amount of information a message contains is directly related to the amount of surprise in the message.
= log2n
Here's what we mean...
|
symbol:
|
same size codes | variable codes, 1 | variable codes, 2 | variable codes, 3 |
|
a1 [A]
|
00
|
1
|
1
|
1
|
|
a2 [B]
|
01
|
01
|
10
|
10
|
|
a3 [C]
|
10
|
001
|
11
|
100
|
|
a4 [D]
|
11
|
000
|
111
|
110
|
| sample message | 1011011010010001 | 00001010011101 | 1111110111110110 | 1001101010010010110 |
| sample message (decode colours) | 1111110111110110 | 1001101010010010110 | ||
| intended message | CDBCCBAB | DBBCAAB | CDBCCBAB | CDBCCBAB |
| decoded message | CDBCCBAB | DBBCAAB | CCC??? | CDBCCBD |