MedVision ad

Hmmm (1 Viewer)

J0n

N/A
Joined
Aug 28, 2003
Messages
410
Gender
Male
HSC
2004
Code:
The puzzle is based on 2 provable facts:

1. An integer is divisible by 9 IFF the sum of its digits is divisible by 9.

2. If you take any 2 permutations of the same set of digits, and 
subtract one from the other, the result is always divisible by 9. 



Given these facts, the puzzle operation is simple. After subtraction you
 have a number divisible by 9.

You tell me all the digits except 1. I add them up in modulo 9, giving X, where X is a digit 0..9.

The missing digit D is given by 9 - X.  If I get X = 3, the missing digit must be a 6.

You are asked not to omit a zero, because I can't tell then whether you omitted a 0 or a 9.


Proofs:

   1. Divisibility by 9

      Any integer M is a sum of terms a(n) * 10^n,  n = 0, 1, 2 ....
         where each a(n) is a digit 0..9

      So we write
                   M = Sum[ a(n) * 10^n ]   (for each n = 0, 1 , 2, etc)
      So,    M mod 9 = Sum[ (a(n) * 10^n) mod 9 ] 

      But 10^n mod 9 = 1 for any n, so
             M mod 9 = Sum[ a(n) mod 9 ] 
                     = Sum[ a(n) ] mod 9

      QED


   2. Subtraction of any 2 permutations of an integer is divisible by 9

      Given M as defined above, if M2 is a permutation of M, then 

                  M2 = Sum[ a(n) * 10^m(n) ]   (for each n = 0, 1 , 2, etc)

      Notice I've just changed the power of 10, each m(n) is also 0, 1, 2  etc
         but in some other order.

      Example: 4321 =   1     +  2x10    + 3x100 + 4x1000
               2134     1x100 +  2x1000  + 3x10  + 4

      Subtraction gives
              
          (M - M2) mod 9 = Sum[ a(n) * (10^n - 10^m(n)) ] mod 9


      But we know ANY power of 10 = 1 mod 9, so

                         = Sum[ a(n) * (1 - 1) ] mod 9
                         = 0 mod 9

      QED
 

KeypadSDM

B4nn3d
Joined
Apr 9, 2003
Messages
2,631
Location
Sydney, Inner West
Gender
Male
HSC
2003
Remainder of any number when divided by 9:

Let the digits be A, B, C, ... n
:. Remainder = A * 10^n + B*10^(n-1) + ... + n * 10^0 (Mod 9)
= A * 1^n + B*1^(n-1) + ... + n * 1^0 (Replacing 10's with 1's (Same value in Mod 9))
= A + B + ... + n (Mod 9)
Hence IFF the sum of the digits is divisible by 9, then the number itself is divisible by 9
 

ND

Member
Joined
Nov 1, 2002
Messages
971
Location
Club Mac.
Gender
Male
HSC
2003
No wonder i couldn't figure it out; i don't know any modular arithmetic. Thanks.


Originally posted by redslert
having maths withdraw ND? :p
Heheh something like that.
 

KeypadSDM

B4nn3d
Joined
Apr 9, 2003
Messages
2,631
Location
Sydney, Inner West
Gender
Male
HSC
2003
Originally posted by ND
No wonder i couldn't figure it out; i don't know any modular arithmetic. Thanks.
Well it's not NECESSARY to figure it out. With my proof, you could just assume that 10^n - 1 = 9B where B is an integer. It's pretty obvious 10^n - 1 = 9999...999 To n-1 places.
 
Last edited:

flyin'

EDIT
Joined
Aug 21, 2002
Messages
6,677
Gender
Undisclosed
HSC
N/A
ND, no modular arithmatic for first year Actuarials unless you do 135, btw. :p
 

ND

Member
Joined
Nov 1, 2002
Messages
971
Location
Club Mac.
Gender
Male
HSC
2003
Originally posted by KeypadSDM
Well it's not NECESSARY to figure it out. With my proof, you could just assume that 10^n - 1 = 9B where B is an integer. It's pretty obvious 10^n - 1 = 9999...999 To n-1 places.
To be honest, i didn't even really read through the proofs, i just saw "mod 9" and thought "ugh, modular arithmetic". I gotta learn me that someday... (i've never done anything outside of 4u, and that includes most yr7-10 work too)

ND, no modular arithmatic for first year Actuarials unless you do 135, btw.
But i thought that 133 was higher than 135? or is modular arithmetic too easy for 133? (i remember spice girl saying he learned it in yr7)
 

flyin'

EDIT
Joined
Aug 21, 2002
Messages
6,677
Gender
Undisclosed
HSC
N/A
133 is the big brother of 136. And 132 is the big brother of 135... Well, knowing some modulo is useful for Group Theory.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Top