# Double time

Crack this code which depends on taking pairs of letters and using
two simultaneous relations and modulus arithmetic to encode the
message.

To encode the following message the text was first written as
pairs of letters ignoring the spaces between the words. For example
John Brown would be written jo hn br ow nz where the z is added
because there are an odd number of letters.

The letters of the alphabet are numbered $a=0,\ b=1,\ {\rm
to}\ z=25$ and each pair of letters is replaced by a pair of
numbers. There are $26\times 26=676$ pairs of numbers. It is
possible to store the codes for all 676 pairs and look them up as
needed but much more efficient to use a decyphering formula.

Each pair of numbers $(\alpha, \beta)$ is encoded as another
pair of numbers $(\alpha',\beta')$ where $$\alpha' = \alpha +
3\beta \pmod {26}$$ $$\beta' = 5\beta \ \ \pmod{26}$$
Find $\alpha$ and $\beta$ in terms of $\alpha'$ and $\beta'$ and
hence decode the following quotation which is a remark made by
Einstein:

dj lb rn qm bu ao hd eo kr ia cs ud rx cm qo bn fr ld ek th ys
wm

Take each pair. Apply the decoding formulae. You will need to find the equivalent of 1/5, that is the multiplicative inverse of 5 modulo 26 (the number by which 5 is multiplied to give 1 modulo 26). Finally arrange the 44 letters into words putting the gaps in the appropriate places.

This solution comes from Andrei from School No. 205,
Bucharest, Romania.

To solve this problem I followed the following steps:

- associating to the letters of the alphabet numbers between 0
and 25, I transformed the coded message into a set of pairs of
numbers $(\alpha',\beta')$

- I solved the system of equations for $(\alpha,\beta)$ in
terms of $(\alpha',\beta')$.

- I used the same association as in the first step, and I
transformed the set of numbers $(\alpha, \beta)$ into letters, and
I found the message.

a | b | c | d | e | f | g | h | i | j | k | l | m | n | o | p | q | r | s | t | u | v | w | x | y | z |

0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 |

For each pair of numbers $(\alpha', \beta')$ I have to solve
the system to determine $(\alpha, \beta)$ $$ \alpha'= \alpha +
3\beta\pmod {26}\quad (1) $$ $$\beta' = 5\beta \quad \pmod{26}\quad
(2)$$

I start from the last equation: $$\beta = {1\over 5}\beta'
\pmod{26}$$ To determine 1/5 (mod 26), I first constructed the
table of multiplication for 5 (mod 26) to see where I obtain 1. As
21 multiplied by 5 gives 1 (mod 26) it follows that 1/5 (mod 26) is
21. This means: $$\beta = 21\beta' \pmod{26}\quad (3)$$ and for
$\alpha$ I obtained successively $$\alpha = \alpha'-3\beta =
\alpha'-3\times 21\beta' = \alpha' - 11\beta' \pmod{26} $$ that is
$$\alpha = \alpha' +15\beta' \pmod{26} \quad (4).$$ Now, the
sequence of numbers $(\alpha', \beta')$ is transformed by equations
(3) and (4) into the sequence $(\alpha,\beta)$

$C$ | $\alpha'$ | $\beta'$ | $\alpha$ | $\beta$ | $P$ |

dj | 3 | 9 | 8 | 7 | ih |

lb | 11 | 1 | 0 | 21 | av |

rn | 17 | 13 | 4 | 13 | en |

qm | 16 | 12 | 14 | 18 | os |

bu | 1 | 20 | 15 | 4 | pe |

ao | 0 | 14 | 2 | 8 | gi |

hd | 7 | 3 | 0 | 11 | al |

eo | 4 | 14 | 6 | 8 | gi |

kr | 10 | 17 | 5 | 19 | ft |

ia | 8 | 0 | 8 | 0 | ia |

cs | 2 | 18 | 12 | 14 | mo |

ud | 20 | 3 | 13 | 11 | nl |

rx | 17 | 23 | 24 | 15 | yp |

cm | 2 | 12 | 0 | 18 | as |

qo | 16 | 14 | 18 | 8 | si |

bn | 1 | 13 | 14 | 13 | on |

fr | 5 | 17 | 0 | 19 | at |

ld | 11 | 3 | 4 | 11 | el |

ek | 4 | 10 | 24 | 2 | yc |

th | 19 | 7 | 20 | 17 | ur |

ys | 24 | 18 | 8 | 14 | io |

wm | 22 | 12 | 20 | 18 | us |

The message could be read as the quotation from Einstein
talking about himself as a mathematician:'I have no special gift. I
am only passionately curious'.

This is another exercise in re-arranging formulae involving modulus
arithmetic and it illustrates another type of coding system.
Alternatively the pairs $(\alpha, \beta)$ can also be treated as
vectors and matrix algebra used to encode and decode the messages.
Another alternative is to use an encryption formula based on the
numbers 0 to 675 which represent the letter pairs.