To find
V | V | H | Z | K | U | H | R | G | F | H | G | K | D |
|
|
||||
V | V | H | Z | K | U | H | R | G | F | H | G | K | D | K | I | T |
|
|
By repeating this process for a number of displacements, we obtain Table 2.2:
Table 2.2 Number of character coincidences corresponding to displacement
Displacement | Number of coincidences |
---|---|
1 | 4 |
2 | 4 |
3 | 9 |
4 | 12 |
5 | 5 |
6 | 2 |
7 | 7 |
8 | 7 |
From our results, the maximum number of occurrences appears for a displacement of 4. Since we know the maximum displacement occurs for a scalar multiple of the period, the period is likely either 2 or 4.
Remark
In applying the second principle, we are using a probabilistic argument. That is, in the above example, we cannot be certain that the period is either 2 or 4; however, we can say with high probability that it is likely to be either 2 or 4. If we were unable to decipher the text with a keyword length of 2 or 4, we would then try with the next highest number of coincidences, which occurs for displacement 3.
Finding the keyword
Now that we know how to find
We will first try the case where the period is 4, and we will determine the character frequencies for the {
from which we obtain the following table of frequencies:
A | B | C | D | E | F | G | H | I | J | K | L | M |
1 | 0 | 2 | 3 | 1 | 0 |