← Quiz: Rooted Trees and Huffman Coding: all 10 questions
Quiz: Rooted Trees and Huffman Coding · Question 9 of 10
Frequencies are p:4, q:2, r:1, s:1. What is the total number of bits in the Huffman encoding?
Frequencies are p:4, q:2, r:1, s:1. What is the total number of bits in the Huffman encoding?
- A.8
- B.14
- C.16
- D.12
Answer & explanation
Correct answer: 14
Merges: 1+1 = 2, 2+2 = 4, 4+4 = 8. Total = sum of internal weights = 2 + 4 + 8 = 14.
Can you get the rest right without peeking?
Take the timed Quiz: Rooted Trees and Huffman Coding quiz free. Pass it to earn XP and count towards your certificate.
Start the quiz →