Question

Huffman Code Scenario: There are 4 symbols (A, B, C and D) in a special language....

Huffman Code Scenario:

There are 4 symbols (A, B, C and D) in a special language. The frequencies of the symbols in a text written in the language are:

A 40, B 20, C 10, and D 5. Answer the following questions.

1. How many bits do you need to represent the symbols?

2. What is the total number of bits needed in order to encode the entire text?

3. Construct the Huffman tree based on the scenario (paste the Huffman tree below). How many bits do you need now to represent the symbol C?

4. What is the total number of bits using the Huffman codes you created in order to encode the entire text?

5. How many total bits do you save to encode the entire text using the Huffman codes?

Homework Answers

Know the answer?
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
Similar Questions
Consider the following symbols and their frequencies: a:1, b:2, c:3, d:4, e:5, f:6 What is the...
Consider the following symbols and their frequencies: a:1, b:2, c:3, d:4, e:5, f:6 What is the amount of bits needed per character for a balanced tree encoding.
Huffman Codes: You are give a text file containing only the characters {a,b,c,d,e,f}. Let F(x) denote...
Huffman Codes: You are give a text file containing only the characters {a,b,c,d,e,f}. Let F(x) denote the frequency of a character x. Suppose that: F(a) = 13, F(b) = 4, F(c) = 6, F(d) = 17, F(e) = 2, and F(f) = 11. Give a Huffman code for the above set of frequencies, i.e. specify the binary encoding for each of the six characters.
. Assume that X={B,D,C,A} and Y={6,7,1}. A code consists of 2 different symbols selected from X...
. Assume that X={B,D,C,A} and Y={6,7,1}. A code consists of 2 different symbols selected from X followed by 2 not necessarily different symbols from Y. How many different codes are possible?
ASCII (American Standard Code for Information Interchange) has an encoding for every character of the alphabet,...
ASCII (American Standard Code for Information Interchange) has an encoding for every character of the alphabet, and every number and special character, for a total of 256 possible values. So, here is a bit of a trick question: How many bits are required to store the text of the number "2903" in ASCII? What is the minimum number of bits you need to encode the 26 letters of the alphabet, the 10 digits, and a space?
1) Write the assembly code to implement expression A = B + C * ((D -...
1) Write the assembly code to implement expression A = B + C * ((D - E) * F) on 3-, 2-, 1-, and 0- address machines. Do not rearrange the expression. In accordance with "good programming", computing the expression should not change the values of its operands. Feel free to use a temporary variable, perhaps called T, if you feel you need one. 2) For the four code implementations of (1), compute the total size of the program, assuming:...
Answer the following questions with this scenario: A school district runs a gifted language program in...
Answer the following questions with this scenario: A school district runs a gifted language program in fifth grade with a selection criterion of 97th percentile. That is, students who score at 97th percentile or above on a standardized language test are eligible for the gifted program. Question A: What is the probablility of randomly drawing a student from the whole population of fifth-graders that would meet the selection criterion for the gifted program? Explain how you determined the answer. Question...
You are to create 17 subnets on a class B network with the IP address: 172.20.112.1?...
You are to create 17 subnets on a class B network with the IP address: 172.20.112.1? How many bits do you need to uniquely identify each subnet? (focus on the binary representation more so than the networking aspect of the question) : hint what is the minimum number of bits do you need to represent 17 different entities. (show all steps) Subtract 10 – 7 using 2’s complement (show all steps) Find the two’s complement of the following number:   10110111(show...
Consider a scenario where two hosts use a sliding window protocol, either Go-Back-N or Selective Repeat,...
Consider a scenario where two hosts use a sliding window protocol, either Go-Back-N or Selective Repeat, to exchange data packets. Assume that the RTT is 30 milliseconds and the sending rate is R = 1Gbps, and the size of every packet is L = 2,000 bytes, including both header fields and data. (a). How big would the window size have to be for the channel utilization to be greater than 98%? (b). Assume that we use the window size calculated...
C Programming: I am working on the problem below and have got all of the code...
C Programming: I am working on the problem below and have got all of the code down, except for one part I can't figure out. The logic for the calculation where the the total at each shop is giving after each iteration of the loop. this is the formula I've got: ingredientPrice += ingredient1; It calculates the total for the first shop properly, but for the shops that follow it gives a cumulative total rather than the singular total for...
Problem: Our Armstrong number Please write code for C language So far we have worked on...
Problem: Our Armstrong number Please write code for C language So far we have worked on obtaining individual digits from 4 digits or 5 digit numbers. Then added them to find the sum of digits in various examples and assignments. However, the process of extracting individual digits is actually can be solved using a loop as you were doing a repetitive task by using mod operation and division operation. Now, we know how loops work and we can remove the...