06.01.2015 Views

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

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

8.2. THE MEASURE OF ROUGHNESS 139<br />

Interestingly, we all know the device that measures the opposite: if numbers<br />

are not spread out, they are all close to average. In mathematics we tend to<br />

use mean and average interchangeably, and, <strong>of</strong> course,<br />

sum <strong>of</strong> the numbers<br />

average = mean =<br />

number <strong>of</strong> numbers .<br />

Since each <strong>of</strong> the sets in our example contain 4 numbers that sum to 12, each<br />

has a mean or average <strong>of</strong> 3. This gives us an idea <strong>of</strong> how to measure roughness:<br />

a set <strong>of</strong> numbers is rougher when it contains many numbers that are far from<br />

the mean. So we might try to define roughness by “sum how far the numbers<br />

are from their mean.” How far implies distance which implies subtraction. But<br />

it also implies that 5 and 1 are both a distance <strong>of</strong> 2 from 3, no matter that<br />

one is larger than 3 and one is smaller. So we cannot use simple subtraction to<br />

measure distance (5 − 3 = +2 but 1 − 3 = −2) but would have to use absolute<br />

value ((|5−3| = +2 and |1−3| = +2). Unfortunately, as a mathematical device,<br />

absolute value is somewhat <strong>of</strong> a pain to work with.<br />

What is traditionally chosen instead is to square the result (as the square<br />

<strong>of</strong> a number is positive). This gives us our second attempt at a definition<br />

for roughness: “the sum <strong>of</strong> the squares <strong>of</strong> the distances from the mean.” For<br />

example, the middle set <strong>of</strong> numbers then would have roughness<br />

(4 − 3) 2 + (0 − 3) 2 + (4 − 3) 2 + (4 − 3) 2 = 1 1 + 3 2 + 1 2 + 1 2 = 1 + 9 + 1 + 1 = 11,<br />

while the final set would have roughness 18. (Check this!)<br />

While this agrees with our intuition that the final set is rougher than the<br />

middle one, the definition is not quite right yet. The sets {103, 103, 103, 103},<br />

{104, 100, 104, 104} and {101, 104, 101, 106} created by adding 100 to our sets<br />

have 103 as their means and also would have roughness 0, 11 and 18. But it<br />

ought to be that an error <strong>of</strong> 2 is more forgivable when the target, the mean, is<br />

103 than when it is 3. So we must adjust for the sum. Since we are squaring<br />

the numbers, it makes sense to take the total sum into account by dividing by<br />

its square.<br />

We thus define what Sinkov calls the Measure <strong>of</strong> Roughness or M.R. 4<br />

to be<br />

M.R. =<br />

sum <strong>of</strong> the squares <strong>of</strong> the distances to the mean<br />

.<br />

square <strong>of</strong> the sum <strong>of</strong> the numbers<br />

The first set has roughness 0, since all <strong>of</strong> its numbers, and so its mean, are 3’s.<br />

For the second we compute:<br />

M.R. <strong>of</strong> {4, 0, 4, 4} = (4 − 3)2 + (0 − 3) 2 + (4 − 3) 2 + (4 − 3) 2<br />

12 2<br />

= 1 + 9 + 1 + 1<br />

144<br />

= .076.<br />

Check that you understand this by computing M.R. for the third set. 5<br />

4 For those with some statistics background, M.R. is very closely related to variance.<br />

5 .125.<br />

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

Saved successfully!

Ooh no, something went wrong!