Talk:Casting out nines/Archive 1

Claims
"which is necessarily equal to the original number" doesn't this mean if $$x$$ is the original number and $$r$$ the last number (or the remainder) then: $$x \equiv r \pmod 9$$. If so it shoud be rewritten to reflect that because $$\equiv$$ is different form $$=$$. — Preceding unsigned comment added by 85.130.107.83 (talk) 20:12, 21 March 2006 (UTC)

More formal proof that method works?
The article's section on how it works very loosely brushes over why this method works. A more formal mathematical proof of why this works would be helpful, if one can be found in published material somewhere. (The proof would need to be something in an external source that the article can cite.)

In particular, the article glosses over proving that the sum of the digits of a given integer mod 9 is equal to that integer mod 9. In mathematical notation, this would be:

Given an n-digit integer $$x = a_n a_{n-1} ... a_2 a_1$$, it follows that $$x mod 9 = (a_n + a_{n-1} + ... + a_2 + a_1) mod 9$$. An example would be that we're proving 507 mod 9 = (5+0+7) mod 9. The proof doesn't appear to be difficult, but neither is it a trivial off-hand observation. Dugwiki 18:54, 5 January 2007 (UTC)


 * I don't feel like working this out into clear prose that can be inserted in the article, but the proof is easy enough. Instead of using the equivalence relation of having the same remainder modulo 9, I use the equivalent property of having a difference that is an integral multiple of 9. I further use induction on the length of the number's decimal representation. Here is the proof:
 * Let n be the number, and s(n) the sum of the digits of n. We need to prove that there exists some number k such that n − s(n) = 9k.
 * Base case: n has 1 digit. Then s(n) = n, so n − s(n) = 0, which equals 9 times 0.
 * Step. Assume n has 2 or more digits. Let d be the last digit of the decimal representation of n. Then n can be written in the form 10m + d, where m is the number obtained by deleting the last digit. For example, 237 = 10×23 + 7. Then s(n) = s(m) + d. By the induction hypothesis, m − s(m) = 9j for some integer j. Then n − s(n) = 10m + d − (s(m) + d) = 10m - s(m) = 9m + m − s(m) = 9m + 9j = 9(m+j).
 * --Lambiam Talk 21:19, 5 January 2007 (UTC)


 * It may take some digging to find this mentioned in a peer-reviewed source, since this is so old and so trivial a result. A web search finds some mentions in "Earliest Known Uses of Some of the Words of Mathematics (C)".
 * 
 * CASTING OUT NINES.
 * Fibonacci called the excess of nines the pensa or portio of the number (Smith vol. 1, page 153).
 * Liber Abaci (1202, revised 1228) has:
 * Uerum si prescriptam diuisionem per pensam nouenarii probare uoluerit accipiat pensam de 13976 que sunt 8 et seruet eam ex parte. Et iterum accipiat pensam exeuntis numeri, scilicet de 607, que sunt 4 et multiplicet eam per pensam de 23, que sunt 5, erunt 20; de quibus accipiat pensam, que sunt 2 et addat eam cum 15 que sunt super uirgulam de 23, erunt 17, quorum pensa sunt 8, sicuti superius ex parte seruauimus.—This quotation was provided by Michel Ballieu in an Internet posting. He provides the translation: "In fact if you want to verify the preceding division by casting out nines take pensa(m) of 13976 which are 8 and keep them aside. And again take pensa(m) of the outgoing number, i.e. of 607, which are 4 and multiply them by pensa(m) of 23, which are 5, they will be 20; take pensa(m) of these 20 which are 2 and add to them 15 which are upon the bar of 23, they will be 17, whose pensa are 8, as higher in what we kept aside."
 * A phrase from the Treviso Arithmetic (1478) is translated "If you wish to check the sum by casting out nines...."
 * Pacioli (1494) spoke of it as "corrente mercatoria e presta" (Smith vol. 1, page 153).
 * Christopher Clavius used the term "Probatio additiones per 9" in Epitome Arithmeticae Practicae (1607, Köln, p. 16–17), according to Albrecht Heeffer.
 * "Casting out the nines" is found in the first edition of the Encyclopaedia Britannica (1768–1771) in the article, "Arithmetick."
 * 
 * Also, David Singmaster's Queries on Sources in Recreational Mathematics apparently said
 * Casting Out Nines.  This is mentioned by St. Hippolytus, Philosphumena, c200, NYS.  A special case is in Iamblichus.  Al-Khowarizmi, c820, describes it.  A fairly general use of  9s  is in Aryabhata II's Mahasiddhanta, c950, and Narayana's Ganita-kaumudi, c1356, allows any modulus.  Have either of these ever been translated into a western language??  There are also Arabic references from 952/953, c1000 and c1020 (Avicenna, who attributes it to the Hindus).
 * Knuth (TAOCP, Vol.2) mentions that casting out nines is only about 89% reliable since the probability that two random integers will differ by a multiple of nine is 1:9.
 * As I recall Jakow Trachtenberg's ideas, found in Cutler and McShane, The Trachtenberg Speed System of Basic Mathematics (ISBN 978-0-313-23200-8), include casting out nines (and elevens) as a recommended check on large computations, and the book includes a proof of its correctness.
 * The relevant page at MathWorld cites more recent sources.


 * With Carl Friedrich Gauss' introduction of modular arithmetic, a broad explanation is simple. First we prove that casting out nines is equivalent to finding the residue of the integer modulo 9. We also use the homomorphism from the ring of integers, Z, to the ring of integers modulo 9, Z9, to show that all arithmetic operations (addition, subtraction, multiplication) must be preserved.
 * $$\begin{align}

h(a)+h(b) &{}\equiv h(a+b) \pmod 9 \\ h(a)-h(b) &{}\equiv h(a-b) \pmod 9 \\ h(a)\times h(b) &{}\equiv h(a\times b) \pmod 9 \end{align}$$
 * When a number N is written in decimal form, ak…a2a1a0, we know that its numeric value is a weighted sum of powers of 10,
 * $$ N = a_k 10^k + \cdots + a_2 10^2 + a_1 10 + a_0 . \,\!$$
 * But since 10 is 9+1, we find that
 * $$ 10^n \equiv 1 \pmod 9 \,\!$$
 * for all n. Therefore
 * $$ N \equiv a_k + \cdots + a_2 + a_1 + a_0 \pmod 9 . \,\!$$
 * A similar idea applies to casting out elevens, except that 10 is congruent to −1 modulo 11, so we alternately add and subtract digits.
 * One advanced book regards the correctness of casting out nines as so easy to prove that it is given as an exercise. I do find an explicit short proof on page 385 of Fundamentals of Mathematics (ISBN 978-0-262-52093-5), but it draws on more sophisticated material that precedes it. It is essentially the proof I give above.
 * Which brings us back to what might be a helpful discussion in the article. As Ask Dr. Math notes, "Casting out nines is not high-school math if all you want to do is use it; but it can take some effort to explain why it works without getting into hard stuff." --KSmrqT 14:25, 7 January 2007 (UTC)

Example's legibility
It is hard to discern from the example images for Addition, Subtraction etc. what exactly is happening. Italicizing is unclear as most of the numerals are italicized, so one cannot tell which is normal and which is stylized. I suggest using color to better illustrate the point.--74.192.214.241 06:31, 29 May 2007 (UTC)

The Examples are not very readable
For example...

Addition

3264 →6* 	First, cross out all 9's and pairs of digits that total 9 in each addend (italicized).

Only later to do point out that you added 2 and 4 together to get 6. Doing things this way you leave the reading wondering what you did.

Why not write.... Addition

3264 →2+6 = 6* 	First, cross out all 9's and pairs of digits that total 9 in each addend (italicized).

Or at least something that is clear. —Preceding unsigned comment added by Dave3457 (talk • contribs) 21:40, 6 July 2009 (UTC)

Removal of Pop Culture reference as "Unrelated"
There is a spectrum of opinions on pop culture sections and whether or not they are notable, but can we get some discussion before summarily removing the mention of Cirno as unrelated? In the Touhou setting, Cirno is depicted as an idiot incapable of higher thought but nonetheless associated with calculations based on the number nine (See: Cirno's Math Class for an example, and I will find more links if need be.) Given that casting out nines is referred to in the very article introduction as being a way for elementary schoolchildren with no grasp of mathematical principles to perform certain mathematical calculations, and that Cirno is likewise performing calculations related to the number nine while not being particularly bright, I do not feel that this really is "unrelated." -moritheil Talk 00:01, 4 May 2009 (UTC)


 * It was removed by an IP address who didn't bother to understand the video and just said "it was anime chars screaming at each other." Yes.  It is an anime clip.  It's supposed to be funny, but of course it's not to everyone's taste.  The connection is already explained above. Reinstated and added 2nd link, to "Cirno Training" which is an absurd math quiz game centered around the number nine. -moritheil Talk 10:12, 31 July 2009 (UTC)


 * Just because Cirno is associated with an inability to perform math, and is associated with the number 9 doesn't mean that she is in any way related to this mathematical operation. In fact the association with the number nine is entirely arbitrary due to a footnote in one of the game manuals that indicated her lack of intelligence. Neither of the flash files you linked to indicate any relationship to the "casting out nines" operation either. If you can provide an instance of the topic of this article being directly related to the Touhou universe in any way the pop culture reference might stand, but as it stands you haven't demonstrated any sort of relationship.  This isn't an article on "elementary math and the number nine" it's about this specific operation.  I'm inclined to remove the reference again. Note that I only just came across this article and am not the previous user who removed it. If you disagree with this, please provide stronger substantiation of the relevance rather than "here are some flashes with Cirno, math, and the number 9 in them". --Nakamura2828 (talk) 20:49, 1 November 2009 (UTC)


 * You appear to be unfamiliar with pop culture references, so forgive me if I explain a bit. Pop culture references often lack certain details or have features altered from the things they refer to.  For example, the use of "blue pill" in League of Legends as slang for "returning to base"  has little to do with the blue pill as conceived of in the Matrix except in the most general of senses (the blue pill in the Matrix returned one to a prior state.)  Nevertheless it is actually a reference to the Matrix, at least according to the staff.  In a similar vein, the reference in this article was included as a reference, and not as an actual example of casting out nines.  Please understand the difference.
 * I agree that flash files are suboptimal references but my Japanese is not up to the task of delving deeply into Touhou works. It was my hope that, as Wikipedia is a collaboration, someone else would come up with the links. -moritheil Talk 17:27, 12 November 2009 (UTC)


 * I now removed the Cirno reference on accord of it not being notable. The only reference to Cirno and the number 9 in canonical Touhou works (i.e. something written by ZUN) was that she was labeled "9. Idiot" in the "Phantasmagoria of Flower View"manual. For this she already has an entry in the 9 (disambiguation) page. I see no reason for the inclusion on this page, as no link between Cirno and mathematics exists in any official work. The links referenced to are fan-works, respectively by IOSYS and someone unknown. Haaninjo (talk) 20:56, 14 December 2009 (UTC)

Known to Roman bishop? Fact?
"Abjectio novenaria (Latin for "casting out nines") was known to the Roman bishop Hippolytos as early as the third century." This is a statement in Florian Cajori's history. However, he gives no references which could make it possible to check this information, and the consensus today seems to be that the method was developed later, in India or in the Arab region. Are there better sources for this information? Or could it be removed? Bjornsm (talk) 12:04, 8 July 2010 (UTC)

Examples
Please improve examples. The examples here are not useful for third graders. — Preceding unsigned comment added by 173.86.171.233 (talk) 18:01, 8 October 2012 (UTC)

Pythagorean in origin
David Eugene Smith, History of Mathematics, p. 132, has:

There is some interesting evidence of the recognition of the excess of nines in the number mysticism of one of the late Greco-Roman writers, Hippolytus, who seems to have lived in the 3d century and who wrote several theological treatises as well as a canon paschalis. He made no use of the principle, however, in the verification of computations, and so far as we know he was ignorant of this application of the theory. (3) What he did was to make use of gematria, as in estimating the relative ability of individuals by means of the numerical values of the letters of their names. Instead, however, of simply stating this value Sch in the usual way, he stated it with respect to the modulus nine. For example, the numerical value of Hector (Greek letters) is 1225, but Hippolytus gave it as 1, which is the excess of nines in this number. He spoke of this plan as due to the Pythagoreans, meaning, no doubt, the Neo-Pythagoreans of a period much later than that of Pythagoras himself.

(3) is P. Tannery, Memoires Scientifiques, I, 185; Tropfke, I (2), 58.

Which of course makes perfect sense; Hippolytos was not a mathematician and the Pythagoreans were — and of considerable skill. So certainly not 12th century, and not Avicenna either.

Could someone change the dating? As it is the article is both contradictory and wrong. Eluard (talk) —Preceding undated comment added 01:04, 13 March 2013 (UTC)

Limits to Calculation language mistake
After 17 and 26 it says "et al." which is used for other people (alibi being Latin people), just used the good ol' fashioned etc for et ecetra (for other things). An observation I'd like to share is since we even state that schoolchildren use this method could to wording of the introduction flow a little more nicely? — Preceding unsigned comment added by 24.63.2.246 (talk) 15:57, 11 August 2013 (UTC)

Generalization
If we replace 9 by F, could we do this with hexadecimal? Similarly, 9 by 1 for Binary, although this is called parity ... interesting... — Preceding unsigned comment added by Bluefoxicy (talk • contribs) 14:32, 9 August 2010 (UTC)


 * Yes, you could: although in a binary world it wouldn't be very useful, because all integers are divisible by one. Double sharp (talk) 10:13, 20 June 2014 (UTC)

Casting out elevens
Casting out elevens should perhaps also be covered. Instead of adding the digits, you alternately add and subtract them. It has often also been suggested as a sanity check as well, but isn't quite as useful because you can easily forget whether you should be adding or subtracting the next digit. It will, naturally, be erroneous about one eleventh of the time. Combined with casting out nines, the error rate becomes a very good 1 in 99. Double sharp (talk) 10:16, 20 June 2014 (UTC)