Question: Problem 1. In this problem, the goal is to crack the substitution cipher in an example. 1. Write a function to output the monogram distribution

Problem 1. In this problem, the goal is to crack the substitution cipher in an example. 1. Write a function to output the monogram distribution of a given a string of capital letters. By a monogram we mean A,B,C, etc. Your output should look something like this: sage: dist("ALWAYSDOMATH") A 3 25.00 L 1 8.33 W 1 8.33 Y 1 8.33 S 1 8.33 D 1 8.33 0 1 8.33 M 1 8.33 T 1 8.33 H 18.33 2. Write a function to output the bigram distribution of a given a string of capital letters. By a bigram we mean AA, AB, AC, etc. Test your program by outputting the bigram distribution of the following text. What are the 5 most common bigrams in the given text? Compare against the most common bigrams in the English language. BUTESPECIALLYHELOVEDTORUNINTHEDIMTWILIGHTOFTHESUMM ERMIDNIGHTSLISTENINGTOTHESUBDUEDANDSLEEPYMURMURSOF THEFORESTREADINGSIGNSANDSOUNDSASAMANMAYREADABOOKAN DSEEKINGFORTHEMYSTERIOUSSOMETHINGTHATCALLEDCALLEDW AKINGORSLEEPINGATALLTIMESFORHIMTOCOME 3. The following ciphertext was encrypted using a simple substitution ci- pher. What was the original plaintext message? RMRXELNELNZNRPRCZURWDIDEPYRDPUAEUUADALSDPIPRFDXZUR FEUZPAENKDDCIEXEVDIRUNRXSZNNRKYDUZVZUZYRVAUNSDDINR PUADSZNNRKRYRULZMNBWWDNNMBYYLCEFRVEURCVECENUDPZRIM RDYIRNESSPZQRXEUDYLUAPDDUAZBNECINDFDCABCIPDIECIUJD CULUZZCDEPUZZNELNUADWAECWDNZMNBPFRFEYEPDNDFDCABCIP DINDFDCULMRFDUZZCDEWUBEYYLEPUZZAENKDDCGCZJCUZXEGDX RNUEGDNMPZXURXDUZURXDZAIDEPZAIDEPIZCUJZPPLEKZBUXEN UDPYBGDRXNBPDADYYKDEYYPRVAUADNTBRUDWYDFDPLZBGCZJMZ PEABXECKDRCV
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
