Can you please explain? how seven bits will come?

The Gateway to Computer Science Excellence

+3 votes

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

+3 votes

+1 vote

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.

52,375 questions

60,554 answers

201,952 comments

95,375 users