Question

3. Apply the Huffman algorithm according to the frequency chart shown below. (10 points) a. Show your work for combining the

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Find the solution to the above question below, do read all the steps provided carefully and in case of any comments do comment below. If found helpful please upvote this.

PAGE NO. symbol A 3 c frequency 0.4 0.2 0.15 0,15 ascending 1 arranging the symbols in orden of frequencies 3 A 02 0,4 0.15 0

PAGE No. final ree 5) A 0.4 0.6 3 B c A 0115 0.15 0,2 B III - d) compression Ratio assuming each character takes 8 asci bits

e) encode the string AB ACABAD 13 с A B А D 10 ) O O 011001101100101 f) given code Looolol D Loo loro D A A BA ; string : ADB

Add a comment
Know the answer?
Add Answer to:
3. Apply the Huffman algorithm according to the frequency chart shown below. (10 points) a. Show...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Qu 2: [6 Marks) (a) Information to be transmitted over the internet contains the following characters...

    Qu 2: [6 Marks) (a) Information to be transmitted over the internet contains the following characters with their associated frequencies as shown in the following table: Character abenos tu Frequency 11 6 14 12 3 132 Use Huffman Code Algorithm to answer the following questions: (i) Build the Huffman code tree for the message. (ii) Use the tree to find the codeword for each character. (iii)If the data consists of only these characters, what is the total number of bits...

  • I need help with building the program since Huffman's algorithm is not clear. I would appreciate...

    I need help with building the program since Huffman's algorithm is not clear. I would appreciate if a pseudo code for encoding and decoding the algorithm is provided, as well as the program for both of them since it deals with English text instead of characters. I'd appreciate it if it was in C++, or Java. 1. si o Write a program that constructs a Huffman code for a given English text and encode it. The English character occurrence probabilities...

  • You will construct a Huffman tree based on the given frequencies of 26 English alphabets in...

    You will construct a Huffman tree based on the given frequencies of 26 English alphabets in upper case plus the space character. An internal tree node class in HuffmanTree with necessary information is required. • You will not randomly switch left and right children when merger two trees. Instead, you will build a right-heavy tree according to the following strategies to select the right child. (1) The tree that is taller will be the right child, i.e., the height is...

  • For this assignment, you will write a program to work with Huffman encoding. Huffman code is...

    For this assignment, you will write a program to work with Huffman encoding. Huffman code is an optimal prefix code, which means no code is the prefix of another code. Most of the code is included. You will need to extend the code to complete three additional methods. In particular, code to actually build the Huffman tree is provided. It uses a data file containing the frequency of occurrence of characters. You will write the following three methods in the...

  • . Huffman Encoding (a.) (6 points) Suppose a certain file contains only the following letters with the corresponding frequencies 1 AİB 73 9 30 44 130 28 16 In a fixed-length encoding scheme, cach...

    . Huffman Encoding (a.) (6 points) Suppose a certain file contains only the following letters with the corresponding frequencies 1 AİB 73 9 30 44 130 28 16 In a fixed-length encoding scheme, cach character is given a binary representation with the same number of bits. What is the minimum number of bits required to represent each letter of this file under fixed-length encoding scheme? Describe how to encode all seven letters in this file using the number of bits...

  • (b.) Huffman code is a way to encode information using variable-length binary strings to represent symbols depending on the frequency of each individual letter. Specifically, letters that appear more...

    (b.) Huffman code is a way to encode information using variable-length binary strings to represent symbols depending on the frequency of each individual letter. Specifically, letters that appear more frequently can be encoded into strings of shorter lengths, while rarer letters can be turned into longer binary strings. On average, Huffman code is a more efficient way to encode a message as the number of bits in the output string will be shorter than if a fixed-length code was used....

  • I am getting a seg fault with my huffman tree. I'm not sure if it's my...

    I am getting a seg fault with my huffman tree. I'm not sure if it's my deconstructors but also getting some memory leaks. Can some one help me find my seg fault? It's in c++, thanks! //#ifndef HUFFMAN_HPP //#define HUFFMAN_HPP #include<queue> #include<vector> #include<algorithm> #include<iostream> #include <string> #include <iostream> using namespace std; class Node { public:     // constructor with left and right NULL nodes     Node(char charTemp, int c) {       ch = charTemp;       count = c;       left...

  • *Java* You will write a program to do the following: 1. Read an input file with...

    *Java* You will write a program to do the following: 1. Read an input file with a single line of text. Create a method named load_data. 2. Determine the frequency distribution of every symbol in the line of text. Create a method named 3. Construct the Huffman tree. 4. Create a mapping between every symbol and its corresponding Huffman code. 5. Encode the line of text using the corresponding code for every symbol. 6. Display the results on the screen....

  • Do this using the C language. show me the code being executed and also copy and...

    Do this using the C language. show me the code being executed and also copy and paste the code so i can try it out for myseld Instructions A cipher is mirrored algorithm that allow phrases or messages to be obfuscated (ie. "scrambled"). Ciphers were an early form of security used to send hidden messages from one party to another. The most famous and classic example of a cipher is the Caesar Cipher. This cypher worked by shifting each letter...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT