30.11.2012 Views

Code and ciphers: Julius Caesar, the Enigma and the internet

Code and ciphers: Julius Caesar, the Enigma and the internet

Code and ciphers: Julius Caesar, the Enigma and the internet

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

ways, since choosing to pair, say, A <strong>and</strong> W is <strong>the</strong> same as choosing to pair W<br />

<strong>and</strong> A. Similarly <strong>the</strong> second pair can be chosen in<br />

24�23<br />

2<br />

ways, <strong>and</strong> so on. There would <strong>the</strong>refore seem to be<br />

26�25�24�23�•••�4�3�2�1<br />

2�2�•••�2�2<br />

ways of forming reciprocal alphabets but this is not so, for we can rearrange<br />

<strong>the</strong> 13 pairs in any order without changing <strong>the</strong> substitution<br />

alphabet. For example, if we choose to pair A <strong>and</strong> W <strong>and</strong> <strong>the</strong>n to pair B <strong>and</strong><br />

K we would get exactly <strong>the</strong> same result as if we first paired B <strong>and</strong> K <strong>and</strong><br />

<strong>the</strong>n paired A <strong>and</strong> W. We must <strong>the</strong>refore reduce <strong>the</strong> number above by <strong>the</strong><br />

factor<br />

13!�13�12�11�•••�2�1<br />

which is greater than 6227 000 000 <strong>and</strong> since <strong>the</strong> 13 factors of 2 in <strong>the</strong><br />

denominator above provide a fur<strong>the</strong>r factor of 8192 we see that we have<br />

reduced <strong>the</strong> number of substitution alphabets by a factor of more than<br />

50 000 000 000 000. Overall this means that <strong>the</strong> number of possible substitution<br />

alphabets is reduced from more than 10 to <strong>the</strong> 26th power to<br />

fewer than 10 to <strong>the</strong> 13th power.<br />

It may seem strange, but it is better not to pair all of <strong>the</strong> 26 letters; <strong>the</strong><br />

number of possibilities is increased if only 22 are paired <strong>and</strong> <strong>the</strong> o<strong>the</strong>r 4<br />

letters left unchanged. This is because <strong>the</strong> number of possibilities if we<br />

pair 2k letters <strong>and</strong> leave (26�2k) unchanged is<br />

(26!)<br />

(k!)((2n � 2k)!)2 k<br />

Ma<strong>the</strong>matical aspects 191<br />

<strong>and</strong> this reaches a maximum at k�11. Whilst this fact is not important for<br />

simple substitution <strong>ciphers</strong> it is of significance in <strong>the</strong> context of <strong>the</strong><br />

number of pairings on <strong>the</strong> <strong>Enigma</strong> plugboards, as we shall see in Chapter<br />

9.<br />

M3 The birthdays paradox<br />

The probability that two people chosen at r<strong>and</strong>om have <strong>the</strong> same birthday<br />

is 1/365. We ignore leap years, which have no significant effect on <strong>the</strong><br />

result.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!