My queston is "Distances between identical strings in a long Vigenere ciphertext are 18, 30, 12, 12, 18. What is the likely key length"?
I'm looking in the book and it has a similar problem that says (12,60,66,87,108 and 120)=3. That the likely ciphertext key length is 3. But I can't figure out how they determined that it equals 3?
Take the greatest common divisor of these numbers. To explain this a bit more...
Some $\textit{trigrams}$, meaning strings of 3 letters, in the English Language appear more frequently than others on average. For example;
\begin{equation} ING \quad THE \quad AND \end{equation}
So for the text that has been enchiphered using Vigenere, you would normally expect to see these trigrams appear more frequently; there is greater likelihood that these letters will be encoded by the same part of the key word.
That being said, the distances that you were given happen to be the parts of the text where the keyword and the trigram appear to 'line up'. Taking the greatest common divisor of these distances gives a reasonable estimate for the length of the keyword.
(The same reasoning can be generalised for any '$n$-gram').