Suppose a file contains the letters a, b, c, and d. Nominally we require 2 bits per

Question:

Suppose a file contains the letters

a, b,

c, and

d. Nominally we require 2 bits per letter to store such a file.

(a) Assume the letter a occurs 50% of the time, b occurs 30% of the time, and c and d each occur 10% of the time. Give an encoding of each letter as a bit string that provides optimal compression. Use a single bit for a.

(b) What is the percentage of compression you achieve above?
(This is the average of the compression percentages achieved for each letter, weighted by the letter’s frequency.)

(c) Repeat this, assuming a and b each occur 40% of the time, c occurs 15% of the time, and d occurs 5% of the time.

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  book-img-for-question

Computer Networks A Systems Approach

ISBN: 9780128182000

6th Edition

Authors: Larry L. Peterson, Bruce S. Davie

Question Posted: