Ask your own question, for FREE!
MIT 6.00 Intro Computer Science (OCW) 34 Online
OpenStudy (anonymous):

Problem set 4:Decrypting the fable This is how my program decrypts it: (.txt file below)

OpenStudy (anonymous):

OpenStudy (anonymous):

Is the decryption correct?

OpenStudy (e.mccormick):

Well, it seems to have made something that is sensible, rather than senseless. http://www.eastoftheweb.com/short-stories/UBooks/FlyiMach.shtml

OpenStudy (anonymous):

But how will the program know which sentences make sense and which do not?

OpenStudy (anonymous):

For instance how will it know that 'people came forward' is the correct sentence rather than 'people came ox ward' since 'ox' and 'ward' are both valid words present in the wordlist

OpenStudy (e.mccormick):

If it is like most decryption, it is not looking for one word to be right. It is looking for several. So what would decrypt some words will not get others, so the end result can fail testing. I have not looked at this particular code, so i can not say for certain how it is doing that.

OpenStudy (anonymous):

choosing 'ox ward' instead of 'forward' will not cause the end result test to fail because by applying some combination of shifts it is still possible to get the sentence 'with subscriptions to build a second machine' which follows 'ox ward'/'forward'

OpenStudy (anonymous):

this is the shift combination that it uses:

OpenStudy (anonymous):

I got something similar by printing s and letting it run for about an hour, but it still hadn't finished running. How long did yours take to run?

OpenStudy (anonymous):

It didn't take long, only a couple of seconds.

OpenStudy (anonymous):

Thank you, I think something might be wrong with my algorithm.

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Latest Questions
Sarahwells: Define bananaed
15 hours ago 6 Replies 1 Medal
breiadabrattzz: How do you stop having anxiety?
8 hours ago 82 Replies 13 Medals
Notliderisahuman: what the best comic book character to draw?
9 hours ago 10 Replies 1 Medal
XShawtyX: Who is good at generating images? Or making images???
11 hours ago 23 Replies 5 Medals
foxey3: Made a song!
1 day ago 14 Replies 4 Medals
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!