Cryptology - Unofficial St. Mary's College of California Web Site
Cryptology - Unofficial St. Mary's College of California Web Site
Cryptology - Unofficial St. Mary's College of California Web Site
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
140 CHAPTER 8. POLYALPHABETIC CIPHERS<br />
Examples: Compute the mean and M.R. for each <strong>of</strong> the following sets.<br />
(1) {5, 9, 2, 10, 8}.<br />
The sum <strong>of</strong> the five numbers is 5 + 9 + 2 + 10 + 8 = 34, so their mean is<br />
34/5 = 6.8. The M.R. is<br />
(5 − 6.8) 2 + (9 − 6.8) 2 + (2 − 6.8) 2 + (10 − 6.8) 2 + (8 − 6.8) 2<br />
34 2 = 42.8<br />
1156<br />
or .037. (Our formulation <strong>of</strong> roughness will generally lead to small numbers.<br />
That’s ok: we are currently worried about relative degrees <strong>of</strong> roughness,<br />
rather than the meaning <strong>of</strong> the roughness measurement.)<br />
(2) {4, 11, 13, 8, 5, 7}. 6<br />
⋄ ⋄ ⋄ ⋄ ⋄ ⋄ ⋄ ⋄ ⋄ ⋄ ⋄ ⋄<br />
With roughness now understood, let us return to our goal: understanding<br />
frequency counts. What is the roughness <strong>of</strong> a frequency count Using the same<br />
notation as before, we have<br />
M.R. = (#A − x)2 + (#B − x) 2 + · · · + (#Z − x) 2<br />
N 2 ,<br />
where x = #A+#B+···+#Z<br />
26<br />
= N 26<br />
is the usual mathematical symbol for mean.<br />
Notice that if we multiply out the term contributed by A, we have<br />
(#A − x) 2 = #A 2 − 2#Ax + x 2 .<br />
Concentrating on the numerator <strong>of</strong> roughness, we have 26 similar terms, each<br />
with three parts. Summing the first parts gives<br />
#A 2 + #B 2 + · · · + #Z 2 .<br />
Summing the last part gives 26 copies <strong>of</strong> x 2 . But x = N/26, so these terms<br />
contribute<br />
( 2 N<br />
26x 2 = 26 =<br />
26) N 2<br />
26<br />
to the numerator. The middle terms are a bit more complicated, so we saved<br />
them for last:<br />
−2#Ax − 2#Bx − · · · − 2#Zx = −2x(#A + #B + · · · + #Z)<br />
= −2x(N)<br />
= −2 N 26 N<br />
= −2 N 2<br />
26<br />
6 The mean is 8 and M.R. = .026.