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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Appendix<br />

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

Chapter 2<br />

M1 Identical letters in substitution alphabets<br />

This, <strong>the</strong> problem of <strong>the</strong> number of derangements of <strong>the</strong> elements of a set,<br />

follows as a special case of what is known both as <strong>the</strong> classical sieve formula<br />

<strong>and</strong> as <strong>the</strong> inclusion <strong>and</strong> exclusion principle, proofs of which can be found in<br />

books on combinatorics such as [2.6]. The sieve formula tells us that <strong>the</strong><br />

fraction of <strong>the</strong> number of permutations of <strong>the</strong> numbers (1, 2, ..., n) which<br />

are such that no number is in its ‘correct’ position, i.e. of derangements of<br />

n numbers, is<br />

1 1 1 1 1 1<br />

� � � � � �••• for (n�1) terms<br />

1 1! 2! 3! 4! 5!<br />

<strong>and</strong> this fraction rapidly converges to <strong>the</strong> value 0.3678... which is <strong>the</strong><br />

reciprocal of <strong>the</strong> number e, for those familiar with natural logarithms. For<br />

n�0 to 6 <strong>the</strong> fractions have <strong>the</strong> values to three decimal places 1, 0, 0.5,<br />

0.333, 0.375, 0.367, <strong>and</strong> 0.368. Thus <strong>the</strong> fraction is virtually <strong>the</strong> same in<br />

practical terms for values of n greater than 5. This means that a permutation<br />

alphabet on 26 letters has approximately a 37% chance of having no<br />

letter in its ‘correct’ place <strong>and</strong> hence a 63% chance of having at least one<br />

letter in its original position.<br />

M2 Reciprocal alphabets weaken security<br />

We can choose <strong>the</strong> first pair of letters in<br />

[190]<br />

26�25<br />

2

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

Saved successfully!

Ooh no, something went wrong!