1 votes 1 votes The following message is: GATE2018GAATTTEEEE22000011188 What is the average length of bits required for encoding each letter using Huffman coding___? Algorithms huffman-code algorithms + – Parshu gate asked Nov 16, 2017 Parshu gate 2.7k views answer comment Share Follow See all 2 Comments See all 2 2 Comments reply pranab ray commented Nov 16, 2017 reply Follow Share is it 3.034? 0 votes 0 votes Parshu gate commented Nov 16, 2017 reply Follow Share given 2.71 but i am getting 1.71 0 votes 0 votes Please log in or register to add a comment.
Best answer 4 votes 4 votes .... Hira Thakur answered Nov 17, 2017 • selected Nov 17, 2017 by Parshu gate Hira Thakur comment Share Follow See 1 comment See all 1 1 comment reply Nirmal Gaur commented Jan 27, 2021 reply Follow Share Neat👌 0 votes 0 votes Please log in or register to add a comment.
0 votes 0 votes Answer is 2.7.. G-1100 A-1101 T-100 E-111 2-010 0-00 1-01 8-011 Avg length = (4*2 + 4*3 +3*4 +3*5 +3*3 + 2*5 +2 *4 + 2*3)/29= 2.7 vamp_vaibhav answered Nov 16, 2017 vamp_vaibhav comment Share Follow See all 8 Comments See all 8 8 Comments reply Show 5 previous comments vamp_vaibhav commented Nov 17, 2017 reply Follow Share Yes you are right.. I made mistake.. 0 votes 0 votes vamp_vaibhav commented Nov 17, 2017 reply Follow Share For this particular question different trees are possible with different Avg values.. Isn't?? 0 votes 0 votes pranab ray commented Nov 17, 2017 reply Follow Share yes its 87/29=3 its coming... 0 votes 0 votes Please log in or register to add a comment.
0 votes 0 votes I am following occurences * bits G = 2*4 A = 3*4 T = 4*3 E = 5*3 2 = 3*3 0 = 5*2 1 = 4*3 8 = 3*3 sum = 87 by adding all occrences = 29 and hence Avg bits = 87/29 = 3. Ashwin Kulkarni answered Nov 17, 2017 Ashwin Kulkarni comment Share Follow See all 0 reply Please log in or register to add a comment.