Introduction to Algorithms
Introduction to Algorithms
3rd Edition
ISBN: 9780262033848
Author: Thomas H. Cormen, Ronald L. Rivest, Charles E. Leiserson, Clifford Stein
Publisher: MIT Press
Question
Book Icon
Chapter 16.3, Problem 8E
Program Plan Intro

To show that in the given case Huffman coding is no more efficient than using ordinary 8-bit fixed-length code.

Blurred answer
Students have asked these similar questions
A certain picture is constructed of a matrix of dots of color which have been created by mixing 3 primary colors of ink, where each ink color can have one of 320 different amounts (i.e. different intensities). If the picture has 106 x 106 dots of color, then what is the minimum number of Bytes (in kB to one decimal place) it would take to store a digitized image of this picture?
One method that can be used to compress text data is run length encoding (RLE). When RLE is used the compressed data can be represented as a set of character/frequency pairs. When the same character appears in consecutive locations in the original text it is replaced in the compressed text by a single instance of the character followed by a number indicating the number of consecutive instances of that character. Single instances of a character are represented by the character followed by the number 1. Figure 9 and Figure 10 show examples of how text would be compressed using this method. Figure 9 Original text: AAARRRRGGGHH Compressed text: A 3 R 4 G 3 H 2 Figure 10 Original text: CUTLASSES Compressed text: C 1 U 1 T 1 L 1 A 1 S 2 E 1 S 1 What you need to do Task 1 Write a Python program that will perform the compression process described above. The program should display a suitable prompt asking the user to input the text to compress and then output the compressed text. Task 2 Test…
Scenario: In a biased N-bit binary number system with bias B, positive and negative numbers are represented as their value plus the bias B. For example, for 5-bit numbers with a bias of 15, the number 0 is represented as 01111, 1 as 10000, and so forth. Biased number systems are sometimes used in floating point mathematics. Consider a biased 8-bit binary number system with a bias of 12710 Question: What is the representation and value of the most negative number?
Knowledge Booster
Background pattern image
Similar questions
SEE MORE QUESTIONS
Recommended textbooks for you
  • Text book image
    Systems Architecture
    Computer Science
    ISBN:9781305080195
    Author:Stephen D. Burd
    Publisher:Cengage Learning
Text book image
Systems Architecture
Computer Science
ISBN:9781305080195
Author:Stephen D. Burd
Publisher:Cengage Learning