Suppose that m is a positive integer with m>2 An m-ary Huffman code for a set of N symbols can be constructed analogously to the construction of a binary Huffman code. At the initial step, ((N - i) mod (m — 1)) + 1 trees consisting of a single vertex with least weights are combined into a rooted tree with these vertices as leaves. At each subsequent step, the m trees of least weight are combined into an mary tree.
30. Consider the three symbols A, B, and C with frequencies A: 0.80, B: 0.19, C: 0.01.
a) Construct a Huffman code for these three symbols.
b) Form a new set of nine symbols by grouping together blocks of two symbols, AA, AB, AC, BA, BB, BC, CA,
CB, and CC. Construct a Huffman code for these nine symbols, assuming that the occurrences of symbols in
the original text are independent.
c) Compare the average number of bits required to encode text using the Huffinan code for the three symbols
in part (a) and the Huffman code for the nine blocks of two symbols constructed in part (b). Which is more
efficient?
Want to see the full answer?
Check out a sample textbook solutionChapter 11 Solutions
DISCRETE MATHEMATICS LOOSELEAF
- Suppose that the check digit is computed as described in Example . Prove that transposition errors of adjacent digits will not be detected unless one of the digits is the check digit. Example Using Check Digits Many companies use check digits for security purposes or for error detection. For example, an the digit may be appended to a -bit identification number to obtain the -digit invoice number of the form where the th bit, , is the check digit, computed as . If congruence modulo is used, then the check digit for an identification number . Thus the complete correct invoice number would appear as . If the invoice number were used instead and checked, an error would be detected, since .arrow_forwardWrite out the addition and multiplication tables for 4.arrow_forwardSuppose that in an RSA Public Key Cryptosystem. Encrypt the message "algebra" using the -letter alphabet from Example 4. Use two-digit blocks. Use three-digit blocks. What is the secret key?arrow_forward
- Elements Of Modern AlgebraAlgebraISBN:9781285463230Author:Gilbert, Linda, JimmiePublisher:Cengage Learning,Linear Algebra: A Modern IntroductionAlgebraISBN:9781285463247Author:David PoolePublisher:Cengage Learning