EBK COMPUTER SCIENCE ILLUMINATED
EBK COMPUTER SCIENCE ILLUMINATED
7th Edition
ISBN: 9781284174755
Author: Dale
Publisher: JONES+B CO
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
hi, I need help to resolve the case, thank you
The following table shows the timestamp and actions by two users. Choose the best option that describes the outcome of the actions. Time JohnSara 10:14 select* from hr.employees; 10:15 Update hr.employees set salary= 100  where employee_id= 206; 10:16 Commit:  Select* from hr.employees; 10:18 Commit: 10:20 Select* from hr.employees;  Commit:   John's query willreturn the same results all three times it is executed as they are run in the same session.   John's queries run at10:16 and10:20 produce the same result, which is different from the one at 10:14   John's query run at 10:16 waits until 10:18 to produce results, waiting for the commit to happen.   John's queries run at 10:14 and 10:16 produce the same result, which is different from the one at 10:20
what's the process used to obtain IP configuration using DHCP in Windows Server.
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