Jump to content

Casting out nines: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
No edit summary
Line 43: Line 43:
For division if A/B= D then B * D = A and the math may be checked as before.
For division if A/B= D then B * D = A and the math may be checked as before.


==?Why Use 9s?==
==Why Use 9s?==
If any number could be used to check arithmetic using remainders then why does everyone pick on 9? What is special about it.
If any number could be used to check arithmetic using remainders then why does everyone pick on 9? What is special about it.


Line 82: Line 82:
Since there are several techniques that could be used to get the remainder after division by 9 ie performing the actual division by 9, casting out 9s, and adding the digits of numbers, this makes 9 an excellent choice for this type of procedure ie checking arithmetic using a remainder.
Since there are several techniques that could be used to get the remainder after division by 9 ie performing the actual division by 9, casting out 9s, and adding the digits of numbers, this makes 9 an excellent choice for this type of procedure ie checking arithmetic using a remainder.


Because its so delightful sometimes to save division work simply by spotting a multiple of 9 that may be "cast out" this method using 9s is referred to as "Casting Out 9s".
Because its so delightful sometimes to save division work simply by spotting a multiple of 9 that may be "cast out" this method using 9s is referred to as "Casting Out 9s".


==Further Examples==
==Further Examples==

Revision as of 08:36, 20 February 2015

Casting out nines is a sanity test to ensure that hand computations of sums, differences, products, and quotients of integers are correct. By looking at the digital roots of the inputs and outputs, the casting-out-nines method can help one check arithmetic calculations. The method is so simple that most schoolchildren can apply it.

Checking Math Using Remainders

Editors Note: I purposefully am not introducing new math terms here as this beginning section and the next one are likely to be read by school children.

Suppose you have some number A, B, and D. Lets say for now that we are working with simple counting number and zero ie no negative numbers, decimals, fractions, imaginary numbers etc.

Suppose A is (9*x) +2 and B is (9*y) +3. When you add A+B= D = 9*(x+y) + (2+3)

Suppose a student adds A and B and claims D= (9*z) plus 1. This is not correct. They lost 4 somewhere.


Realize that A could be something like (9*x)+7 and B could be (9*y)+8.

A+ B = D =[9*(x+y)] + (7+8) = 9z + 15 where z=x+y. Suppose another student tells you D=9*(z+1)+6. Both students would likely have done their addition correctly. Note that answers that differ by 9 as remainders could be possible. Remainders that differ by any other number indicate a math error.

The simplest way to have all agree on the final answer is to subtract 9s from the final remainder until that is no longer possible.

Odds are that students will forget to carry a 1 here and be off by a few points in an addition there. Usually they will not be off by 9 points. Understand that if the wrong answer is off from the correct one then this check will fail.

Rule: When you add A with a remainder a to B with a remainder of b where you are dividing both A and B by the same number, you will get a number D with a remainder = a+b or the equivalent.

Couldn't this work for subtraction?

If A-B=C then C + B= A. The remainder in C + the remainder in B should equal the remainder in A or be off by 9. If its off by any other number then an error must have taken place.

What about multiplication? Again lets suppose A= 9x+a and B=9y+b. In other words both numbers are some multiple of 9 plus some remainder.

A*B= [9x*9y] + [9x*b]+ [a*9y] + [a*b]
   = 9*z+a*b  and where z=9xy+bx+ay

So in other words when you multiply A with a remainder of a times B with a remainder of b you get a number with a remainder of a*b (or its equivalent).

Since we are working with 9 here the remainder may be off by a multiple of 9. If its off by any other number, the calculation was done improperly.

Suppose A= 9x+7 . Suppose B = 9y+8. A*B=9*z +56 where z is some number.

=(9*z+54+2)=9(z+6) +2.

If your multiplying A with a remainder of 7 times B with a remainder of 8 and D with a remainder of 2, this is likely correct as 2 is off by a multiple of 9 from 56. Any other remainder once all possible 9s are subtracted than 2 would be incorrect.

For division if A/B= D then B * D = A and the math may be checked as before.

Why Use 9s?

If any number could be used to check arithmetic using remainders then why does everyone pick on 9? What is special about it.

Let N= a*1+b*10+c*100+d*1000 The number could be written as d,cba. Any of these variables could be zero.

we have a*1 b*(1+9) c*(1+99) d*(1+999)

Think of any number that is made only of 9s. Adding 1 to this number will always result in a number that is a 1 followed by zeros.

Notice that N=a+b+c+d + 9(1b+11c+111d) This tells you that if you divide N by 9, the remainder will be equivalent to a+b+c+d. Instead of doing a division problem, you may simply add up the digits.

Example: what is the remainder of 1,234 / 9? If you do the division you will find its 137 with a remainder of 1. Alternatively you could add up the digits. From right to left, the first 3 digits = 9. The remaining digit is 1 which is the remainder when 1234 is divided by 9.

Note in the number we picked for N i.e. N=a*1+b*10+c*100+d*1000 we could have continued on and added more digits and the same logic would hold.

Elementary Example

Since adding digits in numbers gives the remainder from a division by 9 or a student could alternatively divide by 9 to get the same answer, the two methods may be combined.

Example Add 2+9+3+4+5+7 Answer 30. One student might realize this is (9)+(4+5)+(2+7) +3 simply by rearranging the numbers in the addition problem. They might also notice that 30 is 27 + 3= (3*9) + 3.The remainder of 3 seems to be correct so likely the addition has been done correctly.

Another student might say 2+9=11. The sum of the digits of 11=2. 2+3=5. 5+4=9. A 9 may be divided by 9 with zero remainder so the sum so far has a zero remainder. The final 2 numbers 5 and 7 when added yield 12. The digits of 12 sum to be 3. This means the remainder if the sum were added then the total divided by 9 should be 3.

Notice that 9s may be discarded or "cast out" when found as they do not contribute to the remainder.

Since there are several techniques that could be used to get the remainder after division by 9 ie performing the actual division by 9, casting out 9s, and adding the digits of numbers, this makes 9 an excellent choice for this type of procedure ie checking arithmetic using a remainder.

Because its so delightful sometimes to save division work simply by spotting a multiple of 9 that may be "cast out" this method using 9s is referred to as "Casting Out 9s".

Further Examples

The method involves converting each number into its "casting-out-nines" equivalent, and then redoing the arithmetic. The casting-out-nines answer should equal the casting-out-nines version of the original answer. Below are examples for using casting-out-nines to check addition, subtraction, multiplication, and division.

Addition

In each addend, cross out all 9s and pairs of digits that total 9, then add together what remains. These new values are called excesses. Add up leftover digits for each addend until one digit is reached. Now process the sum and also the excesses to get a final excess.

2 and 4 add up to 6.
8+1=9 and 4+5=9; there are no digits left.
2, 4, and 6 make 12; 1 and 2 make 3.
2 and 0 are 2.
7, 3, and 1 make 11; 1 and 1 add up to 2.
The excess from the sum should equal the final excess from the addends.

Subtraction

First, cross out all 9s and digits that total 9 in both minuend and subtrahend (italicized).
Add up leftover digits for each value until one digit is reached.
Now follow the same procedure with the difference, coming to a single digit.
Because subtracting 2 from zero gives a negative number, borrow a 9 from the minuend.
The difference between the minuend and the subtrahend excesses should equal the difference excess.

Multiplication

First, cross out all 9s and digits that total 9 in each factor (italicized).
Add up leftover digits for each multiplicand until one digit is reached.
Multiply the two excesses, and then add until one digit is reached.
Do the same with the product, crossing out 9s and getting one digit.
* The excess from the product should equal the final excess from the factors.

*8 times 8 is 64; 6 and 4 are 10; 1 and 0 are 1.

Division

Cross out all 9s and digits that total 9 in the divisor, quotient, and remainder.
Add up all uncrossed digits from each value until one digit is reached for each value.
The dividend excess should equal the final excess from the other values.

In other words, you are performing the same procedure as in a multiplication, only backwards. 8x4=32 which is 5, 5+3 = 8. And 8=8.

How it works

The method works because the original numbers are 'decimal' (base 10), the modulus is chosen to differ by 1, and casting out is equivalent to taking a digit sum. In general any two 'large' integers, x and y, expressed in any smaller modulus as x' and y' (for example, modulo 7) will always have the same sum, difference or product as their originals. This property is also preserved for the 'digit sum' where the base and the modulus differ by 1.

If a calculation was correct before casting out, casting out on both sides will preserve correctness. However, it is possible that two previously unequal integers will be identical modulo 9 (on average, a ninth of the time).

One should note that the operation does not work on fractions, since a given fractional number does not have a unique representation.

A variation on the explanation

A nice trick for very young children to learn to add nine is to add ten to the digit and to count back one. Since we are adding 1 to the ten's digit and subtracting one from the unit's digit, the sum of the digits should remain the same. For example, 9 + 2 = 11 with 1 + 1 = 2. When adding 9 to itself, we would thus expect the sum of the digits to be 9 as follows: 9 + 9 = 18, (1 + 8 = 9) and 9 + 9 + 9 = 27, (2 + 7 = 9). Let us look at a simple multiplication: 5×7 = 35, (3 + 5 = 8). Now consider (7 + 9)×5 = 16×5 = 80, (8 + 0 = 8) or 7×(9 + 5) = 7×14 = 98, (9 + 8 = 17, (1 + 7 = 8).

Any positive integer can be written as 9×n + a, where 'a' is a single digit from 0 to 8, and 'n' is any positive integer. Thus, using the distributive rule, (9×n + a)×(9×m + b)= 9×9×n×m + 9(am + bn) + ab. Since the first two factors are multiplied by 9, their sums will end up being 9 or 0, leaving us with 'ab'. In our example, 'a' was 7 and 'b' was 5. We would expect that in any base system, the number before that base would behave just like the nine.

Limitation to casting out nines

While extremely useful, casting out nines does not catch all errors made while doing calculations. For example, the casting-out-nines method would not recognise the error in a calculation of 5×7 which produced any of the erroneous results 8, 17, 26, etc. in other words, the method only catches erroneous results whose digital root is one of the 8 digits that is different from that of the correct result.

History

A form of casting out nines known to ancient Greek mathematicians was described by the Roman bishop Hippolytus in The Refutation of all Heresies, and more briefly by the Syrian Neoplatonist philosopher Iamblichus in his commentary on Nicomachus's Introduction to Arithmetic. Ibn Sina (Avicenna) (908–946) was a Persian physician, astronomer, physicist and mathematician who contributed to the development of this mathematical technique.[1] It was employed by twelfth-century Hindu mathematicians.[2] In the 17th century, Gottfried Wilhelm Leibniz not only used the method extensively, but presented it frequently as a model for rationality.[citation needed]

In Synergetics, R. Buckminster Fuller claims to have used casting-out-nines "before World War I."[3] Fuller explains how to cast out nines and makes other claims about the resulting 'indigs,' but he fails to note that casting out nines can result in false positives.

The method bears striking resemblance to standard signal processing and computational error detection and error correction methods, typically using similar modular arithmetic in checksums and simpler check digits.

Notes

  1. ^ Masood (2006, pp. 104 f)
  2. ^ Cajori (1991, p. 91)
  3. ^ Fuller (1982, p. 765)

References

  • Cajori, Florian (1991), A History of Mathematics (AMS Chelsea Publishing) (5th ed.), New York, NY: AMS, ISBN 0-8218-2102-4 {{citation}}: Invalid |ref=harv (help)
  • Dub Trio (2004-09-14), Casting Out The Nines, ROIR, ASIN B000UO68AM {{citation}}: |format= requires |url= (help); Invalid |ref=harv (help)
  • Fuller, R. Buckminster (April 1982), Synergetics: Explorations in the Geometry of Thinking (New ed.), New York, NY: Macmillan Publishing Company, ISBN 0-02-065320-4 {{citation}}: Invalid |ref=harv (help)
  • Leibniz, Gottfried Wilhelm (2008-01-24), Dascal, Marcelo (ed.), Gottfried Wilhelm Leibniz: The Art of Controversies, The New Synthese Historical Library (Paperback ed.), New York, NY: Springer, ISBN 978-1-4020-8190-3 {{citation}}: Invalid |ref=harv (help)
  • Masood, Ehsan (2006-01-15), Science and Islam: A History, Duxford, United Kingdom: Icon Books Ltd., ISBN 1-84831-081-1 {{citation}}: Invalid |ref=harv (help)