Casting out nines

From Wikipedia, the free encyclopedia
Jump to: navigation, search

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 without understanding its mathematical underpinnings.

Examples[edit]

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[edit]

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.

\mathit{3} 2 \mathit{6} 4\, \Rightarrow \mathit{6}\, 2 and 4 add up to 6.
\mathit{8415}\, \Rightarrow 0\, 8+1=9 and 4+5=9; there are no digits left.
2 \mathit{9} 46\, \Rightarrow \mathit{3}\, 2, 4, and 6 make 12; 1 and 2 make 3.
\underline{+\mathit{3} 20 \mathit{6}} \Rightarrow 2\, 2 and 0 are 2.
\mathit{1} 7 \mathit{8} 31\, \bigg\Downarrow 7, 3, and 1 make 11; 1 and 1 add up to 2.
\Downarrow
{2}\, \Leftrightarrow 2\, The excess from the sum should equal the final excess from the addends.

Subtraction[edit]

\mathit{5643}\, \Rightarrow 0(9)\, First, cross out all 9s and digits that total 9 in both minuend and subtrahend (italicized).
\underline{-2\mathit{891}}\, \Rightarrow -2\, Add up leftover digits for each value until one digit is reached.
\mathit{2} 7 \mathit{52}\, \bigg\Downarrow Now follow the same procedure with the difference, coming to a single digit.
\Downarrow Because subtracting 2 from zero gives a negative number, borrow a 9 from the minuend.
{7}\, \Leftrightarrow 7\, The difference between the minuend and the subtrahend excesses should equal the difference excess.

Multiplication[edit]

\mathit{5} \mathit{4} 8\, \Rightarrow 8\, First, cross out all 9s and digits that total 9 in each factor (italicized).
\underline{\times 62 \mathit{9}}\, \Rightarrow 8\, Add up leftover digits for each multiplicand until one digit is reached.
{\mathit{3} 44 \mathit{69} 2}\, \bigg\Downarrow Multiply the two excesses, and then add until one digit is reached.
\Downarrow Do the same with the product, crossing out 9s and getting one digit.
{1}\, \Leftrightarrow 1\, * 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[edit]

\mathit{2754}62\, \div 877\, = 314\, r. 84\, Cross out all 9s and digits that total 9 in the divisor, quotient, and remainder.
\Downarrow \Downarrow \Downarrow \Downarrow Add up all uncrossed digits from each value until one digit is reached for each value.
8\, \Leftrightarrow (4\, \times 8)\, + 3\, 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[edit]

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[edit]

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.

Limitations to Casting out nines[edit]

While extremely useful, casting out nines does not "catch" all errors made while doing calculations. For example, 5x7 = 8. By the casting-out-nines method, it would appear that this multiplication is correct, which it is not. This would also happen with the result of 17, 26, et al. In other words there will be an "uncaught" mistake every nine numbers, this would yield a 90% effectiveness to the method.

History[edit]

Abjectio novenaria (Latin for "casting out nines") was known to the Roman bishop Hippolytus as early as the third century. 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: "By means of this, once a reasoning in morality, physics, medicine or metaphysics is reduced to these terms or characters, one will be able to apply to it at any moment a numerical test, so that it will be impossible to be mistaken if one does not so desire...".[3]

In Synergetics, R. Buckminster Fuller claims to have used casting-out-nines "before World War I."[4] 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.

See also[edit]

References[edit]

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

External links[edit]