## Monday, February 20, 2006

### HOWTO: Multiplying integers near 100 quickly in your head

5 comments Posted by burton mackenzie at 12:23 AMThe last post along these lines demonstrated a 'trick' I learned for squaring integers near 50 in your head. I can't remember where I learned it, but now after a websearch for any other reference to that method, I am suspecting one of the Feynmann biographies I've read (but not "Genius") mentioned it.

This one, I thought of myself. Inspired by the other method, I idly thought "hey, I bet you can do something obvious and useful with numbers near 100!" I now present to you:**How to quickly multiply numbers near 100 in your head**

First, represent the multiplication of the two integers near 100 as (100 +/- x)*(100 +/- y); -9 <= (x|y) <= +9. To multiply these numbers together, you either have to do long hand multiplication, memorize ~361 combinations (I'm betting I only have about half that many multiplications memorized already, just from [0..12]*[0..12]), use my method, or possibly by addition in log space via memorized log tables (there aren't many of these people around anymore). (or, I suppose, or another method I've never heard of, if you want to be pedantic) We don't bother considering the case where you're using a calculator because that would make these whole optimizations moot, anyway. An abacus is also considered a calculator here, as well as a slide rule. Head only.

The double or triple digit multiplication gets reduced to a memorization, an addition/subtraction, and memorizing the tables of single digit multiplications (e.g. the stuff you learned in elementary school).

(100 +/- x)*(100 +/- y) = 10000 + 100 * (+/-x +/-y) +/- x*y

A beauty of this quick mental method is that the x & y values become the equivalent of vectors in the same reference frame and you can use your intuitive spacial relations skills to 'see' quicker-to-calculate cancellations (like x=-5,y=+5). As with the other method I mentioned, because you're adding successive (and smaller magnitude) terms to get the answer, you can quickly "ballpark" magnitudes and bark out a rough answer immediately. While everybody is reeling from your answer, looking up into their heads to try and figure out if you're right, you can slip in the successive approximations until you are at the final answer.

For example,

Other Person: real quick, what's 94 * 107?

You (thoughts): Both of those are near 100. 10000ish!

You (speaking): 10000ish. [elapsed time: 0.5 seconds]

OP: Uhhhh...[eyes rolling into head, thinking, not having actually known the answer ahead of time]...??

Y(t): 94 is -6 from 100, and 107 is +7 from 100. Addition leaves +1. 100.

Y(s): 10100 or so. [elapsed time: another second]

OP: [arches eyebrow]

Y(t): -6*7 = -42. 10100-42. 10058.

Y(s): 10058 exactly. [total elapsed time: 2.5 seconds]

OP: [unrolling eyes] Fudge off it's 10058.

OP: [looks around for calculator]

OP: [multiplies numbers]

OP: Oh.

And there you have it.

P.S. Oh, and in case you're wondering, no, I don't think this works on the ladies at a party. Please don't try it. It's probably only marginally more successful than a grown man doing magic tricks as a method of trying to pick up women, and buddy you're fooling yourself if you think that's working. This trick should only be used to impress other nerds.

Burton MacKenzie

## Thursday, February 16, 2006

Back in the day, scientists still needed to do lots of calculations, but they didn't have the nice fast processors of today. They had people with mechanical adding machines and pads of paper. The Memorized algorithmic simplifications were like specialized overclocking of the people (who were the computers for the time, making pre-calculated mathematical tables). Do you remember the trick to determine if an integer is divisible by 3? In the spirit of these "overclockings" that you can do to your own calculating brain, I present to you...**How to square integer numbers near 50 - in your head!**

I like this one so much because it so effectively demonstrates the value of optimizing the algorithm to do an equivalent calculation with less effort. It changes a multiply of medium-sized two digit numbers into a memorized constant, a single-digit integer multiplication (with 1, no less! :-), and your expected knowledge (grade school memorization) of the squares of single digit integers. That makes it **WAY** easier!

Here we'll define a "square integer near 50" as (50 +/- x)^2; -9 <= x <= +9. (i.e. 41*41, 42*42, ...58*58, 59*59)

(50 +/- x)^2 = (50 +/- x)*(50 +/- x) = 2500 +/- 100*x + x^2.

The final equation is really easy to perform in your head for x is a single digit.

For instance, let's say somebody asks you "Hey Burton, what's 47 squared?". You might think "Hey, my name's not Burton but he seems to be talking to me.", but then immediately after that you'll think "47 squared is 3 away from 50, so that means 47^2 = 2500 -3*100 + 9 = 2209. Damn that was fast! Thanks real guy named Burton!"

And to you I say "You're Welcome!".

Burton MacKenzie

Here's another mathematical shortcut. If you didn't already know it, I hope it saves you some time!

1. add the digits together.

2. if there is more than one digit in the sum and you are not sure if the sum is divisible by 3, just add the digits together again. This converges quickly to a number that is obviously divisible or not divisible by 3.

3. If the resultant sum is divisible by 3, the original integer is divisible by 3. If it isn't, neither is the original.

So there you have it.

Burton MacKenzie

This is a mathematical "trick" or shortcut I learned in grade school. Its purpose was to learn an algorithmic trick to multiply a single-digit integer by nine (9), and ostensibly the child would eventually memorize the multiplication table (for 9's, at least). Recently one close to me told me they had never heard of this trick, which shocked me! After I learned the trick, I never bothered to actually memorize the table. (oh, i know them all if i think about it, but i can actually do this calculation faster than i can remember the answer, so this is kinda "how" i memorized them) If this reaches one other person that doesn't already know this, typing it in has been worthwhile!

Anyway, it's really simple. If X is the single-digit integer multiplied by 9, the quotient's answer, represented in double-digits, is (D1=X-1)(D2=9-D1).

E.g. 5*9 = (d1=5-1=4)(d2=9-4=5)=45.

My brain even kicks this up a notch by, instead of thinking "what is 9-D1?", thinks "what, when added to D1 equals 9?". For some reason I find the latter slightly faster, mentally.

Burton MacKenzie

## Saturday, February 11, 2006

### Locating technological civilizations : Using Nuclear tests to find Christina Aguilera

1 comments Posted by burton mackenzie at 1:27 AMSince we first harnessed atomic energy until now, there have been at least 19 milestone nuclear explosions. Air tests were done between 1945 an 1980. That's 35 years of air test nuclear explosions on our planet.

We should use this for the SETI thing! Create an instrument that is optimized to pick up radiation in whatever spectral band(s) would be produced by the early technological types of nuclear explosions (as opposed to stellar ones). If we can pick this spectrum out against that of the star (e.g. the Earth outshines Sol in the RF band), we could be finding signs of life that are at (or rather, were when the light of their star left their system, which could have been millions of years ago) ...er...that are at the same rough technological expertise as we were then. It's a small window of opportunity, though. What's 35 years over 1,000,000? Not much. However, when you multiply the chance by the number of visible stars in our galaxy (200-400 million stars, not all visible to us), you get a goodly number to work with. Survey the sky at those frequencies for a few years, and there is a reasonable chance of us catching one. Maybe if the instrument in question were sensitive enough, we could resolve the same radiation in other galaxies - in which case the chance of finding one would be multiplied by the hundreds of billions of visible galaxies out there.

If we could find **any** evidence of intelligent life existing elsewhere in the universe, a crapload of research money would get diverted to finding ways to extrapolate more about these civilizations from any characteristics we can divine from the system's radiation. Perhaps we might find coherent signals we could decode. Do you think an alien a million years in the future might be interested in watching human television from the 1950s? Would they prefer the "Dick Van Dyke Show" in the 60s or "I Love Lucy" in the 50s? It is hard to think outside our human form to what alien television might be like, so instead think this: "would it be incredibly fascinating to see television from the ancient Egyptions, the Babylonians, the Neanderthals, the people crossing the Bering Land Bridge during an ice age? Damn straight it would! That would be **awesome**!" From this, I extrapolate that whatever form alien television might look like, I will probably be immensely interested in it, even if I can only begin to imagine it. Maybe I could get a "teaching" channel (like our local University TV station), HBO, or a Christina Aguilera video, except this time she'd have more tentacles. And I would be OK with that. So there you have it.

Burton MacKenzie

## Thursday, February 09, 2006

Of late, Chaitin's constant (fittingly represented by an Omega!) has been coming up in my reading material. It intrigued me when I first read about it, and I'm pretty sure I still don't grok it to my satisfaction.

The Wikipedia quick description of Chaitin's constant is "In the computer science subfield of algorithmic information theory the Chaitin constant or halting probability is a construction by Gregory Chaitin which describes the probability that a randomly generated program for a given model of computation or programming language will halt. It is usually denoted \\Omega. It is a normal and transcendental number which can be defined but cannot be computed. This means one can prove that there is no algorithm which produces the digits of \\Omega. The proof of \\Omega's uncomputability relies on an algorithm, which, given the first n digits of \\Omega, solves Turing's halting problem for programs of length up to n. Since the halting problem is undecidable, \\Omega can not be computed."

It struck me that, in a deterministic universe, this applies directly to us. (Oh hell, even in a deterministic universe that has "random" inputs [see Quantum Physics], in which case the deterministic universe is still unpredictable, and thus non-deterministic. At least from our perspective.) In such a universe we are (questionably ;-) intelligent machines that are running a "program". (Here's a leap of questionable logic) If we can equate ourselves as intelligent machines to Turing machines, then Chaitin's constant also describes **our** finiteness. Think about it. It is a mathematical way of saying "even if everything goes swimmingly well in your life, you're still finite and have an end."

Not only that, it is also incalcuable. Being incalcuable is another way of saying we cannot make an algorithm that can predict it. It is algorithmically random. So, not only do we come face to face with our own mortality in Chaitin's construction, we also must accept that the extent of our finiteness is unpredictable; inherently unknowable. I'm being tossed out of my deterministic universe and into one where finite beings can never have any hope in controlling their own destiny - they can only try to manage it.

On another aside, what does **cough** Free Will (tm) become in the face of confirmed unpredictability? Perhaps the royal Free Will (tm) reduces itself to Game Theory, where when playing in a game in which you are hopelessly outclassed, the best strategy for winning is to make decisions randomly. That feels very ironic. (Doubly so since people have been shown to be poor random number generators!)

Carlos Castaneda also talked about the differences between the Unknown and the Unknowable, but then again, he chowed down on Peyote.

I still don't think I'm seeing a full picture on this. Ogg finish blogging, then rub sticks together to make fire. Ogg thinks you should read this link, too.

Burton MacKenzie

## Saturday, February 04, 2006

You can multiply any two numbers between 6 and 10 on your fingers!

- Represent each finger numerically as 6, 7, 8, 9, and 10. (e.g. your thumb is 6, your forefinger is 7, your
*main finger*is 8, etc) - Cross the fingers representing the numbers you're multiplying on each hand, and do the same for all the numbers lower than them. (for example, if you're multiplying 7 x 8, cross the first three fingers of your right hand with the first two finger of your left hand)
- All the crossed fingers represent 10's. Add the number of crossed fingers.
- Multiply together the uncrossed fingers on each hand and add it to the sum of the crossed fingers (which represented 10's, remember)

So, if we're multiplying 7 x 8, you have two fingers crossed over three fingers. That is (2 + 3) x 10 = 50. The uncrossed fingers are multiplied and equal 3 x 2 = 6. The final solution is 50 + 6 = 56, which is the solution to 7 x 8. It's easier to do than it is to describe.

I have also proven that this works no matter how many fingers you have, as long as your hands are symmetric, and that your number base system is the same as the number of fingers you have. I'll update with the proof later, and maybe an illustrative picture.

Burton MacKenzie

## Thursday, February 02, 2006

Back in the summer of 2004, I was moving some boxes in my garage when I suddenly heard a loud hiss-type noise from over by my garbage can/bench. I looked up but didn't hear it anymore, so I assumed it was an insect. When I bent over, I heard it again. A few up/down cycles later I realized that I was just hearing an acoustic effect, with sound from out in the garden (the sprinkler) being amplified somewhere in the garage and directed back at my ear. Being the ever curious boy, I kept waving my head around in the air, following the sound closer and closer until I was just at the point of losing the signal. Since I can't see beside my head, I used my finger to find the source of the sound reflection.

Much to my giddy surprise, I found an actual paraboloid shape that was collecting sound and directing it out at a specific angle, with the path intersected by my ear. Witness my parabola! (you can click on the image for a large image)

I thought that was pretty cool.

Burton MacKenzie