The following data contains 100 symbols.
If Huffman coding is applied to the given data
What is the code for the letter ‘E’ if ‘0’ as taken left and ‘1’ is right
Answer will be either 000 or 111. it depends whether we keep Small Values at LHS and Larger Value at RHS or vice versa:
If we keep larger frequency value at LHS and small Value at RHS then 111 is the correct answer:
Nice explanation @ Vijay Thakur . Here 111 is not possible because in question it has been said that 0 to be taken left.
Right Answer is Shown as 100. I think there is some error in Options.
Note Regarding Updated Solution : I think in huffman coding we keep Small Values at left side and large value at right side , we can just assign Value 0 or 1 to Left/Right as per our assumption.
Hope this will help