At college you know your roommate is reading books about cryptography. When looking at his journal you see the following entries. You decide to figure out the code and follow him around for a few days, writing your notes in italics below his entries. 08.39. 021.921.421.031.421. 731.241.921.431.531.231.831.231. 941.631.841.731. 231.641.431.

Last Monday, 10/17/16, your roommate went swimming with Bob after breakfast. 49.29. 39.811.911.531. 401.521.331.231.121.041. 321.731.821. 301.721.141.331.941. 631.641.051. 941.341.161.261.831. 931.951. 321.351.151.561.941.361.98.661.

On Wednesday he had pizza for dinner at Oliver's with Thomas and Janet. 97.29. 911.821.321.921.321. 521.721.031.921.531.921. 641.331.541.431. 69.041.831.331.631. 141.741. 121.341.141.551.161.451.551.541. 611.851.261.051.561.761.

On Saturday he met Alice early in the morning in Sherwood Forest.

The next entry says: 08.39. 231.431.631.021.241. 121.731.541.731.241.831.131.341.721.341.631.451. 131.151. 211.841.841.931.151.151. 421.451.841.561.941.761.571.

Where and what is your roommate going to do next?

  • $\begingroup$ You filthy stalker :-D $\endgroup$ Oct 23 '16 at 18:51
  • 2
    $\begingroup$ You've tagged this [alphametic]; is that definitely intentional? (Because this doesn't look at all like an alphametic puzzle, and if there's something alphametic going on underneath then presumably that's a really big hint.) $\endgroup$
    – Gareth McCaughan
    Oct 23 '16 at 19:21
  • $\begingroup$ Are the spaces in between some of the numbers(such as{space}16 ... ) intentional? $\endgroup$ Oct 23 '16 at 20:20

Your roommate is going to ...

study cryptography at London Public Library at 11:00 am on Monday, 24 October 2016.

The first step to decoding is ...

... to observe that all three-digit numbers end in 1. Further, there are suspiciously many 5s and some 4s in the ones place of the first few numbers. This suggests that all numbers are written backwards. For example, the first message now reads: 80.93. 132.146.134.

The distribution suggests that each number is an ASCII code. For example, numbers are in the range from 48 to 57; Capital letters are 65 to 90 and small letters are 97 to 122. However, valid ASCII letters only go up to 127 and many numbers exceed that.

The spaces in the code, which appear after some dots, look like actual spaces in the message.

The next step is ...

... to find out a possible offset to the ASCII code. We can use the notes for that. The first message should probably include the words "swimming" or "Bob". The only three-letter word that could be "Bob" is the last word, 132.146.134. The first and last letters aren't the same here; they differ by two and are two positions apart. Likewise, the long word could be swimming, but where the double m should be, we find the letters 134.135. They are adjacent and differ by 1.

This suggests that the offset is changed by one for every letter. When i is the zero-based index of a number ni, the corresponding character ci is:

      ci = ascii(nii)

When we try that and start with an offset of 0, the messages read:

10/17/2016 10:00 AM going swimming with bob
10/19/2016 6:00 PM Meet Thomas and Janet for pizza at Oliver's
10/22/2016 8:00 AM going hiking with Alice in Sherwood Forest
10/24/2016 11:00 AM study cryptography at London Public Library

  • $\begingroup$ good job! I was experimenting with writing a program to encode and decode these. the first one I made was too complex. this one was a little easier and you figured it out. maybe later I'll post the code to a plnkr. $\endgroup$
    – jmbmage
    Oct 24 '16 at 11:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.