Question

Related to Optimal Huffman Codes Construct a Huffman code for the symbols a through g, listed...

Related to Optimal Huffman Codes

Construct a Huffman code for the symbols a through g, listed below together with their probabilities. Then determine the expected length of your resulting code!

            a 1/40    b 2/40    c 3/40    d 4/40    e 5/40    f 6/40    g 6/40    h 13/40

Homework Answers

Answer #1

Here are the probabilities in increasing order

a = 1/40

b = 2/40

c = 3 /40

d = 4/40

e = 5/40

f = 6/40

g = 6/40

h = 13/40

The Huffman Tree is

Codes are

a = 1111110 ( 7 bits)

b = 1111111 ( 7 bits)

c = 111110 ( 6 bits)

d = 11110 ( 5 bits)

e = 1110 ( 4 bits)

f = 110 ( 3 bits)

g = 10 ( 2 bits)

h = 0 ( 1 bit)

Average number of bits = 7*1/40 + 7*2/40 + 6*3/40 + 5*4/40 + 4*5/40 + 3*6/40 + 2*6/40 + 1*13/40

= 7/40 + 14/40 + 18/40 + 20/40 + 20/40 + 18/40 + 12/40 + 13/40

= 3.05 bit/char

Please don't forget to give a positive rating to the answer. Your rating motivates experts to help other students also. Thank you :)

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
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 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.
Given below are the durations of and the precedence relationships among the activities required to compute...
Given below are the durations of and the precedence relationships among the activities required to compute a project. 1) construct an AOA network of the project 2)what is the critical path? determine the expected duration of the project. 3)compute the standard deviation of the critical path Duration(days) Activity pre-decessor(s) a m b A - 4 7 12 B A 6 9 13 C A 5 7 9 D B,C 3 5 8 E B 7 8 10 F A 2...
RESTORE machine shop makes customized replacement parts for older equipment. All customer jobs listed must be...
RESTORE machine shop makes customized replacement parts for older equipment. All customer jobs listed must be machined first, then polished. Determine the optimal processing sequence of the six jobs listed below. Jobs Machining Hrs Polishing Hrs A 5 4 B 7 3 C 3 2 D 4 1 E 1 2 F 3 4 job A is finished at time 21 11 9 13
David Wise handles his own investment portfolio, and has done so for many years. Listed below...
David Wise handles his own investment portfolio, and has done so for many years. Listed below is the holding time between purchase and sale for his collection of 36 stocks. 8, 8, 6, 11, 11, 9, 8, 5, 11, 4, 8, 5, 14,7, 12, 8, 6, 11, 9, 7, 9, 15,8, 8, 12, 5, 9, 8, 5, 9, 10, 11, 3, 9, 8, 6 Arrange the data into equal class intervals of six's (6's) and determine the following: a. Class...
Question: To complete the wing assembly for and experimental aircraft, Jim Gilbert has laid out nine...
Question: To complete the wing assembly for and experimental aircraft, Jim Gilbert has laid out nine activities involved. These activities have been labeled A through I in the following table. The company is planning to finish the project in 34 weeks. Please answer the following questions. Determine the expected (estimated) duration and variance for each activity. You can round the expected duration numbers without decimals. Activity Immediate Predecessor(s) Optimistic Probable Pessimistic Expected duration Variance A -- 5 9 13 Answer...
Use the following data for question below. Activity Normal Time (weeks) Crash Time (weeks) Normal Cost...
Use the following data for question below. Activity Normal Time (weeks) Crash Time (weeks) Normal Cost Total Cost with Crashing Pred 1 Pred 2 A 10 7 $200 $400 B 15 10 $250 $600 C 13 8 $600 $1,500 A B D 14 10 $800 $1,200 A B E 8 4 $1,000 $3,000 C D F 12 6 $1,200 $1,800 C D G 7 6 $700 $1,400 E F H 5 3 $500 $900 E F If the project must...
Listed below are ten terms followed by a list of descriptive phrases. a. financial position f....
Listed below are ten terms followed by a list of descriptive phrases. a. financial position f. operating capability b. equity g. assets c. net income h. acquisition cost d. liquidity i. control e. financial flexibility j. recognition ​ ____ 1. Process of recording and reporting an element in the financial statements ____ 2. Economic resource ____ 3. Ability of a company to use its financial resources to adapt to change ​ ____ 4. Economic resources, economic obligations, and their relationships  at...
Match the descriptions below with the correct answer, using the letter codes shown in the table...
Match the descriptions below with the correct answer, using the letter codes shown in the table below. (8 points) A. Realizable value B. Percentage of receivables method C. 1/10, n/60 D. Bad debt Expense E. Aging of receivables F. Direct write-off method G. Operating cycle H. Specific identification method I. FOB shipping point J. Time period assumption K. n/10 EOM L. Percentage of sales method M. Permanent accounts N. 2/10, EOM O. 2/10, n/30 P. FOB destination The economic life...
Question 2 is through E , F, G, and H E. Expected purchases for June and...
Question 2 is through E , F, G, and H E. Expected purchases for June and July are​ $76,000 and​ $90,000, respectively. Purchases for May were​ $56,000. All purchases are paid​ 40% in the month of purchase and​ 60% the following month. At what amount are June payments for purchases​ budgeted? A.​$64,000 B.​$88,800 C.​$68,000 D.​$100,000 F. A lamp store purchased $3,000 of lamps in September. The store had $1,100 of lamps on hand at the beginning of​ September, and expected...
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT