9 9 votes Huffman tree is constructed for the following data :$\{A,B,C,D,E\}$ with frequency $\{0.17,0.11,0.24,0.33\ \text{and} \ 0.15 \}$ respectively. $100\ 00\ 01101$ is decoded as $BACE$ $CADE$ $BAD$ $CADD$ Algorithms isro-2020 algorithms huffman-code normal + – Satbir 9.3k views answer comment Share Follow Print 0 reply Please log in or register to add a comment.
8 8 votes There's a typo in the huffman code. It should be 100 00 01 101. 100 - B 00 - A 01 - C 101 - E BACE Option A habedo007 answered Jan 13, 2020 habedo007 comment Share Follow See all 2 Comments 2 2 Comments reply Vaibdoesit commented Sep 8, 2025 reply Follow flag Brpo how will be sure that D will hae to be in left subtree only and not the rigt subtree within the roots right child? 0 0 replyShare Divas_Gupta commented Jan 18 reply Follow flag I think becoz, 0.33 is more close to 0.26 rather than 0.41 0 0 replyShare Please log in or register to add a comment.
1 1 vote 100 00 01101 is decoded as BACE heisenberggg answered Apr 6, 2021 heisenberggg comment Share Follow See all 4 Comments 4 4 Comments reply Amar123 commented Apr 30, 2021 reply Follow flag can we interchange left and right subtree of root ? does it affect in encoding? 0 0 replyShare heisenberggg commented Jun 23, 2021 reply Follow flag No it can not be changed because according to huffman coding the left side is lower child and right onee is bigger child. 2 2 replyShare Khushi vishwakarma commented Jan 18, 2025 reply Follow flag Heisenbergg, there is nothing like while drawing Huffman coding we need to follow this binary search tree idea, we can draw it only using binary tree, and the numbering of zero and one solely depends on the person. In question, they should have mentioned those points which need to be taken care of while drawing the tree 2 2 replyShare Devkinandan gate commented Aug 31, 2025 reply Follow flag you can swap subtrees; it will alter bit patterns but not encoding efficiency. ,therefore they should have mentioned it .(its ambiguous) 0 0 replyShare Please log in or register to add a comment.
1 1 vote Ans goku4199 answered Oct 22, 2025 goku4199 comment Share Follow See 1 comment 1 1 comment reply pravar1.mishra commented Oct 23, 2025 reply Follow flag this is the only valid explaination 1 1 replyShare Please log in or register to add a comment.
0 0 votes This can be a lengthy question if solved manually because you have to check for multiple combinations.A better way to get the answer: the final codeword must contain B and E, because both have codewords of length 3 (their combined frequency is the lowest). The rest (A, C, D) have codewords of length 2.given options have 4 letters only. So, to make the total codeword length (100 00 01101) = 10, we must choose B, E, and two of A, C, D.Therefore, option a is the right answer.in option c there are three letters so its not possible using length of {b,e}=3 , {a,c,d} = 2. Keyurpatil answered Sep 6, 2025 • edited Sep 6, 2025 by Keyurpatil Keyurpatil comment Share Follow 0 reply Please log in or register to add a comment.