Awesome q2a theme
0 votes
31 views
For the below message number of bits required in Huffman Coding is:

abbaabccdabcd
in Algorithms by (179 points) | 31 views
0
where is frequency ?

2 Answers

0 votes
Best answer

Do you have reffered to CLR.

I think if you have studied this algorithm atleast one you would not be asking this question here. I’m not discouraging asking questions.

But I’m suggesting you a way which would be more effective.

BTW here is answer.

  1. $(1^{st}pass)$
    1. $ freq(a) = 4$
    2. $ freq(b) = 4$
    3. $freq( c) = 3$
    4. $freq(d) = 2 $
  2. $(2^{nd} pass)$
    1. $freq(\{c,d\}) = 5$
    2. $freq(a) = 4$
    3. $freq(b) = 4$
  3. $(3^{rd} pass)$
    1. $freq(\{a,b\}) = 8$     $(assigned \space bit – 0)$
    2. $freq(\{c,d\}) = 5$     $(assigned \space bit – 1)$

       

    3. Huffman_tree

So, every letter is assigned $2-bit$ code and we have total $13$ letter message so we need total of $26\space bits$ to encode this message.

by (911 points)
selected by
0
Bro, I have already solved the que in less than a minute.

This was just to verify the process.

It doesn’t matter whether to ask or not.

The portal is for asking all types of doubts whether easy, sill or medium whatever.

Anyway there is a much better method than this.
0
Can you please provide better method so I too can take advantage of it. (:
0 votes
by (1.2k points)
Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true
Welcome to GATE CSE Doubts, where you can ask questions and receive answers from other members of the community.
Top Users Feb 2020
  1. shashin

    363 Points

  2. Shaik Masthan

    79 Points

  3. SuvasishDutta

    39 Points

  4. srestha

    33 Points

  5. Mk Utkarsh

    32 Points

  6. neeraj_bhatt

    31 Points

  7. !KARAN

    30 Points

  8. Debapaul

    23 Points

  9. Pratyush Priyam Kuan

    18 Points

  10. kalra05

    18 Points

Monthly Top User and those within 60% of his/her points will get a share of monthly revenue of GO subject to a minimum payout of Rs. 500. Current monthly budget for Top Users is Rs. 75.
3,328 questions
1,581 answers
10,280 comments
89,915 users