in Algorithms closed by
1,318 views
0 votes
0 votes
closed with the note: -

in Huffman Code, we get extract the minimum at each time, but my minimum is creating duplicate, then which one i choose?

i am getting the same avg.no.of bits for every Huffman tree, but the problem is my tree is changing therefore representing the character also changed, if some one asks convert the message using Huffman, then ambiguity comes.

ex :- frequencies of A,B,C,D,E,F,G and H are $\frac{1}{30},\frac{1}{30},\frac{1}{30},\frac{2}{30},\frac{3}{30},\frac{5}{30},\frac{5}{30}$ and $\frac{12}{30} $

in Algorithms closed by
1.3k views

4 Comments

Can someone please tell me that we arrange in ascending order after every iteration right then compare search min 2 then combine? Right? (Consider no repeated values) and data related to frequency is given @shaik
0
0
yes, @pmona
0
0
edited by

Ok thanks @shaik, although I have come accross quite a few questions in which I've seen this to be wrong then... for example in this image 15 is less than 18 but since they already arrange th data in ascending order they don't take 15 on left side of 18

0
0

Related questions