Advantages
The advantage of a variable-length code is that unlikely source symbols can be assigned longer codewords and likely source symbols can be assigned shorter codewords, thus giving a low expected codeword length. For the above example, if the probabilities of (a, b, c, d) were, the expected number of bits used to represent a source symbol using the code above would be:
-
- .
As the entropy of this source is 1.7500 bits per symbol, this code compresses the source as much as possible so that the source can be recovered with zero error.
Read more about this topic: Variable-length Code
Famous quotes containing the word advantages:
“There is no one thoroughly despicable. We cannot descend much lower than an idiot; and an idiot has some advantages over a wise man.”
—William Hazlitt (17781830)
“When the manipulations of childhood are a little larceny, they may grow and change with the child into qualities useful and admire in the grown-up world. When they are the futile struggle for love and concern and protection, they may become the warped and ruthless machinations of adults who seek in the advantages of power what they could never win as children.”
—Leontine Young (20th century)
“If the minds of women were enlightened and improved, the domestic circle would be more frequently refreshed by intelligent conversation, a means of edification now deplorably neglected, for want of that cultivation which these intellectual advantages would confer.”
—Sarah M. Grimke (17921873)