The Gateway to Computer Science Excellence
+3 votes
1.9k views
Consider a source with symbols A, B, C, D with probabilities 1/2, 1/4, 1/8, 1/8 respectively. What is the average number of bits per symbol for the Huffman code generated from above information?

2 bits per symbol

1.75 bits per symbol

1.50 bits per symbol

1.25 bits per symbol
in Algorithms by Veteran (105k points)
retagged by | 1.9k views

3 Answers

+3 votes
Best answer

ans is B 

by Boss (48.8k points)
selected by
0
Can you please explain? how seven bits will come?
0
why only 2 bits for value 1/8 ?
+1 vote



 59
Bits required per symbol:
A – 0 (1 bit)
B – 10 (2 bit)
C – 110 (3 bit)
D – 111 (3 bit)
Average number of bits per symbol = 1 * 1 / 2 + 2 * 1 / 4 + 3 * 1 / 8 + 3 * 1 / 8 = 7 / 4 = 1.75.
So, option (B) is correct.

by Active (1.9k points)
0 votes

Ans is B

Bits required per symbol: 
A – 0 (1 bit) 
B – 10 (2 bit) 
C – 110 (3 bit) 
D – 111 (3 bit) 
Average number of bits per symbol = 1 * 1 / 2 + 2 * 1 / 4 + 3 * 1 / 8 + 3 * 1 / 8 = 7 / 4 = 1.75. 
So, option (B) is correct.

https://www.youtube.com/watch?v=MXq9L5lstD4

by (465 points)

Related questions

Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true
50,647 questions
56,508 answers
195,519 comments
100,954 users