 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
¡ |
For each
encoding unit (letter, in this
|
|
|
example),
associate a frequency (number
|
|
of times it
occurs)
|
|
|
|
l |
You can also
use a percentage or a probability
|
|
|
¡ |
Create a
binary tree whose children are
|
|
|
the encoding
units with the smallest
|
|
|
frequencies
|
|
|
|
l |
The frequency
of the root is the sum of the
|
|
|
frequencies of
the leaves
|
|
|
¡ |
Repeat this
procedure until all the
|
|
|
encoding units
are in the binary tree
|
|