Can You Multiply Three Numbers Simultaneously?Date: 03/15/2004 at 13:30:25 From: Michele Subject: Can you multiply three numbers simultaneously? If not, why? If I have the problem 24 + 342 + 506 I can line the numbers up and add them at the same time. Can I do this with the problem 24 x 342 x 506? If I can, how do you do it? If I can't, why not? If multiplication is fast adding, then multiplying three numbers should work if you can add three numbers simultaneously. Date: 03/15/2004 at 14:43:00 From: Doctor Ian Subject: Re: Can you multiply three numbers simultaneously? If not, why? Hi Michele, Good question! I've never really thought about this before. I guess the first thing to note is that you can't actually add more than two numbers at a time. What you can do is do a series of additions without writing down any intermediate results: [1] 2 4 Add 4 to 2 to get 6 3 4 2 Add 6 to 6 to get 12, carry the 1 + 5 0 6 ------- 2 [1] 2 4 3 4 2 + 5 0 6 Add 1 to 2 to get 3 ------- Add 3 to 4 to get 7 7 2 Add 7 to 0 to get 7, with no carry and so on. But that's not the same thing as adding more than two things at once. Addition and multiplication are both binary operations, which means you can apply them to only two numbers at a time. Now, can you cleverly set up a series of multiplications so that you appear to be doing them in one shot? Sure, by using the distributive property: 24 * 342 * 506 = (20 + 4)(300 + 40 + 2)(500 + 6) = 20(300 + 40 + 2)(500 + 6) + 4(300 + 40 + 2)(500 + 6) = (20*300 + 20*40 + 20*2)(500 + 6) + (4*300 + 4*40 + 4*2)(500 + 6) = 500(20*300 + 20*40 + 20*2) + 6(20*300 + 20*40 + 20*2) + 500(4*300 + 4*40 + 4*2) + 6(4*300 + 4*40 + 4*2) = 500*20*300 + 500*20*40 + 500*20*2 + 6*20*300 + 6*20*40 + 6*20*2 + 500*4*300 + 500*4*40 + 500*4*2 + 6*4*300 + 6*4*40 + 6*4*2 = 5*2*3*10^5 + 5*2*4*10^4 + 5*2*2*10^3 + ... All you're doing here is finding every combination of digits from different numbers, multiplying them, and applying the appropriate power of 10 to the result, which you could do just by counting up decimal places: 24 * 342 * 506 Combination Product Power of 10 2, 3, 5 30 1 + 2 + 2 = 5 [*] 2, 3, 0 0 1 + 2 + 1 = 4 2, 3, 6 36 1 + 2 + 0 = 3 4, 3, 5 60 0 + 2 + 2 = 4 4, 3, 0 0 etc. 4, 3, 6 72 2, 4, 5 60 2, 4, 0 0 2, 4, 6 48 etc. [*] Here, the 2 comes from 24, so it represents 20, which is 2*10^1; the 3 comes from 342, so it represents 300, which is 3*10^2; and the 5 comes from 506, so it represents 500, which is 5*10^2. To get the final exponent, we just add the individual exponents. Now we're doing a bunch of one-digit multiplications and adding up the intermediate products... which isn't really any different from doing a bunch of one-digit additions and adding up the intermediate sums. If we really wanted to pursue this, we might do something like this: Looking at our three numbers, 24, 342, 506 we could realize that the largest possible exponent would be 1 + 2 + 2 = 5 and so we could set up columns for each of the possible exponents; then we could write our intermediate products in the appropriate columns: Exponent: 5 4 3 2 1 0 2,3,5 2,3,0 2,3,6 4,3,5 4,3,0 4,3,6 2,4,5 2,4,0 2,4,6 4,4,5 4,4,0 4,4,6 and so on. Then we could find the intermediate products; add the products in each column, and multiply by 10 raised to the appropriate exponent; and then add the totals of the columns. The main difference is that when we include a new addend in a series sum, the new number of additions is the old number PLUS the number of digits in the new addend. When we include a new multiplicand in a series product, the new number of multiplications is the old number TIMES the number of digits in the new multiplicand. This very quickly increases to the point where it's easier to just do two full multiplications at a time, rather than try to keep track of all the combinations of digits. Does that make sense? But suppose we want to compute something like 3 * 4 * 5 in one shot. We could convert it to the equivalent addition, 5 \ \ 5 | | 5 | 4 * 5 | 5 | | 5 / | 5 \ | 5 | | 5 | 4 * 5 | 3 * (4 * 5) 5 | | 5 / | 5 \ | 5 | | 5 | 4 * 5 | 5 | | + 5 / / --- and now, since you can add as many numbers as you want "at the same time", this should be much faster than doing the multiplications, right? But of course, it's not, which suggests that perhaps you _can't_ add more than two numbers at a time. The most you can do, either with addition or multiplication, is arrange things so that you're never adding or multiplying by anything larger than a single digit. It just turns out that when you try to do this for multiplication, the cost exceeds the benefit in most cases. Thanks for asking such an interesting question. Write back if you'd like to talk more about this, or anything else. - Doctor Ian, The Math Forum http://mathforum.org/dr.math/ |
Search the Dr. Math Library: |
[Privacy Policy] [Terms of Use]
Ask Dr. Math^{TM}
© 1994-2013 The Math Forum
http://mathforum.org/dr.math/