Thursday, December 21, 2006

By Popular Demand: A Math Trick

Roopak asked about a math trick I'd used when I faciliated a Retrospective that he was a part of. Hinckley, and other University of Waterloo students (among others) will recognize the following as casting out 9's. If pressed, I might be able to dredge up the formal proof for why this works, but for now just trust me, try it out, and amaze your friends (especially if they're not math whizzes).

The Trick

Get your audience to write out a several-digit long number on a piece of paper, such that only they can see it (or least, you can't). One way to make this easy - because, believe it or not, some people will actually struggle with coming up with a suitable number, when put on the spot - is to ask each person to write down their phone number. But any reasonable 6- to 10-digit number will work quite well.

Next, instruct each person to circle any non-zero digit in their number. Ask them to then add up the sum of the digits, excluding the circled one, and write that total down below their number. One of the things that often makes this trick go south is that a shocking number of people can't do this without making a mistake. All you can do, as Mr Magic Trick Guy or Gal, is suggest that they double-check their math, and maybe even have two people sitting side-by-side check each other's. Or just cross your fingers and hope for the best.

With equal care and trepidation, ask each participant to subtract the sum that they wrote below their original number, from the original number. Stress that they're including the circled digit in their original number when they calculate this difference. I've found that doing a sample number of your own, along with them, on a whiteboard or sheet of paper that everyone can see, can help enormously. Some folks just relate better to visual examples than verbal ones.

Finally, have them take the new number, which is their original number minus the sum of its digits excluding the circled digit, and add up those digits! Yet another opportunity for them to screw it up, so more encouragement to carefully check their work would not be unreasonable.

Now have each say what their final sum was and you'll tell them what digit they circled. In order for you to know what digit they circled way back in their original number, which clearly you have no way to have seen since the whole operation has been carefully concealed from you, all you have to do is take their value, and modulus 9 it. In case that's Greek to you: divide their answer by 9 and take the remainder. The less mathematically-challenged among you will now recognize why there's the stipulation that the circled digit be non-zero, since both digits 0 and 9 come out to 0 after being mod 9'd, and therefore you wouldn't know if they circled a 0 or a 9 (kind of ruining the trick if you guessed wrong, which you would, 50% of the time).

I'll provide an example down below, in case any of the above was unclear. But first, here are some observations from my decades (since 1982) of doing this trick.

As mentioned repeatedly above, people often can't add or subtract without making mistakes. And it's not like I've never screwed up an addition or subtraction my own evil self, but given the chance to double-check my work, it's pretty uncommon. But virtually anytime I've done this trick for more than a couple people at a time, someone in the group has fucked up the math and made it look like the trick failed. I can see Hinckley shaking his head in disgust as he reads that last sentence, because you can't get math to not work. And yet people do, at least as far as they're concerned. (And sure enough, in the session Roopak was in, with about 10 or so people, one or two did the math wrong.) So anything you can do to help them not fail these Grade 3 math activities, you should do. For the sake of your reputation, if not theirs!

In keeping with the above, you may be tempted to have them just use 3- or 4-digit numbers to start with, since it's less adding and subtracting to do, and thus less likely to result in errors. The problem with this approach, as you may discover if you try it, is that some or all of the results may be single digit answers that are the missing digit itself! In other words, the person may give you an answer like "8" and you'll say, "the missing digit is 8!" such that it seems more like a mathematical oddity than a magic trick by you! You really want their total of the digits at the end to be 10 or more, because most people won't deduce a relationship like "mod 9 results". Hinckley'd spot it in a second, but I'm talking about humans here.

And finally, you may run into someone who doesn't see mod 9 but does pick up on the fact that, as they see it, "you're just adding the digits of the answer together!" Since 10 mod 9 yields 1, and 11 mod 9 yields 2, and so on, it may be just enough of a pattern to make them see it. Of course, at that point you can ask them to prove why it works, but it's a better trick if no one notices the pattern.

So here's an example, as promised. My number is 5551234, and I'm going to choose to circle one of the 3 5's, thinking that choice might just trick the magician (don't ask me where people get these ideas; I just work here!)

I write 5551234, then circle the 3rd 5, and add up the remaining 6 digits to get
a total of 20.

5551234 - 20 = 5551214

Then I add up those 7 digits, and get 23. 23 mod 9 is 5 (or 23 divided by 9 is 2, with 5 left over). I can therefore confidently announce that 5 was the circled digit and be right (I have no way of knowing the original number had 3 5's, nor would I care).

I've done this trick maybe 15 or 20 times in my life, and it always impresses a least a few of the intended rubes. In fact, it's the reason Vicki married me! (Not true, but it would explain a few things...)

2 comments:

Anonymous said...

LOL! I love this trick...currently my 6 year old is absolutely blown away when I pull a quarter from behind his ear. He has absolutely no clue how it's done..and everytime he asks me to explain it, I simply say, "A magician never reveals his tricks." This trick, however, should actually make me a star on Christmas day when the in-laws come over.

I've seen a similar trick done on a David Copperfield special..he picks the number of people AT HOME! I figured it out quite quickly, which surprised me. I'm no Hinckley, but I remember a day when Math was a close chum of mine

Anonymous said...

I meant that he goes through a trick where the people at home go through a series of instructions, coming out with a number (presumably completely independent of every other humanoid watching)..and he magically picks the number you, the viewer, came up with.

I did NOT mean that he simply picks the number of people watching his show.