Subscribe to Computing Intelligence

Tuesday, June 8, 2010

Solution to Puzzle Number 12: The Unpopular Code

So it turns out that code-breaking is not the most popular activity among my readers; Puzzle 12 was the first puzzle for which I received no solutions. For anyone who was curious about the code, though, the solution is as follows.

Messages were encoded according to the following steps:
1.) For all letters, convert to a number according to the alphabetic position (A -> 1, B -> 2, etc.)
2.) Subtract 12 from each number
3.) If a resulting number is less than or equal to zero, subtract one more (this gets rid of any zeros)
4.) Convert all positive numbers to their alphabetic equivalent (1 -> A, 2 -> B, etc.)
5.) For all negative numbers, take the absolute value and convert that to their alphabetic equivalent. Follow the letter with a (pseudo*)random integer.

Thus, the encoded message HH8L9, H1L9FA9 F4FH8M, E1CH can be decoded as follows:
H -> 8, 8+12 = 20 -> T
H8 -> -8, -8+13 = 5 -> E
L9 -> -12, -12+13 = 1 -> A
and so on, to reveal the original message TEA, EARL GREY, HOT

Since I had decided to make the category classic science fiction film and television, I went with the two messages that are most iconic in my mind of the genre:

Message 1
SPACE: THE FINAL FRONTIER. THESE ARE THE VOYAGES OF THE STARSHIP ENTERPRISE. ITS FIVE-YEAR MISSION: TO EXPLORE STRANGE NEW WORLDS, TO SEEK OUT NEW LIFE AND NEW CIVILIZATIONS, TO BOLDLY GO WHERE NO MAN HAS GONE BEFORE.

Message 2
A LONG TIME AGO IN A GALAXY FAR, FAR AWAY... STAR WARS

0 comments: