Question: python or sagemath code plz Problem 1. In this problem, the goal is to crack the substitution cipher in an example. 1. Write a function

 python or sagemath code plz Problem 1. In this problem, the

python or sagemath code plz

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 D1 8.33 0 1 8.33 M1 8.33 T 1 8.33 H 1 8.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 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 D1 8.33 0 1 8.33 M1 8.33 T 1 8.33 H 1 8.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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!