Archive

Archive for October, 2009

On Mental Arithmetic

October 29th, 2009 No comments

So the other day one of my students came up to me in semi-awe asking me how its possible for me to do rapid multiplications in my head.  He's seen me do two digit and rarely three digit computations in my head, before I resort to using the calculator (I get lazy too!).  "In fact," he's asked me, "why don't you do all sorts of computations in your head without the use of electronic aids?"  He was implying of course that as a mathematician I should have a strange power to multiply numbers instantaneously and with no effort.  I chuckled.  If he only knew that in my years as a mathematician I seldom even see numbers or do arithmetic at all!  The tricks I know I've picked up by myself or invented them as I've needed them, particularly or especially when I'm teaching high schoolers and university students like himself (and the calculator not being within reach)!

I've become convinced that the most efficient way to multiply numbers instantaneously and with little effort is to simply memorize the lists of two, three, and even four digit multiplication tables.  Indeed, wouldn't it be a lot easier to just "know" that 1331 times 11 is 14,641, than to actually grab paper and pencil and physically do it (or use another method for mental calculation that requires considerable thinking)?  It is exactly this, after all, which we ask youngsters to do: memorize the multiplication tables of 2 through 9 (rarely up to 20), or the multiplication of two identical numbers (squares).  This can however become time-consuming; we don't want our children to spend their lives learning to immediately recall that 123 times 321 is 39,483.  Nevertheless, I bet my bottom dollar that this is exactly what some TV people do, including savants, who indeed may have additional powers of retention (as a photographic memory) and the intention and attention to do so: to "quickly" or instantaneously multiply any two (large) numbers (really, recall their product from memory than do any computation at all).

One is taught of course the usual algorithm to multiply two (any) numbers that involves putting the largest on top and the smallest on the bottom, then taking the units digit of the second number, multiplying through digit by digit and making sure to account for all carry digits, including a zero at the units position in the next row and doing the same with the second digit, etc etc.  This algorithm of course requires sparse knowledge, only the multiplication tables of 2 through 9.  However the tradeoff is that this method is a bit time consuming, and often requires paper and pencil.

But by the time a student comes to learning special products, one is not told "use these rules to multiply numbers more easily." One is instead introduced to the (very boring) topic of multinomials (usually binomials) and how we go about obtaining their product.  It is up to the student to smart up and think, "hey, this is immensely applicable to mental arithmetic, too," and few people can synthesize and apply such information solely on their own.  Usually one is never "told" that to multiply 17 times 23 one can imagine it as the binomial product of (10 + 7) and (20 + 3) and "FOIL" it in one's head, which is a lot easier to do than envision what one would do with paper and pencil following the usual algorithm (and having to keep track of the carry digits and the "shifted" rows, for example).  I can easily multiply 10 times 20 (two-hundred), 10 times 3 (thirty), 7 times 20 (one-forty), and 7 times 3 (twenty-one), and then add that up if I can retain those numbers to obtain 391 (which, incidentally, is exactly what we do with the usual paper-and-pencil algorithm anyway... except harder, and hence why we need paper and pencil: we split the second number into an addition of tens, hundreds, thousands, etc, then we distribute the first number on the explicit sum, and then sum!).  There are some binomial products that are easier to calculate mentally than others, case depending.  For example, I could have split 17 times 23 into (20-3) and (20+3), which, one recalls, is 400-9=391 if we use the so-called difference of squares, and more easy to compute than by FOILing as above.  To recognize such patterns takes some fine-tuning, but not too long.  Some people become really really good at it, and it's often what I do when I multiply two numbers in my head without a calculator.

There is another little trick that I thought up while working out some arithmetic problems with my students but I never really made conscious nor explicit (until now, that is), and I'm sure we all do the same, for example when counting money.  It is this: rather than multiplying two large numbers, sometimes it's easier to just divide.  Say you have 500 peso bills and you've got 32 of them.  Since 500 is half of 1000, it follows that I should get half of 32000, which is 16000.  Like this:

 500 \cdot 32 = \frac{1000}{2} \cdot 32 = 1000 \cdot \frac{32}{2} = 1000 \cdot 16 = 16000

This nifty trick is immensely powerful!  Let me restate it here: multiplying by five (fifty, five-hundred, five-thousand) is in fact very much like dividing by two.  The reason is that  5 and  .5 = \frac{1}{2} are related.  So now it is really easy to multiply, say, 5 times 132 without much effort.  Rather than multiplying times five, simply divide the second number by two and then multiply by ten to obtain 660.  The reason is this:

 5 \cdot 132 = (.5 \cdot 10) \cdot 132 = \frac{1}{2} \cdot 10 \cdot 132 = \frac{132}{2} \cdot 10 = 66 \cdot 10 = 660

Of course, it is very much helpful that the second number is divisible by two.  In much the same manner, multiplying by 25 (250, 2500, 25000, etc) is akin to dividing by 4.  Say you have 25 times 32.  The second number is divisible by 4, so dividing 32 by 4 gives 8.  Next multiply by 100, to obtain 800.  Here it is explicitly:

 25 \cdot 32 = (.25 \cdot 100) \cdot 32 = \frac{1}{4} \cdot 32 \cdot 100 = \frac{32}{4} \cdot 100 = 8 \cdot 100 = 800

Of course it helps that the second number given was divisible by 4. It need not be, but one has to deal with the decimal representation of the ensuing fraction.

Next, say we have 75 times 32.  Multiplying by 75 (750, 7500, etc) is similar to multiplying by 3 and then dividing by four (or first dividing by four and then multiplying by three). So 75 times 32 is really 8 times 3 times 100, or 2400:

 75 \cdot 32 = .75 \cdot 100 \cdot 32 = \frac{3}{4} \cdot 32 \cdot 100 = 3 \cdot 8 \cdot 100 = 2400

Seventy five times a number that is divisible by four is especially easy to calculate this way.

In much the same manner:

  • Multiplying by 125 is similar to dividing by 8.  So numbers that are divisible by 8 are especially simple to multiply by 125.  For example, 125 times 88 is 11,000. (Why?) Also, if the second number is divisible by four, you can divide by four and then multiply by five.  For example, 125 times 44 is 5,500.  If the second number is divisible by 2, then you can divide by 2 and multiply by 25 (which in turn is like a division by four). So 125 times 18 is 2,250.  Just make sure you keep track of the multiplication by factors of ten.
  • Multiplying by 375 is similar to dividing by 8 and then multiplying by 3.  Numbers divisible by 8 are especially simple to multiply by 375.  For example, 375 times 64 is 24,000. (Why?) Like above, there's more that can be said here.
  • Multiplying by 625 is like dividing by 8 and then multiplying by 5. Again, numbers divisible by 8 are especially simple to compute.  Say 625 times 56 is 35,000. (Make sure you see this.)
  • Multiplying by 875 is like dividing by 8 and then multiplying by 7.  Say 875 times 24 is 21,000. (Yeah?)

As you may notice, multiplying by any multiple of twenty-five is like dividing by four or by eight (and then multiplying by a usually small compensator).  Also notice that multiplying by any multiple of five is like dividing by two and then compensating with a multiplication.  When I've had to multiply three-digit numbers, this is usually the pattern that I follow (for numbers that are multiples of 5 or 25, I've been lucky with my students), and that's how my students are wowed. Neat-o. Can you think of patterns that arise that might involve divisions by three?  By six? By seven? By eleven? Fractions involving these numbers in the denominator usually imply a repeating decimal, so.  Hmm.  Maybe it's not so clear?  Let me know what you think!

Categories: Arithmetic

On Utilities Consumption I: Water

October 27th, 2009 2 comments

So more or less since I came back to Mexico I've been saving my water bills, just for fun.  "Eventually," I thought to myself, "I may be able to do something with them."   Of course by that I meant that sixty years later I would have enough data points to discern some fascinating trends, including those detailing draughts and relative water abundance, and I would absolutely be able to use Viterbi algortithms or some Markovian insight to predict next year's weather, oh, and the price of potable water.  I'm the impatient kind, and have accumulated only about four (sometimes five) year's worth of data.  Here it is; I have plotted my cubic-meter consumption on a month-to-month basis (the bills come in monthly).  I've assumed that I use the water that I need.  Also that the trends represent a fairly typical (there may be some argument here, I predict) three-person household consumption (I don't live alone).  And yes, admittedly, sometimes there are sisterly visits in December and there's that factor to take into account, but oh well!  Let's just hypothesize my water consumption is fairly typical for a 3 or 4 person household in this geographical region in Mexico, shall we?

I've plotted the average consumption, and the two-sigma 95% bounds I calculated using Bessel's correction of the standard deviation for samples, aka "sample standard deviation":  \sqrt{\frac{1}{N-1}\sum_{i=1}^{N}\left(x_i - \overline{x} \right)^2 } .  The correction gives an unbiased variance, even though the standard deviation is slightly underbiased... not that it matters much anyway.

water

An interesting detail is that September seems to me the more precise.  My friend Ben objects to my use of the word "precise" in such a way.  He's a physicist. He pointed out to me that what I meant was variance.  He kept going on about how precision applies to instrumentation, and how the readings would have a precision estimate that would be reported alongside.  I countered that it probably did have an implied precision, because the measure is (surely) to significant figures, and so, a reading of 34, really meant anywhere between 33 and 35, as per the usual rules. Also, I told him his interpretation of precision did not matter in this my particular case.  A not so interesting debate ensued, culminating in our agreeing that precision is dependent on context. My argument was that if my monthly data points represent estimates of an "actual" (fictitious) consumption for that month, then indeed my spread indicates precision (where accuracy would indicate how close I came to the "actual" consumption). Anyway.  The debate was illuminating in some ways, but banal in many others.

The wide fluctuation in March-April was probably due to a small leak I had in 2008 that I corrected immediately, although I did interpolate some values that were missing for 2007 and 2008 right around that time too. I'm estimating my consumption for October to be about 15 cubic meters, the (unbiased) sample (arithmetic) average for that month.

1.4 Exercise 5

October 10th, 2009 No comments

I had often wondered how to go about proving closure of addition and multiplication of the integers.  After this problem I wondered no more!  It's pretty neat that we can show (by using induction) that by adding any two integers or multiplying them you always get another integer.

"Prove the following properties of  \mathbb{Z} and  \mathbb{Z}_+ :

(a)  a, b \in \mathbb{Z}_+ \Rightarrow a+b \in \mathbb{Z}_+ .  [Hint: Show that given  a \in \mathbb{Z}_+ , the set  X = \{x \ | \ x \in \mathbb{R} and  a+x \in \mathbb{Z}_+\} is inductive.]

(b)  a, b \in \mathbb{Z}_+ \Rightarrow a \cdot b \in \mathbb{Z}_+ .

(c) Show that  a \in \mathbb{Z}_+ \Rightarrow a - 1 \in \mathbb{Z}_+ \cup \{0\} .  [Hint: Let  X = \{x \ | \ x \in \mathbb{R} and  x - 1 \in \mathbb{Z}_+ \cup \{0\} ; show that  X is inductive.]

(d)  c, d \in \mathbb{Z} \Rightarrow c + d \in \mathbb{Z} and  c - d \in \mathbb{Z} . [Hint: Prove it first for  d = 1 .]

(e)  c, d \in \mathbb{Z} \Rightarrow c \cdot d \in \mathbb{Z} ."

(Taken from Topology by James R. Munkres, Second Edition, Prentice Hall, NJ, 2000. Page 35.)

----

SOLUTION

(a)

Using the hint, we proceed by

  • Showing  1 \in X .  Since  a \in \mathbb{Z}_+ , and  \mathbb{Z}_+ is inductive, it follows that  a + 1 \in \mathbb{Z}_+ .   Therefore  1 \in X .
  • Supposing  k \in X .  This of course means  a + k \in \mathbb{Z}_+ .
  • Showing  k+1 \in X .  This would mean  a + (k + 1) \in \mathbb{Z}_+ .  Note that by commutativity  and associativity (of the reals, of the integers), we can state  (a + 1) + k .  But then we know that  (a + 1) \in \mathbb{Z}_+ by the first point, and that  (a+1) + k \in \mathbb{Z}_+ by the second point.  So we conclude that indeed  a + (k + 1) \in \mathbb{Z}_+ .

Thus  X is inductive.  In particular, then,  \mathbb{Z}_+ \subset X .  It follows that if we pick  b \in \mathbb{Z}_+ \subset X , with  a \in \mathbb{Z}_+ by hypothesis, then we are guaranteed  a+b \in \mathbb{Z}_+ .

(b)

This is proved the same way as before, with a few minor modifications.  Again suppose  a \in \mathbb{Z}_+ .  Let  X' = \{x \ | \ x \in \mathbb{R} and  a \cdot x \in \mathbb{Z}_+\} .  Again we want to show that  X' is inductive.

  •  1 \in X' , since  a \cdot 1 = a \in \mathbb{Z}_+ (by identity axiom of the reals).
  • Assume  k \in X' . This means  a \cdot k \in \mathbb{Z}_+ .
  •  k + 1 \in X' , since  a ( k + 1) = a \cdot k + a (by the distributive property axiom of the reals), with  a \in \mathbb{Z}_+ by the first point and  a \cdot k \in \mathbb{Z}_+ by the second point.  Finally,  a \cdot k + a \in \mathbb{Z}_+ by what we proved in part (a).

We conclude  X' is inductive, and contains  \mathbb{Z}_+ .  As before, with  a \in \mathbb{Z}_+ , pick  b \in \mathbb{Z}_+ \subset X' , and we are guaranteed the product  a \cdot b \in \mathbb{Z}_+ .

(c)

Again following the hint, we show:

  •  1 \in X .  This is because  1 - 1 = 0 \in \mathbb{Z}_+ \cup \{0\} is true.
  • Suppose  k \in X , which means that  k - 1 \in \mathbb{Z}_+ \cup \{0\} .
  • We show that  k + 1 \in X .  This would mean that  (k + 1) - 1 \in \mathbb{Z}_+ \cup \{0\} , or, simplifying, that  k \in \mathbb{Z}_+ , which is true because  k is a positive integer by definition.

Thus,  X is inductive and  \mathbb{Z}_+ \subset X .  Picking  a \in \mathbb{Z}_+ \subset X , we see that  a - 1 \in \mathbb{Z}_+ \cup \{0\} .

(d)

Taking a hint from previous hints (pun intended), assume  c, d \in \mathbb{Z} .  Next define  X'' = \{ x \in \mathbb{R}; c + x \in \mathbb{Z} and  c - x \in \mathbb{Z}\} . We want to show that  X'' is inductive.

  •  1 \in X'' .  First of all, we want to show that  c + 1 \in \mathbb{Z} .  Certainly,  c \in \mathbb{Z}_+ \Rightarrow c+1 \in \mathbb{Z}_+ \subset \mathbb{Z} by part (a).  If  c = 0 , then  c + 1 = 1 \in \mathbb{Z}_+ \subset \mathbb{Z} .  If  c \in \mathbb{Z}_- , then  c + 1 \Rightarrow -(-c-1) with  -c \in \mathbb{Z}_+ , so  -c-1 \in \mathbb{Z}_+ \cup \{0\} by part (c), and  -(-c-1) \in \mathbb{Z}_- \cup \{0\} \subset \mathbb{Z} (!). Secondly, we want to show that  c - 1 \in \mathbb{Z} . Then,  c \in \mathbb{Z}_+ \Rightarrow c-1 \in \mathbb{Z}_+ \cup \{0\} \subset \mathbb{Z} by part (c). If  c = 0 ,  c-1 = -1 \in \mathbb{Z}_- \subset \mathbb{Z} .  Finally, if  c \in \mathbb{Z}_- , then  c - 1 can be rewritten as  -(-c + 1) with  -c \in \mathbb{Z}_+ , and  -c + 1 \in \mathbb{Z}_+ by part (a).  Then certainly  -(-c+1) \in \mathbb{Z}_- \subset \mathbb{Z} .  Thus  1 \in X'' .
  • Suppose that  k \in X'' , which means  c + k \in \mathbb{Z} and that  c - k \in \mathbb{Z} .
  • We show that  k + 1 \in X'' .  First,  c + (k + 1) means, by rearranging (associativity, commutativity)  (c + 1) + k .  But we know  (c + 1) \in \mathbb{Z} by the first point, and so  (c+1) + k \in \mathbb{Z} by the second.  We conclude that indeed  c + (k + 1) \in \mathbb{Z} .  Next we show  c - (k+1) \in \mathbb{Z} .  By the distributive property,  c - k - 1 .  Then by associativity,  (c - 1) - k .  We know  c - 1 \in \mathbb{Z} by the first point, and  (c-1) - k \in \mathbb{Z} by the second point. We conclude that indeed  c - (k + 1) \in \mathbb{Z} .

Thus,  X'' is inductive, and importantly,  \mathbb{Z}_+ \subset X'' . For any integer  c , picking an integer  d \in \mathbb{Z}_+ \subset X'' guarantees that  c + d \in \mathbb{Z} and  c - d \in \mathbb{Z} .  If  d = 0 , then simply  c \in \mathbb{Z} is true by hypothesis.  This shows quite thoroughly the closure of addition of the integers!

(e)

Again taking a hint from previous hints, assume  c, d \in \mathbb{Z} .  Next define  X''' = \{x \ | \ x \in \mathbb{R} and  c \cdot x \in \mathbb{Z}\} .  We want to show  X''' is inductive.

  •  1 \in X''' . It seems clear that  c \cdot 1 \in \mathbb{Z} , since simplification means  c \in \mathbb{Z} , which is true by hypothesis.
  • We assume that  k \in X''' , which means  c \cdot k \in \mathbb{Z} .
  • We show that  k + 1 \in X''' . This means we will show that  c (k + 1) \in \mathbb{Z} .  By the distributive property,  c \cdot k + c .  Now, we know  c \in \mathbb{Z} by the first point, and  c \cdot k \in \mathbb{Z} by the second.  Thus  c \cdot k + c \in \mathbb{Z} by part (d), and indeed  c (k + 1) \in \mathbb{Z} .

Thus  X''' is inductive and  \mathbb{Z}_+ \subset X''' .  Having  c \in \mathbb{Z} , pick  d \in \mathbb{Z}_+ \subset X''' and we are guaranteed that  c \cdot d \in \mathbb{Z} .  Next, if  d = 0 , then  c \cdot d = c \cdot 0 = 0 \in \mathbb{Z} .  If  d \in \mathbb{Z}_- , make the negative sign explicit, so that  c \cdot (-d) and by the properties of the reals this becomes  -c \cdot d with  -c \in \mathbb{Z} and  d \in \mathbb{Z}_+ , which again guarantees the product to be in  \mathbb{Z} .  We have just proved closure of multiplication of the integers!