1. [14] From the encoding table as shown below: 40 Symbol Frequency Codeword A 0 B 55 100 C 50 101 D 70 1100 E 11 1101 F
Posted: Fri Apr 29, 2022 9:09 am
1. [14] From the encoding table as shown below: 40 Symbol Frequency Codeword A 0 B 55 100 C 50 101 D 70 1100 E 11 1101 F 6 1110 G 3 1111 Table 1 a) [3.5] Build the prefix tree according to the Table 1 above. b) [3.5] Use Huffman code to assign new codewords to the symbols (A-G) above. Follow the convention that the group/symbol with higher probability is assigned a '0' and that with lower probability is assigned a '1'. List out all the codewords in Table 2. Symbol A B с D E F G Table 2 Frequency Codeword (Huffman) 40 55 50 70 11 6 3
c) [2] What is the average codeword length of the original coding (Table 1)? d) [2] What is the average codeword length by using Huffman code (Table 2)? e) [2] What is the minimum average number of bits needed to encode each symbol? f) [1] Using a fixed-length code, what will be the minimum average number of bits needed to encode each symbol?
c) [2] What is the average codeword length of the original coding (Table 1)? d) [2] What is the average codeword length by using Huffman code (Table 2)? e) [2] What is the minimum average number of bits needed to encode each symbol? f) [1] Using a fixed-length code, what will be the minimum average number of bits needed to encode each symbol?