From the people behind the MathsBombe Competition.

# Solutions

• ## Question 1

This is an example of a so-called transposition cipher, where the letters in the cipher are the same as those in the plaintext, but in a different order. Here, each adjacent pair of letters in each word of the cipher are transposed, to give the plaintext
What is the name for a triangle in which all three sides have different lengths?
The answer to this question is a scalene triangle.
• ## Question 2

In each picture, each finger and the thumb is either extended or closed. This forms a binary number code, in which an extended finger means "1" and a closed finger means "0".

The binary number is formed by adding 1 if the thumb is extended, 2 if the first finger is extended, 4 if the middle finger is extended, 8 if the middle finger is extended, and 16 if the little finger is extended. For example, in the top left image, the thumb, fourth and little finger are extended, giving a sum 1+8+16 = 25. This corresponds to the 25th letter of the alphabet, "Y". Continuing this, reading from left to right, and top to bottom, gives the plaintext

You have three times as many apples as me. Between us, we have more then ten and less than twenty apples. How many apples do I have?

For each apple I have, you have three, so the total number of apples is a multiple of 4. The multiples of 4 that are more than ten and less than twenty are 12 (in which case I have 3 apples and you have 9), and 16 (in which case I have 4 apples and you have 12).

The hint to work out which of these is the answer is in the question: the answer is a little odd. This means that the answer is three.

• ## Question 3

This is a classic substitution cipher: each letter in the cipher represents another in the plaintext. A good place to start decoding is the single letter words "b" and "t", which must correspond to the single letter words "a" and "I" in English, though we don't immediately know which way round. Examination of two and three letter words suggests that "vku" likely represents "the", and so on. With a bit of experimentation, we find the plaintext

I am walking along a beach trailing a stick behind me to mark out lines. I walk 6 metres north, then 2 metres west, 5 metres east, 6 metres south, 3 metres east, 6 metres north, 4 metres east, 3 metres south, 3 metres west, 3 metres north, 6 metres south, 3 metres north, 4.24 metres southeast, 3 metres east, 1 metre west, 6 metres north, 1 metre west, 3 metres east, 6 metres south, 6 metres north, 6.49 metres southsoutheast, 6 metres north, 4 metres east, 3 metres west, 6 metres south, 3 metres east, 3 metres north and 1 metre west. What is the name that I have written in the sand?

Following the instructions, we trace out the letters:

The solution is therefore Turing.

• ## Question 4

As the message and picture hint, this is a Rail fence cipher with four rails. The ciphertext is written in a zig-zag pattern on four lines ('rails'), revealing the plaintext:

 A l M s ... t n e s a e t ... r i a e n h e ... a v c ...
or
A train leaves Manchester at noon and travels at 100 miles per hour. Another train leaves London at noon and travels at 140 miles per hour. The trains pass each other at 12:50. How far is it from Manchester to London?
In one hour, the distance travelled by both trains in total is 240 miles, or 4 miles per minute. In 50 minutes, the total distance covered by both trains is therefore 200 miles, giving the answer 200.

• ## Question 5

With the text playing fair, the question hints that this is a Playfair cipher. Such a cipher requires a secret key, in this case the letters HAVEFUN. The plaintext, with punctuation added, is

A group of friends are calculating statistics based on their ages. "The mode of our ages is fifteen," said Mike. "The median is sixteen," added Ellie. "Ahem, I rather skew the mean," said Barquith, "it's thirty-six". "Well, I'm fifty years younger than you," laughed Hope. "You're being very quiet," said Ellie to Darcie. "Shh," replied Darcie, "I'm trying to work out how old Barquith actually is." How old is Barquith?
• Let $M$, $E$, $B$, $H$, $D$ represent the ages of Mike, Ellie, Barquith, Hope and Darcie, respectively. Hope's statement tells us that $$B = H+50$$ and Barquith's statement about the mean tells us that $$\frac{1}{5} ( M + E + B + H + D) = 36.$$ Combining these and rearranging to find $B$, we find $$B = \frac{230 - (M + E + D)}{2}.$$ Now, we are told that the mode of the ages (the most common age) is fifteen. This means that the at least two people must be fifteen. The median (age of the middle person when ranked in age order) is sixteen, which tells us that one is sixteen, although we don't know which of Mike, Ellie and Darcie this is. Either way, we have $$M + E + D = 15 + 15 + 16 = 46,$$ giving $$B = \frac{230 - 46}{2} = 92.$$

• ## Question 6

In this code, each note corresponds to a letter. Each letter can be represented by more than one symbol, however, making the code polyalphabetic. The musical letters A, B, C, D, E, F, G correspond to the shortest duration notes in the music (semi-quavers). The accidentals (sharp and flat symbols) are used to change the letter up or down by one. All symbols used are shown in the image below.

The rests in the music can correspond to breaks between words, but they are also used when needed so that each bar has four beats. Using the code given above, the deciphered message is:

What is the total number of gifts given to my true love for Christmas multiplied by the cube root of the number of sides of a chiliagon?

As you may, or may not, know the number of gifts given on each day of the song is a sequence known as the tetrahedral numbers, which are formed by summing the triangular numbers. After twelve days the total number of gifts given is 364. A chiliagon is polygon with 1000 sides and the cube root of 1000 is 10. The final answer is then 364 × 10, which is 3640.

Alan Turing Cryptography Competition 2021 is organised by the The Department of Mathematics at The University of Manchester.