Question

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.

Homework Answers

Answer #1

All the characters are arranged in a descending order based on their frequency of occurence.

Sum of the frequency of all characters = 13 + 4 + 6 + 17 + 2 + 11 = 53

For getting the codeword for a alphabet you just have to follow the arrow lines untill the end and write the digits (0 or 1) obtained in the reverse order.

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.
ANSWER IN C++ ONLY A string of characters including only alphabets (lowercase letters) is provided as...
ANSWER IN C++ ONLY A string of characters including only alphabets (lowercase letters) is provided as an input. The first task is to compute the frequency of each character appearing in the string. In the output, the characters have to be arranged in the same order as they appear in the input string. Then characters have to be rearranged, such that all the characters having a specific frequency, say xx, come together. Let the frequency of a character, lying in...
Let Let A = {a, e, g} and B = {c, d, e, f, g}. Let...
Let Let A = {a, e, g} and B = {c, d, e, f, g}. Let f : A → B and g : B → A be defined as follows: f = {(a, c), (e, e), (g, d)} g = {(c, a), (d, e), (e, e), (f, a), (g, g)} (a) Consider the composed function g ◦ f. (i) What is the domain of g ◦ f? What is its codomain? (ii) Find the function g ◦ f. (Find...
Let G be a group containing 6 elements a, b, c, d, e, and f. Under...
Let G be a group containing 6 elements a, b, c, d, e, and f. Under the group operation called the multiplication, we know that ad=c, bd=f, and f^2=bc=e. Which element is cf? How about af? Now find a^2. Justify your answer. Hint: Find the identify first. Then figure out cb.  
Let f(x)= a -bx^c + dx^e where a, b,c,d,e >0 and c<e. Suppose that f(x0)= 0...
Let f(x)= a -bx^c + dx^e where a, b,c,d,e >0 and c<e. Suppose that f(x0)= 0 and f '(x0)=0 for some x0>0. Prove that f(x) greater than or equal to 0 for x greater than or equal to 0
Let S = {A, B, C, D, E, F, G, H, I, J} be the set...
Let S = {A, B, C, D, E, F, G, H, I, J} be the set consisting of the following elements: A = N, B = 2N , C = 2P(N) , D = [0, 1), E = ∅, F = Z × Z, G = {x ∈ N|x 2 + x < 2}, H = { 2 n 3 k |n, k ∈ N}, I = R \ Q, J = R. Consider the relation ∼ on S given...
Let (X, d) be a metric space, and let U denote the set of all uniformly...
Let (X, d) be a metric space, and let U denote the set of all uniformly continuous functions from X into R. (a) If f,g ∈ U and we define (f + g) : X → R by (f + g)(x) = f(x) + g(x) for all x in X, show that f+g∈U. In words,U is a vector space over R. (b)If f,g∈U and we define (fg) : X → R by (fg)(x) = f(x)g(x) for all x in X,...
Let X = {1, 2, 3} and Y = {a, b, c, d, e}. (1) How...
Let X = {1, 2, 3} and Y = {a, b, c, d, e}. (1) How many functions f : X → Y are there? (2) How many injective functions f : X → Y are there? (3) What is a if (x + 2)10 = x 10 + · · · + ax7 + · · · + 512x + 1024?
Given a random permutation of the elements of the set {a,b,c,d,e}, let X equal the number...
Given a random permutation of the elements of the set {a,b,c,d,e}, let X equal the number of elements that are in their original position (as listed). The moment generating function is X is: M(t) = 44/120 + 45/120e^t + 20/120e^2t + 10/120e^3t+1/120e^5t Explain Why there is not (e^4t) term in the moment generating function of X ?
Let f(x)=(1/2)(x/5), x=1,2,3,4 Hint: Calculate F(X). Find; (a) P(X=2) , (b) P(X≤3) , (c) P(X>2.5), (d)...
Let f(x)=(1/2)(x/5), x=1,2,3,4 Hint: Calculate F(X). Find; (a) P(X=2) , (b) P(X≤3) , (c) P(X>2.5), (d) P(X≥1), (e) mean and variance, (f) Graph F(x)