Problem set 4: the Caesar Cipher



Yüklə 111,01 Kb.
Pdf görüntüsü
səhifə4/10
tarix17.02.2022
ölçüsü111,01 Kb.
#83821
1   2   3   4   5   6   7   8   9   10
MIT6 00SCS11 ps4

Problem 2. Code-breaking 

Your friend, who is also taking 6.00, is really excited about the program she wrote for Problem 1 

of this problem set. She sends you emails, but they’re all encrypted with the Caesar cipher! 

The problem is, you don’t know which shift key she is using. The good news is, you know your 

friend only speaks and writes English words. So if you can write a program to find the decoding 

that produces the maximum number of words, you can probably find the right decoding (There’s 

always a chance that the shift may not be unique. Accounting for this would probably use 

statistical methods that we won’t require of you.) 



Part a: Pseudocode 

Think about an algorithm you could use to solve this problem. Write the steps down and save in 

the textfile named ps4.txt. 


Yüklə 111,01 Kb.

Dostları ilə paylaş:
1   2   3   4   5   6   7   8   9   10




Verilənlər bazası müəlliflik hüququ ilə müdafiə olunur ©www.genderi.org 2024
rəhbərliyinə müraciət

    Ana səhifə