[Solved] CPSC4200 Assignment #1: Classical Ciphers

$25

File Name: CPSC4200_Assignment_#1:_Classical_Ciphers.zip
File Size: 386.22 KB

SKU: [Solved] CPSC4200 Assignment #1: Classical Ciphers Category: Tag:
5/5 - (1 vote)
  1. The objective of this problem is to learn about monoalphabetic substitution ciphers and to use letter frequencies to cryptanalyze a given ciphertext.

Write a program (in any programming language) to analyze the letter frequencies in a block of text. Ignore case (upper and lower count the same). It should count the number of times each letter appears in the text, the number of times each pair of letters appears, and the number of times each sequence of 3 letters appears. Your program should sort the counts of single letters, pairs of letters (bigrams), and triples of letters (trigrams), then print the non-zero values in decreasing order. For single letters, print all non-zero values; for bigrams and trigrams, print the first 30 non-zero values.

Turn in the following items by the deadline.

  • (a) (50 pts) As instructed above, submit a soft copy of your program via Canvas. Please write your own program! Do not copy other peoples programs.
  • (b) (25 pts) Output of your program run against at least 2 different texts of sufficient length. Make sure that the texts are sufficiently long enough for frequency analysis.
  • (c) (5 pts) Compare the 2 sets of frequencies you produced for part (b). Are they similar or different? Explain why they are similar or different.
  • (d) (20 pts) Using your frequency analysis results, decrypt the ciphertext given below.

For part (b), you can run your program on texts found on the Internet. For example, you can find the full text for Hamlet online (http://www.bibliomania.com/0/6/3/1057/frameset.html).

Ciphertext for (d):

bt jpx rmlx pcuv amlx icvjp ibtwxvr ci m lmtr pmtn, mtn yvcjx cdxv mwmbtrj jpx amtngxrjbah uqct jpx qgmrjxv ci jpx ymgg ci jpx hbtwr qmgmax; mtn jpx hbtw rmy jpx qmvj ci jpx pmtn jpmj yvcjx. jpxt jpx hbtwr acutjxtmtax ymr apmtwxn, mtn pbr jpcuwpjr jvcufgxn pbl, rc jpmj jpx scbtjr ci pbr gcbtr yxvx gccrxn, mtn pbr htxxr rlcjx ctx mwmbtrj mtcjpxv. jpx hbtw avbxn mgcun jc fvbtw bt jpx mrjvcgcwxvr, jpx apmgnxmtr, mtn jpx rccjprmexvr. mtn jpx hbtw rqmhx, mtn rmbn jc jpx ybrx lxt

ci fmfegct, ypcrcxdxv rpmgg vxmn jpbr yvbjbtw, mtn rpcy lx jpx btjxvqvxjmjbct jpxvxci, rpmgg fx agcjpxn ybjp ramvgxj, mtn pmdx m apmbt ci wcgn mfcuj pbr txah, mtn rpmgg fx jpx jpbvn vugxv bt jpx hbtwncl. jpxt amlx bt mgg jpx hbtwr ybrx lxt; fuj jpxe acugn tcj vxmn jpx yvbjbtw, tcv lmhx htcyt jc jpx hbtw jpx btjxvqvxjmjbct jpxvxci. jpxt ymr hbtw fxgrpmoomv wvxmjge jvcufgxn, mtn pbr acutjxtmtax ymr apmtwxn bt pbl, mtn pbr gcvnr yxvx mrjctbrpxn. tcy jpx kuxxt, fe vxmrct ci jpx ycvnr ci jpx hbtw mtn pbr gcvnr, amlx btjc jpx fmtkuxj pcurx; mtn jpx kuxxt rqmhx mtn rmbn, c hbtw, gbdx icvxdxv; gxj tcj jpe jpcuwpjr jvcufgx jpxx, tcv gxj jpe acutjxtmtax fx apmtwxn; jpxvx br m lmt bt jpe hbtwncl, bt ypcl br jpx rqbvbj ci jpx pcge wcnr; mtn bt jpx nmer ci jpe ybrncl ci jpx wcnr, ymr icutn bt pbl; ypcl jpx hbtw txfuapmntxoomv jpe imjpxv, jpx hbtw, b rme, jpe imjpxv, lmnx lmrjxv ci jpx lmwbabmtr, mrjvcgcwxvr, apmgnxmtr, mtn rccjprmexvr; icvmrluap mr mt xzaxggxtj rqbvbj, mtn htcygxnwx, mtn utnxvrjmtnbtw, btjxvqvxjbtw ci nvxmlr, mtn rpcybtw ci pmvn rxtjxtaxr, mtn nbrrcgdbtw ci ncufjr, yxvx icutn bt jpx rmlx nmtbxg, ypcl jpx hbtw tmlxn fxgjxrpmoomv; tcy gxj nmtbxg fx amggxn, mtn px ybgg rpcy jpx btjxvqvxjmjbct.

Reviews

There are no reviews yet.

Only logged in customers who have purchased this product may leave a review.

Shopping Cart
[Solved] CPSC4200 Assignment #1: Classical Ciphers
$25