Sunday, April 30, 2006

Math - fun and dangerous

Warning: if you are going to attempt any of the mathematical games in this posting, the Mathematical Safety and Health Administration (that's MSHA, a division of OSHA) insists that you please use protective gear. Thank you.
Some time ago I wrote about the famous line (from a talking doll?) that "Math is hard" and the actual answer from St. Thomas Aquinas. Of course from him we have learned that math is easy as a subject, though perhaps at certain times for some of us, it can pose a challenge.

The interesting thing about math is that people have found math to be tedious even when they found it easy... and so people have been inventing tricks of one kind or another for ages, trying to get out of the work of doing the "chores" of mathematics. Fancy tools, like logarithms (which magically change multiplication into addition) or calculators (which magically change addition into button-pushing) and many other devices have been invented. (Did you know you can do addition with a calculator made from two strips of paper? No? I'll tell you how another day.)

Each tool to help us get our math jobs done, does have (as Mary Poppins explained) an "element of fun" but she did not explain that with magic there comes a degree of danger as well.

The single biggest danger we find in any particular tool is its finite or limited nature. A few years back everyone was scared because the year was going to end in all nines, and there was a suspicion that the famous Eetook Comet was going to crash into the earth. I wonder whether forty years from now, the media will attempt a similar fad, because in the computer, the year 2047 looks like this: 111 1111 1111. (Only zeros and ones in computers, remember?) which is quite a bit (hee hee) more scary than 1999, which looks like this: 111 1100 1111.

Anyway, the problem is that calculators and computers are limited in the representation of numbers. Usually humans are also limited, which may be some comfort to children because the teachers won't assign addition problems which will take a whole weekend to finish. (The reason? The teacher would have to use up a weekend to check it!)

It's funny because the typical human would find it very easy to add one to 99999999999999999999999999999999999999999999999 but there are not many calculators which can do that! Makes you feel a little superior to those chunks of silicon, ah, yes.

Well, here is something fun, which isn't quite the same kind of puzzle as my friend Ron at A Wing and a Prayer proposed. You might like to try it by hand, just because these particular numbers are so nice and special. But fortunately, this is not a dangerous one for the typical calculator, and as long as you have your goggles on, you can go ahead and try it.

Let's look at this very interesting six-digit number:
It's nice, isn't it? It has a very strange property, which makes it easy to check when you multiply it by 2 or 3 or 4 or 5 or 6. But I said we were going to do addition, not multiplication, so let's just add it to itself:

142857 + 142857 = 285714

Doesn't that number look familiar? Oh, yes! Just take the first two digits off the front and put them on the back. Wow. (remember 285714 is TWO TIMES 142857.)

Well, let's add in another:

285714 + 142857 = 428571

Oh, what happened that time? The four came around to the front, didn't it? Cool. (Remember 428571 is THREE TIMES 142857.)

So we'll do it again:

428571 + 142857 = 571428

OK, so we took the first three and moved them to the end. (Remember 571428 is FOUR TIMES 142857.)

And again:

571428 + 142857 = 714285

That time the seven moved to the front. (Remember 714285 is FIVE TIMES 142857.)

One more time:

714285 + 142857 = 857142

And now the 85 moved to the front. (Remember 857142 is SIX TIMES 142857.)

Well - what is going to happen next? This will be SEVEN times our starting number.... Oh, let's see:

857142 + 142857 = 999999

Oh dear, all those nines! Did we overflow? Is that the sign of the comet crashing into Earth? No, we did it by hand, so it must be right.

Those of us who have played with repeating decimals may recognize what is happening here - and maybe even contrive some other tricks like this. But as you can see, this number is fun, even if you do not know about the fraction called one seventh.

Actually fractions are one of the biggest dangers on calculators and computers. For one thing, because we must not divide by zero. For another, because the "representation" of numbers in a computer or calculator are almost always approximations unless they are "whole numbers" or integers. (The Latin word integer means "whole"!) Here is a test you can use to see how your machine behaves. Be sure to have your goggles and hard hat on when trying this.

1. Start with 1.
2. Divide by 3.
3. Multiply by 3.
4. Subtract 1.
5. Check: Do you have zero?

Note: If you don't, do not throw your calculator away! Do not call tech support! This is normal, and correct behavior, though it's not the mathematical answer. (Actually, if you get zero, it's probably broken, but you may still have some useful life left in it, so I would not advise getting rid of it just yet.)

There are other dangers - for example, what's the real cube root of negative one? - and perhaps I will explain them in the future, but for now you will just have to take the risks.

Please note: if you were reading this posting and hoped to find an explanation of Ron's puzzle, I will do that next time. Meanwhile, if you are really interested, be sure to look over my discussion on the question "What is purple and commutes?" which is at the end of this posting.


At 05 May, 2006 17:32, Blogger Ron Rolling said...

And I will link to it.

At 05 May, 2006 17:34, Blogger Ron Rolling said...

But I like your example more than the trick I was sent.

At 06 May, 2006 16:04, Blogger Mike Sheppard said...

Nice math tricks. For more examples of how math can be counter-intuitive I started my own math-related blog with each entry being an everyday example where intuition and mathematics collide.



Post a Comment

<< Home