PDA

View Full Version : Arithmetic Problem


cepheid
Sep1-07, 01:42 AM
n = (28)^3

which is greater:

the units digit of n

OR

4?

How does one go about *computing* the units digit of n?

bob1182006
Sep1-07, 02:03 AM
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...

cepheid
Sep1-07, 03:19 AM
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.

cepheid
Sep1-07, 03:26 AM
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.

Werg22
Sep1-07, 03:27 AM
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.

cepheid
Sep1-07, 03:32 AM
That's the *general strategy*, then? Factor the number.

EDIT: I think arithmetic is my least favourite branch of math.

Werg22
Sep1-07, 03:38 AM
That's the *general strategy*, then? Factor the number.

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.

robert Ihnot
Sep1-07, 02:03 PM
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.

matt grime
Sep1-07, 02:35 PM
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.

cepheid
Sep3-07, 05:46 PM
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:

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.

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

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!

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?

This way helps because suppose the problem was (7598)^10. That matter reduces to (-2)^10 = 64 == 4 Mod 10.

Doesn't (-2)^10 = 1024 ?

matt grime
Sep3-07, 06:50 PM
That last sentence indicates you don't understand what 'mod 10' means at all. Try to link the things I said to this.

cepheid
Sep3-07, 09:03 PM
Umm, so what what about the second last paragraph? Can anyone address the question I was asking?

That last sentence indicates you don't understand what 'mod 10' means at all.

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.

d_leet
Sep3-07, 09:26 PM
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.

I think that was a mistake becaue you would have (-2)^10=1024==4(mod 10)

cepheid
Sep3-07, 11:27 PM
I think that was a mistake becaue you would have (-2)^10=1024==4(mod 10)

Great! Now that that has been established, can anyone help me out with my question? (post 10).

robert Ihnot
Sep4-07, 12:27 AM
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.

uart
Sep5-07, 11:05 AM
Great! Now that that has been established, can anyone help me out with my question? (post 10).

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.