search
Log In
0 votes
1.6k views
question based on huffman coding for symbol A with probability 0.3 , B with 0.15 ,c with 0.1 ,D with 0.25 ,E with 0.2 (with the convention 0 labeled for left branch and 1 for right) the minimum no of bits required to represent all the symbols together is??

a)1

b)2

c)3

d)4

which bit this question asking??
in Algorithms 1.6k views
0
Is it 3?
0
3 bits ?
0
Answer should be 3..
2
A = 11

B = 101

C = 100

D = 01

E = 00

Hence to represent all symbols at least 3 bits are required.
0
How did you get 11 for A? Solving this one feels like I have to use my third eye.

1 Answer

0 votes

a = "11"

b ="101"

c="100"

d="01"

e="00"

Total bits required to represent huffman code =12.

The average code length is 30*2+15*3+10*3+25*2+20*2 = 225.

Related questions

1 vote
0 answers
1
544 views
************ ****** is trying to send a message to Anand. The following message is: GATE2018GAATTTEEEE22000011188 What is the average length of bits required for encoding each letter using Huffman coding___? given solution : My solution using min heap ? I am ... char have same frequency ,does we get more than one tree and hence more than one solution? sorry if it is naive and already discussed
asked Dec 28, 2017 in Algorithms sunil sarode 544 views
0 votes
2 answers
2
427 views
Alice needs to send a large message to Bob using only five words. Seeing that the message is too long she decides to compress the message using Huffman coding algorithm. If the respective frequencies of words are given in the table, what would be the hamming code for w3 w1 w2 that she was supposed to use? a 100011011 b 100011101 c 100001101 d 111011000
asked Feb 3, 2016 in Algorithms khushtak 427 views
1 vote
1 answer
3
6.9k views
A file contains characters a,e,i,o,u,s and t with frequencies 10,15,12,3,4,13 and 1 respectively. If we use Huffman Coding for data compression then the average code length will be - a) 140/58 b) 146/58 c) 150/58 d) 174/58
asked Jan 5, 2016 in Algorithms piyushkr 6.9k views
1 vote
1 answer
4
697 views
A zero memory source emits six messages with probabilities 0.3, 0.25, 0.15, 0.12, 0.1 and 0.08. If binary Huffman coding is used, what will be the average code length? a) 2.45 bits b) 3.45 bits c) 2.54 bits d) 3.54 bits
asked Feb 28, 2017 in Computer Networks sh!va 697 views
...