Skip to content

  • Home
  • Mathematics
  • English
  • History
  • Chemistry
  • Biology
  • Law
  • Medicine
  • Business
  • Toggle search form

Suppose we want to compress a text consisting of 6 characters, a, b, c, d, e, fusingthe Huffman Algorithm.

Posted on October 23, 2021 By Mashcroft2002 2 Comments on Suppose we want to compress a text consisting of 6 characters, a, b, c, d, e, fusingthe Huffman Algorithm.

Suppose we want to compress a text consisting of 6 characters, a, b, c, d, e, fusingthe Huffman Algorithm. Give an example for which the algorithm produces at least onecodeword of length 5. In other words, you are being asked to give a set of the characterfrequencies that results in the deepest tree.

Computers and Technology

Post navigation

Previous Post: A process is used to chemically link smaller units to form a larger molecule that is made up of repeating units. The properties of the
Next Post: How do computational chemists perform their experiments?​

Comments (2) on “Suppose we want to compress a text consisting of 6 characters, a, b, c, d, e, fusingthe Huffman Algorithm.”

  1. carsonbake says:
    October 24, 2021 at 2:50 am

    e(a) = 0

    e(b) = 10

    e(c) = 110

    e(d) = 1110

    Explanation:

    The Worst case will happen when f(a) > 2*f(b) ; f(b) > 2*f(c) ; f(c) > 2*f(d) ; f(d) > 2*f(e) and f(e) > 2*f(f).

    Where f(x) is frequency of character x.

    Lets consider the scenario when

    f(a) = 0.555, f(b) = 0.25, f(c) = 0.12, f(d) = 0.05, f(e) = 0.02 and f(f) = 0.005

    Please see attachment for image showing the steps of construction of Huffman tree:- see attachment

    From the Huffman tree created, we can see that endcoding e() of each character are as follows:-

    e(a) = 0

    e(b) = 10

    e(c) = 110

    e(d) = 1110

    e(e) = 11110

    e(f) = 11111

    So we can see that maximum length of encoding is 5 in this case.

    [tex]G Suppose we want to compress a text consisting of 6 characters,a, b, c, d, e, fusingthe Huffman Alg[/tex]
    [tex]G Suppose we want to compress a text consisting of 6 characters,a, b, c, d, e, fusingthe Huffman Alg[/tex]

    Reply
  2. lyndamahe0 says:
    October 24, 2021 at 5:06 am

    Check the explanation

    Explanation:

    When it comes to the field of computer science and information theory, the Huffman code is a specific type of optimal prefix code that is mostly utilized for the compression of lossless data. The process and procedures of finding or using such a code proceeds by means of Huffman coding, which is an algorithm that was developed by David A.

    kindly check the below image for the complete answer to your question.

    [tex]Suppose we want to compress a text consisting of 6 characters,a, b, c, d, e, fusingthe Huffman Algor[/tex]

    Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Categories

  • Advanced Placement (AP)
  • Arts
  • Biology
  • Business
  • Chemistry
  • Computers and Technology
  • Engineering
  • English
  • French
  • Geography
  • German
  • Health
  • History
  • Law
  • Mathematics
  • Medicine
  • Physics
  • SAT
  • Social Studies
  • Spanish
  • World Languages

© 2021 studyqas

Powered by PressBook WordPress theme