# Simanaitis Says

On cars, old, new and future; science & technology; vintage airplanes, computer flight simulation of them; Sherlockiana; our English language; travel; and other stuff

# ARITHMETIC CAN BE MOD

MODULAR ARITHMETIC made a brief appearance in “Edo Toggles and Models”: In particular, 2010 was a Year of the Tiger. What’s more, modular arithmetic shows up on clock faces, in many areas of mathematics, banking, music theory, cryptography and economics.

Clock faces are a familiar example: Four hours past 11 a.m. isn’t 15 a.m., it’s 3 p.m. Time-keeping on a 12-hour clock follows a repeated pattern of length 12. Said another way, it’s “mathematics mod 12.”

Mathematically in our example, 15 is “congruent to” 3 mod 12.

Another way of stating this is that if we divide 15 by the modular base 12, we get a remainder 3.

The cool part is this also works with problems that can’t be done at a glance: What’s 37 hours past 4 p.m.? Divide 4 + 37 = 41 by 12, get quotient 3 and remainder 5. Thus, it’ll be 5 a.m., two calendar days later.

Modularity solves the a.m./p.m. and day quandary as well, albeit not as slickly: The quotient 3 being an odd number dictates a switch of a.m./p.m. Because there are 24 hours in a day, three trips around the clock face puts us a day and a half from the starting point, thus two calendar days past our afternoon starting point.

The zodiac calendar admits mod 12 games as well.

The year 2015 is the Year of the Sheep. Not just because a Chinese restaurant menu says so, but because 2015 is congruent to 11 mod 12. That is, divide 2015 by 12, and the remainder is 11.

Neat, eh?

Mod systems have lots of familiar mathematical properties. As an example, consider the set of numbers mod 5: Everyday arithmetic works in its own little mod 5 world of 0, 1, 2, 3 and 4, albeit with some odd-looking answers: 3 + 4 = 2, 4 x 4 = 1. In studies of algebra, numbers mod n with addition form what’s termed an abelian group. (It’s named for Norwegian mathematician Niels Henrik Abel, 1802 – 1829, who, like Nicholas Otto, gets the honor of his invention often losing its upper-case name.)

Include multiplication, as with our mod 5 example, and it’s a commutative ring. In fact, given that 5 is a prime number, it’s possible to extend the idea of division and get what’s termed a field. Group theory, ring theory and field theory have applications a’plenty in other areas of math as well as in cryptography and economics (in game theory).

Our traditional musical scale of twelve-tone equal temperament, as demonstrated by Bach’s The Well-Tempered Clavier, is arithmetic mod 12, albeit in Every Good Boy Does Fine/FACE disguise. An example of this is C-sharp being the same as D-flat. (In researching this, I also encountered Elvis’s Guitar Broke Down Friday.)

The banking example is a bit more obscure (and tedious): International Bank Account Numbers, IBANS, use mod 97 to catch user input errors.

Here’s an elegant little problem—and solution—in the mathematics of number theory, offered by Ben Green in The Princeton Companion to Mathematics : Is there any number whose square ends with a 7?

Listing the first few squares, 1, 4, 9, 16, 25, 36, suggests maybe not. Do a few more, and the final digits 1, 4, 5, 6, 9 and 0 keep popping up. However, “Maybe not” is not mathematical proof.

But arithmetic mod 10 offers one. Because our number system is base-10, any whole number n can be represented as 10q + r. Then n2 = (10q + r)2 = 100 q2 + 20qr + r2 = 10 (10q2 +2r) + r2. (With homage to Mrs. Grimbly’s junior-high algebra.)

That is, any square n2 has a final digit r2, which eliminates any 7. As a gift, our proof also eliminates any 2, 3 or 8. The only possible final digits of a square are 1, 4, 9, 6, 5, 6, 9, 4, 1 or 0, in that order of repetition.

To think that all this started with a netsuke and the Year of the Tiger! ds