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.

202<br />

appendix<br />

Verification<br />

If such a recurrence exists it takes <strong>the</strong> form<br />

U n �aU (n�1) �bU (n�2) �cU (n�3) .<br />

The data <strong>the</strong>n give <strong>the</strong> equations<br />

a � b � 0,<br />

b � c � 1,<br />

a � c � 0.<br />

Adding <strong>the</strong> first <strong>and</strong> second equations (mod 2) we get<br />

a�c�1<br />

which contradicts <strong>the</strong> third equation. The equations are <strong>the</strong>refore inconsistent<br />

<strong>and</strong> no solution of order 3 exists.<br />

M13 Generation of pseudo-r<strong>and</strong>om numbers<br />

In a typical application, such as where we require r<strong>and</strong>om numbers which<br />

are uniformly distributed over <strong>the</strong> interval [0, 1], <strong>the</strong> integers generated<br />

by <strong>the</strong> recurrence are divided by <strong>the</strong> modulus. The 16 integers in Example<br />

8.4 would thus be divided by 17 to give <strong>the</strong> following 16 pseudo-r<strong>and</strong>om<br />

numbers (to two decimal places):<br />

0.29, 0.12, 0.59, 0.00, 0.24, 0.94, 0.06, 0.41, 0.47, 0.65, 0.18, 0.76,<br />

0.53, 0.82, 0.71, 0.35.<br />

In realistic-sized applications it would be necessary to use a very large<br />

modulus <strong>and</strong>, even better, to utilise more than one linear recurrence <strong>and</strong><br />

<strong>the</strong>n combine <strong>the</strong> results in some way, to provide a less predictable set of<br />

values. For a useful discussion of <strong>the</strong>se matters, suggested sets of values<br />

for <strong>the</strong> modulus, multiplier <strong>and</strong> increment, as well as relevant computer<br />

programs, see Chapter 7 of [8.4].<br />

Chapter 9<br />

M14 Wheel wirings in <strong>the</strong> <strong>Enigma</strong><br />

The simple substitution alphabets provided by an <strong>Enigma</strong> wired wheel at<br />

eachof<strong>the</strong>26positionsofthatwheelcanberepresentedbya26�26matrix.<br />

The first column of <strong>the</strong> matrix shows <strong>the</strong> encipherment of <strong>the</strong> 26 letters at<br />

setting 1 of <strong>the</strong> wheel, <strong>the</strong> second column shows <strong>the</strong> encipherment of

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

Saved successfully!

Ooh no, something went wrong!