Modular arithmetic (casting out 9's)

  • Thread starter Thread starter playa007
  • Start date Start date
  • Tags Tags
    Arithmetic
Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
2 replies · 2K views
playa007
Messages
25
Reaction score
0

Homework Statement


Let m be a positive integer and m' be an integer obtained from m by rearranging its digits. Prove that m-m' is a multiple of 9

Homework Equations


Casting out 9's method


The Attempt at a Solution


So I found that by applying the casting out 9's method on m and m'; the values are the same. This means that when one divides m by 9 and m' by 9; it is the same remainder. I'm wondering how do I use this to prove that 9 divides m-m'
 
Physics news on Phys.org
Hi playa007! :smile:
playa007 said:
So I found that by applying the casting out 9's method on m and m'; the values are the same. This means that when one divides m by 9 and m' by 9; it is the same remainder. I'm wondering how do I use this to prove that 9 divides m-m'

erm … m = 9a + r, m' = 9a' + r, so m - m' = … ? :smile:
 
Also (tiny-tim is exactly right), if a number is written, say m= "abcd"= 1000a+ 100b+ 10c+ d, then, rearranging, m'= "cadb"= 1000c+ 100a+ 10d+ b and m- m'= 1000a+ 100b+ 10c+ d- 1000c- 100a- 10d- b= (1000-100)a+ (100-1)b+ (10-1000)c+ (1- 10)d= 900a+ 99b- 990c- 9d= 9(100a+ 11b- 110c-d), a multiple of 9.

In our "base 10 numeration system", the coefficient of each digit is a power of 10, of course, so no matter how you rearrange the digits, subtracting, the coefficient of each digit is "a power of 10 minus another power of 10" which is always a multiple of 9.