edited by
531 views
1 votes
1 votes

A text is made up of the characters $a,b,c,d,e$ each occuring with the probability $0.11, 0.40, 0.16, 0.09$ and $0.24$ respectively. The optimal Huffman coding technique will have the average length of

  1. $2.40$
  2. $2.16$
  3. $2.26$
  4. $2.15$
edited by

1 Answer

0 votes
0 votes

a = 0.11
b = 0.40
c = 0.16
d = 0.09
e = 0.24
we will draw a huffman tree:
huffman1

now huffman coding for character:

 a = 1111
      b = 0
      c = 110
      d = 1111
      e = 10
length for each character = no of bits * frequency of occurrence:
a = 4 * 0.11
  = 0.44
b = 1 * 0.4
  =  0.4
c = 3 * 0.16
  = 0.48
d = 4 * 0.09
  =  0.36 
e = 2 * 0.24
  = 0.48
Now add these length for average length:
 0.44 + 0.4 + 0.48 + 0.36 + 0.48 = 2.16

So, option (B) is correct.

Answer:

Related questions

1 votes
1 votes
3 answers
1
Arjun asked Nov 5, 2017
837 views
Which of the following routing technique / techniques is/are used in distributed systems?Fixed RoutingVirtual RoutingDynamic Routing(a) only(a) and (b) only(c) onlyAll (a...
1 votes
1 votes
2 answers
3
Arjun asked Nov 5, 2017
908 views
The Sigmoid activation function $f(t)$ is defined as$\dfrac{1}{\text{exp} (t) + \text{exp} (-t)}$$t \text{ exp}(-t)$$\dfrac{1}{1+ \text{exp} (t)}$$\dfrac{1}{1+ \text{exp...