Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Arithmetic Problem

  1. Sep 1, 2007 #1

    cepheid

    User Avatar
    Staff Emeritus
    Science Advisor
    Gold Member

    n = (28)^3

    which is greater:

    the units digit of n

    OR

    4?

    How does one go about *computing* the units digit of n?
     
  2. jcsd
  3. Sep 1, 2007 #2
    the unit's digit is the digit in the one's place on the number.

    so 38 has unit digit 8, 386784747 has unit digit of 7, etc...
     
  4. Sep 1, 2007 #3

    cepheid

    User Avatar
    Staff Emeritus
    Science Advisor
    Gold Member

    I know what the units digit is. I don't know how to compute 28^3 in my head, or whether there is some way of determining the units digit of 28^3 without actually computing it.
     
  5. Sep 1, 2007 #4

    cepheid

    User Avatar
    Staff Emeritus
    Science Advisor
    Gold Member

    Edit, actually I do know how to compute 28^3 in my head. With great difficulty, I got 21 952, which turned out to be correct. But I had a lot of trouble remembering my intermediate results. I really don't think this is the point. Surely the question is meant to be answerable without this mental computation.
     
  6. Sep 1, 2007 #5
    28 = 7*4

    7^3 = 7*49 -> this number has 3 in the unit digit. 4^3 = 4*16 -> this one has a 4. 4*3 = 12, hence 28^3 ends with a 2.
     
    Last edited: Sep 1, 2007
  7. Sep 1, 2007 #6

    cepheid

    User Avatar
    Staff Emeritus
    Science Advisor
    Gold Member

    That's the *general strategy*, then? Factor the number.

    EDIT: I think arithmetic is my least favourite branch of math.
     
  8. Sep 1, 2007 #7
    There's an even simpler way: the unit digit in 28 is 8, 8^3 = 8*64 - > this ends with a 2. This said, 28^3 ends with a 2.
     
  9. Sep 1, 2007 #8
    Werg22: There's an even simpler way: the unit digit in 28 is 8, 8^3 = 8*64 - > this ends with a 2. This said, 28^3 ends with a 2.

    We look at this modulo 10, 28==8. On the other hand we can also use 8==-2 Mod 10, so all we have to do is look at (-2)^3=-8==2 Mod 10, and we are done!

    This way helps because suppose the problem was (7598)^10. That matter reduces to (-2)^10 = 64 == 4 Mod 10.
     
    Last edited: Sep 1, 2007
  10. Sep 1, 2007 #9

    matt grime

    User Avatar
    Science Advisor
    Homework Helper

    Just to explain what is going on to the OP:

    any whole number X can be written as 10*Y + Z for some Z in the range 0 to 9, Z being the 'units', as you know.

    If you raise (10Y+Z) to any power, the only contribution to the units is from the power of Z.

    Robert chose to decompose X with Z in a different range because it made the maths a little easier.

    Exercise - find the unit digit of 99 raised to an even power and an odd power.
     
  11. Sep 3, 2007 #10

    cepheid

    User Avatar
    Staff Emeritus
    Science Advisor
    Gold Member

    Okay, modular arithmetic is a subject that, for whatever reason, is missing from my repertoire. So, I had a look at the articles on modular arithmetic at both Wikipedia and MathWorld. I got the basic idea of it, but unfortunately I have no knowledge of number theory or abstract algebra, so once they start spouting off about groups and rings, I'm lost:

    Right, and we need only consider the 8 in 28, for reasons explained by matt grime. This method makes perfect sense to me.

    What I don't understand about this method is how it is useful/allowable to express the number as something (mod 10). What I mean is that you express the number as something (mod 10), THEN you perform the operation on it (cubing in this case), then you get a result that you express as something else (mod 10), and somehow that is a valid answer. I don't get it. Something (mod 10) doesn't correspond to a unique integer, but to many different ones. So how do you know you've got the right answer once you start playing around with mod 10?

    Doesn't (-2)^10 = 1024 ?
     
  12. Sep 3, 2007 #11

    matt grime

    User Avatar
    Science Advisor
    Homework Helper

    That last sentence indicates you don't understand what 'mod 10' means at all. Try to link the things I said to this.
     
  13. Sep 3, 2007 #12

    cepheid

    User Avatar
    Staff Emeritus
    Science Advisor
    Gold Member

    Umm, so what what about the second last paragraph? Can anyone address the question I was asking?

    I thought I did. I mean, I understood it well enough to adequately explain the statements made by robert Ihnot:

    1. 28 == 8 (mod 10).

    Right, well this made sense to me because 28 is 8 above 20, which is two cycles of 10, and in modular arithmetic, if you go through any whole number of cycles of the modulus, you end up right back where you started, i.e. 20 == 0 (mod 10)

    2. 8 == -2 (mod 10)

    Well this makes sense to me by the same reasoning as above. 8 is 2 less than 10.

    3. (-2)^10 = 64

    Now THIS is the statement of robert Inhot that I did not understand...it does not make sense to me in ANY form of arithmetic.
     
  14. Sep 3, 2007 #13
    I think that was a mistake becaue you would have (-2)^10=1024==4(mod 10)
     
  15. Sep 3, 2007 #14

    cepheid

    User Avatar
    Staff Emeritus
    Science Advisor
    Gold Member

    Great! Now that that has been established, can anyone help me out with my question? (post 10).
     
  16. Sep 3, 2007 #15
    cepheid: Great! Now that that has been established, can anyone help me out with my question? i.e.: Then you get a result that you express as something else (mod 10), and somehow that is a valid answer. I don't get it. Something (mod 10) doesn't correspond to a unique integer, but to many different ones. So how do you know you've got the right answer once you start playing around with mod 10?

    I did make a mistake on that, sorry! Certainly (-2)^10 = 1024, and the last digit is 4, which is what we are looking for.

    Now if we have to find last digit of 7598^9, it certainly helps to just consider 8^9 = 134217728 ==8 Mod 10. However for simpliticy of calculation we could use (-2)^9 == -512. Now that is -500 +-10+-2. So dropping the 10 and 100s it gives us -2 Mod 10 ==8 Mod 10.

    Now yours is a good question. The answer is the last digit for our purposes is only going to be from 0 to 9 and is not a negative number. So we have -2==8 Mod 10. Using a negative number for calculation was a trick to reduce the difficulity of the calculation. From the standpoint of Modulo arithmetic we are using just a representation Modulo 10. Thus 8 ==28==208, or 8==-2 ==-102==-512 Modulo 10. We could have used any representation we wanted, but obviously -2 is the smallest one.

    PS: Is interesting to see 7598^9, what the last two digits are. Suppose we want to carry this modulo 100 to get two digits. (7598)^9==98^9. ==(-2 )^9 Mod 100 ==-512 Mod 100 ==-12 ==100-12 ==88 Mod 100. So the last two digits are both 8.
     
    Last edited: Sep 4, 2007
  17. Sep 5, 2007 #16

    uart

    User Avatar
    Science Advisor

    Hi cepheid, here's a few really simple exercises you should do to help your understanding of modulo arithmetic. Take the time to work though these and prove them for yourself (they're not difficult) and I guarantee that you will then fully understand all of the methods given above.

    1. Start with the following property of modulo n as given.

    a = (a mod n) + k n , for some integer k

    2. Prove that with modulo addition that taking modulo of any/all the arguments before adding makes no change to the result. That is,

    (a + b) mod n = (a mod n + b mod n) mod n

    3. Use the above result to prove that with modulo multiplication that taking modulo of any/all the arguments before multiplying makes no change to the result. That is,

    (a b) mod n = ((a mod n) (b mod n)) mod n

    4. Use the above result to prove that with modulo exponentiation that taking modulo of the base (not the exponent) before exponentiating makes no change to the result. That is,

    (a^b) mod n = ((a mod n)^b) mod n

    Hope this helps.
     
    Last edited: Sep 5, 2007
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?