COMPUTER SCIENCE ILLUMINATED
COMPUTER SCIENCE ILLUMINATED
7th Edition
ISBN: 9781284208047
Author: Dale
Publisher: JONES+BART
Expert Solution & Answer
Book Icon
Chapter 3, Problem 51E

Explanation of Solution

Data Compression using Run-length encoding:

Given string: “AAAABBBCCCCCCCCDDDD hi there EEEEEEEEEFF”

  • Data compression starts with flag character “*”.
  • It replaces a string containing sequence of repeated character.
  • Followed by a flag character, remaining characters in a string are encoded as follows,
    • The string “AAAA” is compressed as “A4” where numeric digit “4” indicates that the character “A” is repeated four times in a string.
    • The string “CCCCCCCC” is compressed as “C8” where numeric digit “8” indicates that the character “C” is repeated eight times in a string...

Explanation of Solution

Compression ratio in Run-length encoding:

  • Compression ratio is defined as the length of encoded sting is divided by the length of original string.
  • Formula to compute the compression ratio,

Compression ratio=Length of the encoded stringLength of theoriginal string

  • The length of original string “AAAABBBCCCCCCCCDDDD hi there EEEEEEEEEFF” is 40.
  • The length of compressed string “*A4BBB*C8*D4 hi there *E9FF” is 27

Blurred answer
Students have asked these similar questions
I would like to know the main features about the following three concepts: 1. Default forwarded 2. WINS Server 3. IP Security (IPSec).
map the following ER diagram into a relational database schema diagram. you should take into account all the constraints in the ER diagram. Underline the primary key of each relation, and show each foreign key as a directed arrow from the referencing attributes (s) to the referenced relation.   NOTE: Need relational database schema diagram
What is business intelligence? Share the Business intelligence (BI) tools you have used and explain what types of decisions you made.
Knowledge Booster
Background pattern image
Similar questions
SEE MORE QUESTIONS
Recommended textbooks for you
Text book image
Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education
Text book image
Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON
Text book image
Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON
Text book image
C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON
Text book image
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning
Text book image
Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education