Tuesday, January 5, 2010

Cryptology

In December we studied codes and properties of the English language. The kids worked in two "competing" groups.

Group 1 came up with this message:

HI STANLEY I LIKE PIZZA THIS CODE IS EASY.

They encoded their message with the classic Caesar Cipher (where each letter is shifted 3, so instead of A we write D, instead of B we write E, and so on). The coded message was:

KL VWDQOHB L OLNH SLCCD WKLV FRGH LV HDVB.

Group 2 broke the code by recognizing that "HI" is a very good word for starting a message, and then seeing that the whole alphabet had been shifted by three characters.

Then Group 2 came up with a message:

HELLO PEOPLE OF EARTH,
THE SKELETAL DEVIL HAS COME OUT OF THE EARTH, FOR I PROSPERO THE MAGICIAN HAVE LET HIM OUT! FOR LUNCH.
P.S. HE WANTS TO EAT YOU ALL.

They encoded this by a random letter substitution, so the coded message was

WEUUI NEINUE IX EGHVW,
VWE YLEUEVGU TERBU WGY QIDE IFV IX VWE EGHVW XIH B NHIYNEHI VWE DGPBQBGZ WGRE UEV WBD IFV XIH UFZQW NY WE KGZVY VI EGV OIF GUU!

Group 1 broke the code using some useful properties of the English language. They knew B should mean either A or I, since those are the only valid one-letter words in English. They also figured out that VWE was THE, since THE is one of the most commonly occurring three-letter words in English. Since the alphabet was all mixed up instead of shifted, this code was pretty tricky to break.

Along the way, I had the kids pick storybooks they were reading and count how many times different letters occurred. This gave everyone a feeling for how common different letters are. For example, T and E show up all the time, but J and Z and Q hardly show up at all. This can be useful in cracking a code - the most frequently occurring symbol probably doesn't mean Z, unless the message is about pizza!

No comments:

Post a Comment