Huffman Code Multiple choice Questions and Answers (MCQs)

YOU CAN DOWNLOAD 200+ SUBJECTS PDF BOOK FOR COMPETITIVE EXAMINATIONS

CLICK HERE TO DOWNLOAD

Huffman Code Multiple choice Questions and Answers (MCQs)

Question 6 [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
In Huffman coding, data in a tree always occur?
A
roots
B
leaves
C
left sub trees
D
right sub trees
Question 6 Explanation: 
In Huffman encoding, data is always stored at the leaves of a tree inorder to compute the codeword effectively.

Question 7 [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
From the following given tree, what is the code word for the character 'a'?
A
011
B
10
C
100
D
101
Question 7 Explanation: 
By recording the path of the node from root to leaf, the code word for character 'a' is found to be 011.

Question 8 [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
From the following given tree, what is the computed codeword for 'c'?
A
111
B
101
C
110
D
11
Question 8 Explanation: 
By recording the path of the node from root to leaf, assigning left branch as 0 and right branch as 1, the codeword for c is 110.

Question 9 [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
What will be the cost of the code if character ci is at depth di and occurs at frequency fi?
A
cifi
B
∫cifi
C
∑fidi
D
fidi
Question 9 Explanation: 
If character ci is at depth di and occurs at frequency fi, the cost of the codeword obtained is ∑fidi.

Question 10 [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
An optimal code will always be present in a full tree.
A
true
B
false
Question 10 Explanation: 
An optimal tree will always have the property that all nodes are either leaves or have two children. Otherwise, nodes with one child could move up a level.

There are 10 questions to complete.