Two friends are exchanging messages through regular post mail. They don't want anyone to understand their messages in case anyone read them. The messages are in the form of an array of characters, where each character has a numeric value as illustrated in the below lookup table. ABCDE 1 2 3 4 FG JKLM 7 8| 9 10 11 12 13 RS TUV 14 15 16 17 18 19 20 21 22 23 24 25 26 NOPQ W xY They decided to change the characters in the array in a way that cannot be observed by any accidental reading. They do so as follows: 1- Given the original message, for example: GREETINGS 2- transform the original character to its numeric value 7 18 5 5 20 9 14 7 19 3- For each number, subtracting from its value the value of the first lower value character after it, and if there's no such character they will keep that character without any change. 2 12 55 11 2 77 19

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question
2 12 5 5 11 2 7 7 19
Explanation
Step by step
7 18 5 5 20 9 14 7 19
7 18 55 20 9 14 7 19
7 (18 55 20 9 14 7 19
7-5 = 2
18-5 = 12
7 18 5 5 20 9 14 7 19
7 18 5 5 20 9 14 7 19
No smaller after it
No smaller after it
7 18 5 5 20 9 14 7 19
20-9 =11
7 18 5 5 20 (9 14 (7)19
7 18 5 5 20 9 (14 7 19
7 18 5 5 20 9 14 (7) 19
7 18 5 5 20 9 14 7 (19
9-7 = 2
4- Return the
14-7 = 7
corresponding
character for
No smaller after it
No smaller after it
each new
numeric value
BLEEK BGGS
a) Using a brute-force approach, design an algorithm to solve
this problem, and analyze its complexity
b) Implement your algorithm using Python
c) Design a more efficient algorithm to solve this problem, and analyze its
complexity [Hint: you can use any data-structure]
d) Prepare a brief report (250 words) comparing the two algorithms
00
Transcribed Image Text:2 12 5 5 11 2 7 7 19 Explanation Step by step 7 18 5 5 20 9 14 7 19 7 18 55 20 9 14 7 19 7 (18 55 20 9 14 7 19 7-5 = 2 18-5 = 12 7 18 5 5 20 9 14 7 19 7 18 5 5 20 9 14 7 19 No smaller after it No smaller after it 7 18 5 5 20 9 14 7 19 20-9 =11 7 18 5 5 20 (9 14 (7)19 7 18 5 5 20 9 (14 7 19 7 18 5 5 20 9 14 (7) 19 7 18 5 5 20 9 14 7 (19 9-7 = 2 4- Return the 14-7 = 7 corresponding character for No smaller after it No smaller after it each new numeric value BLEEK BGGS a) Using a brute-force approach, design an algorithm to solve this problem, and analyze its complexity b) Implement your algorithm using Python c) Design a more efficient algorithm to solve this problem, and analyze its complexity [Hint: you can use any data-structure] d) Prepare a brief report (250 words) comparing the two algorithms 00
Two friends are exchanging messages through regular post mail. They don't want
anyone to understand their messages in case anyone read them. The messages are in
the form of an array of characters, where each character has a numeric value as
illustrated in the below lookup table.
GHIJ K LM
6 7 8
A BC DE F
1
2
3
4
9 10 11 12 13
QRS
14 15 16 17 18 19 20
N
O P
T
U v
V w X
Y
21 22 23 24 25 26
They decided to change the characters in the array in a way that cannot be observed by
any accidental reading. They do so as follows:
1- Given the original message, for example:
GREETINGS
2- transform the original character to its numeric value
7 18 5 5 20 9 14 7 19
3- For each number, subtracting from its value the value of the first lower value
character after it, and if there's no such character they will keep that character
without any change.
2 12 5 5 11 2 77 19
Transcribed Image Text:Two friends are exchanging messages through regular post mail. They don't want anyone to understand their messages in case anyone read them. The messages are in the form of an array of characters, where each character has a numeric value as illustrated in the below lookup table. GHIJ K LM 6 7 8 A BC DE F 1 2 3 4 9 10 11 12 13 QRS 14 15 16 17 18 19 20 N O P T U v V w X Y 21 22 23 24 25 26 They decided to change the characters in the array in a way that cannot be observed by any accidental reading. They do so as follows: 1- Given the original message, for example: GREETINGS 2- transform the original character to its numeric value 7 18 5 5 20 9 14 7 19 3- For each number, subtracting from its value the value of the first lower value character after it, and if there's no such character they will keep that character without any change. 2 12 5 5 11 2 77 19
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 5 steps with 4 images

Blurred answer
Knowledge Booster
Binary numbers
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education