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.

Chapter 8<br />

8.1 (Recurrences of order 4)<br />

(i) Taking U 0 �U 1 �U 2 �U 3 �1 <strong>the</strong> recurrence<br />

U n �U (n�1) �U (n�4)<br />

produces <strong>the</strong> sequence<br />

1, 1, 1, 1, 0, 1, 0, 1, 1, 0, 0, 1, 0, 0, 0, 1, 1, 1, 1, ...<br />

which repeats after 15 terms but not before.<br />

(ii) With <strong>the</strong> same starting values <strong>the</strong> recurrence<br />

U n �U (n�1) �U (n�2) �U (n�3) �U (n�4)<br />

produces <strong>the</strong> sequence<br />

1, 1, 1, 1, 0, 1, 1, 1, 1, ...<br />

which repeats after only 5 terms.<br />

8.2 (Cycling in a mid-squares r<strong>and</strong>om number generator)<br />

Starting with X�7789 <strong>the</strong> sequence continues<br />

6685, 6892, 4996, 9600, 1600, 5600, 3600, 9600, ...<br />

a cycle of length 4.<br />

8.3 (Cycle lengths in linear congruences)<br />

(1) The congruence U n �3U (n�1) �7 (mod 19) beginning with U 0 �1 continues<br />

10, 18, 4, 19, 7, 9, 15, 14, 11, 2, 13, 8, 12, 5, 3, 16, 17, 1, ... .<br />

The cycle is of length 18 <strong>and</strong> is maximal since <strong>the</strong> value 6 cannot occur,<br />

because it produces a cycle of length 1.<br />

(2) The congruence U n �4U (n�1) �7 (mod 19) beginning with U 0 �1<br />

continues<br />

11, 13, 2, 15, 10, 9, 5, 8, 1, ....<br />

Solutions to problems 225<br />

The cycle length is 9 <strong>and</strong> is not maximal. No recurrence with multiplier 4<br />

is maximal when <strong>the</strong> modulus is 19.

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

Saved successfully!

Ooh no, something went wrong!