Verify that ## N-M ## is divisible by ## 9 ##

  • Thread starter Thread starter Math100
  • Start date Start date
Click For Summary

Homework Help Overview

The discussion revolves around verifying that the difference between a number \( N \) and its digit-reversed counterpart \( M \) is divisible by 9. The context involves properties of numbers and modular arithmetic, particularly focusing on the decimal representation of integers.

Discussion Character

  • Exploratory, Conceptual clarification, Mathematical reasoning

Approaches and Questions Raised

  • Participants explore the mathematical proof involving the decimal expansions of \( N \) and \( M \), questioning the steps that lead to the conclusion about divisibility by 9. Some suggest that permutations of digits may also yield similar results, while others express confusion about specific steps in the proof.

Discussion Status

The discussion is active, with participants providing insights and raising questions about the proof's clarity and the implications of digit permutations. Some guidance has been offered regarding the reasoning behind the modular arithmetic, but there is no explicit consensus on all points raised.

Contextual Notes

Participants note the relevance of the problem in practical scenarios, such as accounting tricks, and discuss the educational value of demonstrating these properties to younger audiences. There is mention of potential gaps in teaching these concepts in modern education.

Math100
Messages
823
Reaction score
234
Homework Statement
Given an integer ## N ##, let ## M ## be the integer formed by reversing the order of the digits of ## N ## (for example, if ## N=6923 ##, then ## M=3296 ##). Verify that ## N-M ## is divisible by ## 9 ##.
Relevant Equations
None.
Proof:

Suppose ## N=a_{m}10^{m}+\dotsb +a_{2}10^{2}+a_{1}10+a_{0} ##, where ## 0\leq a_{k}\leq 9 ##, be the decimal
expansion of a positive integer ## N ##.
Let ## M=a_{0}10^{m}+\dotsb +a_{m-2}10^{2}+a_{m-1}10+a_{m} ##, where ## 0\leq a_{q}\leq 9 ##, be the
decimal expansion of a positive integer ## M ##.
Then ## N-M=(a_{m}-a_{0})10^{m}+\dotsb +(a_{2}-a_{m-2})10^{2}+(a_{1}-a_{m-1})10+(a_{0}-a_{m}) ##.
Observe that ## 10\equiv 1\pmod {9}\implies 10^{n}\equiv 1\pmod {9} ##.
This means ## 9\mid (10^{n}-1) ##.
Thus ## 9\mid (N-M) ##.
Therefore, ## N-M ## is divisible by ## 9 ##.
 
Physics news on Phys.org
Math100 said:
Homework Statement:: Given an integer ## N ##, let ## M ## be the integer formed by reversing the order of the digits of ## N ## (for example, if ## N=6923 ##, then ## M=3296 ##). Verify that ## N-M ## is divisible by ## 9 ##.
Relevant Equations:: None.

Proof:

Suppose ## N=a_{m}10^{m}+\dotsb +a_{2}10^{2}+a_{1}10+a_{0} ##, where ## 0\leq a_{k}\leq 9 ##, be the decimal
expansion of a positive integer ## N ##.
Let ## M=a_{0}10^{m}+\dotsb +a_{m-2}10^{2}+a_{m-1}10+a_{m} ##, where ## 0\leq a_{q}\leq 9 ##, be the
decimal expansion of a positive integer ## M ##.
Then ## N-M=(a_{m}-a_{0})10^{m}+\dotsb +(a_{2}-a_{m-2})10^{2}+(a_{1}-a_{m-1})10+(a_{0}-a_{m}) ##.
Observe that ## 10\equiv 1\pmod {9}\implies 10^{n}\equiv 1\pmod {9} ##.
This means ## 9\mid (10^{n}-1) ##.
Thus ## 9\mid (N-M) ##.
How?

We have
\begin{align*}
N-M&=(a_{m}-a_{0})10^{m}+\dotsb +(a_{2}-a_{m-2})10^{2}+\ldots +(a_{1}-a_{m-1})10+(a_{0}-a_{m})\\
&\equiv (a_{m}-a_{0})+(a_{m-1}-a_1)+ \dotsb +(a_{2}-a_{m-2}) +(a_{1}-a_{m-1})+(a_{0}-a_{m}) \pmod 9\\
&\equiv 0 \pmod 9
\end{align*}
Math100 said:
Therefore, ## N-M ## is divisible by ## 9 ##.
Sorry, haven't seen it without the extra line.
 
  • Like
Likes   Reactions: Delta2 and Math100
I think this is true if you permute any two ( even number?) of digits of the original number.
This is, iirc, a trick used often by accountants: If your final result is a sum is wrong by a multiple of 9, then you flipped your digits in one of the summands.
 
  • Like
Likes   Reactions: pbuk
WWGD said:
I think this is true if you permute any two ( even number?) of digits of the original number.
Any permutation will do.

WWGD said:
This is, iirc, a trick used often by accountants
Not so much any more, not sure if they even teach it these days... kids of today... bah, humbug...
 
  • Like
Likes   Reactions: Delta2 and WWGD
fresh_42 said:
How?

We have
\begin{align*}
N-M&=(a_{m}-a_{0})10^{m}+\dotsb +(a_{2}-a_{m-2})10^{2}+\ldots +(a_{1}-a_{m-1})10+(a_{0}-a_{m})\\
&\equiv (a_{m}-a_{0})+(a_{m-1}-a_1)+ \dotsb +(a_{2}-a_{m-2}) +(a_{1}-a_{m-1})+(a_{0}-a_{m}) \pmod 9\\
&\equiv 0 \pmod 9
\end{align*}

Sorry, haven't seen it without the extra line.
I can understand your explanation but I can't understand OP: I can't fill in the in between steps, how from ##10^n-1## is a multiple of 9 we derive that N-M is a multiple of 9.
 
Delta2 said:
I can understand your explanation but I can't understand OP: I can't fill in the in between steps, how from ##10^n-1## is a multiple of 9 we derive that N-M is a multiple of 9.
Should be ##10^{m-k} - 10^k##, which is what multiplies ##a_k##.
 
  • Like
Likes   Reactions: Delta2
Orodruin said:
Should be ##10^{k} - 10^{m-k}##, which is what multiplies ##a_k##.
Or, in the case of a random perturbation ##\sigma## of the digits:
$$
10^k - 10^{\sigma(k)}.
$$
 
WWGD said:
This is, iirc, a trick used often by accountants: If your final result is a sum is wrong by a multiple of 9,
I'm not sure that was what it was about. The trick I know of, which is called "casting out 9s", had to do with a check on the total of a longish column of numbers.

For each number in the column, add all the digits repeatedly until you get down to a single digit. For example, 4027 --> 4 + 2 + 7 = 4 + 9 = 13 --> 1 + 3 = 4. We could have skipped a couple steps by noticing that 2 + 7 adds to 9, which can be discarded ("cast out") and replaced with zero if necessary. What this does is to show that ##4027 \equiv 4~\mod 9##.

Do the same operation for each number in the column, essentially writing the modulo 9 equivalence class. Then add all the mod 9 numbers, again repeatedly adding to get a single digit.
Compare this digit to what you get when you add the digits of your earlier sum. If there's a discrepancy, it means you've made a mistake somewhere.

As an example:
4027 --> 4 (work shown above)
3195 --> 0 ( after casting out all 9s we're left only with 0)
6211 --> 1
------ The three numbers above add to 5
13434 --> 6
I've deliberately made a mistake in adding my three numbers to get 13,434, which is equiv. to 6 mod 9. The sum of the equivalence classes of the individual numbers is 5. This tells me that I've made a mistake somewhere.
pbuk said:
Not so much any more, not sure if they even teach it these days...
Yeah, the preference seems to be to give kindergarteners a calculator and call it good.

Regarding the problem of this thread, l've found this to be a good parlor trick to show young kids. I ask them to write down, say, a four-digit number, and then write down any permutation of the original number. I then ask them to subtract whichever number is smaller from the larger one.

I then ask if the result has the same number of digits. If so, I ask them to tell me all but one of the digits, with the caveat that if there are any 0s, those need to be told to me. Coming up with the missing digit is simple if all but one of the digits are known.

I did this with my "8 -3/4 year old" niece last summer, and she really got a kick out of it.
 
  • Like
Likes   Reactions: jim mcnamara

Similar threads

  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 6 ·
Replies
6
Views
2K
Replies
3
Views
1K
Replies
3
Views
2K
  • · Replies 7 ·
Replies
7
Views
2K
  • · Replies 1 ·
Replies
1
Views
1K