## hartnn 3 years ago If a,b are integers, what is the probability that $a^2+b^2$ is divisible by 10 ?

1. hartnn

$$(a^2+b^2)/10$$ is integer

2. anonymous

|dw:1351968021756:dw|

3. hartnn

[0] means ?

4. anonymous

|dw:1351968165513:dw|

5. anonymous

|dw:1351968262315:dw|

6. anonymous

Is it clear?

7. hartnn

trying to understand...seeing this type of approach for first time...

8. hartnn

how did u get a,b belongs t0 {......}mod 5 ?

9. anonymous

|dw:1351968633462:dw|

10. anonymous

|dw:1351968728104:dw|

11. anonymous

|dw:1351968805888:dw|

12. hartnn

i think i am getting this a bit.....need to think

13. anonymous

|dw:1351968902151:dw|

14. hartnn

can u expalin more on why there is just one option ?

15. anonymous

a and b are independent so P(a,b)=P(a).P(b)

16. hartnn

i think i got other parts, except that there is only 1 option

17. anonymous

|dw:1351969216109:dw|

18. hartnn

ohh....right...i'll go through this again. thanks!

19. anonymous

|dw:1351969399186:dw|

20. hartnn

Also, any alternative approach will be appreciated....

21. hartnn

@mukushla any other approach you can think of?

22. anonymous

for some reason, i only have p = 0.10

23. hartnn

me too, but thats incorrect.

24. anonymous

i found my error. it is as what mahmit gave. but i have a different proof.

25. hartnn

plz share.

26. anonymous

break the parity of a and b into odd-odd, odd-even, even-odd and even-even. clearly, p(odd-even) and p(even-odd) = 0 since the sum of squares is odd, not divisible by 2.

27. hartnn

sorry,didn't get u...

28. anonymous

still polishing my argument.

29. klimenkov

Use this rule. If $$a\equiv x \mod 10$$ then $$a^2\equiv x^2 \mod 10$$ All different values for a can be 0,1,2,3,4,5,6,7,8,9,10. The probability that a is divisible by 10 is 1/10. Now find the values for $$a^2$$ in mod 10.

30. hartnn

1/6

31. anonymous

oops, i got 0.18 this time. hahaha. do you have the correct answer?

32. klimenkov

|dw:1352033013459:dw|

33. hartnn

no, i don't have correct answer

34. hartnn

for a^2, probability is 1/6, i get that what about a^2+b^2

35. anonymous

i got it, 0.18

36. klimenkov

Now what is probability:|dw:1352033286386:dw|

37. klimenkov

The same table is for b. Now you have to write a table for $$a^2+b^2$$ and watch what is for 0. Got it?

38. anonymous

|dw:1352033270108:dw|

39. hartnn

are both of you doing same thing ?

40. klimenkov

Yes.

41. klimenkov

Can you write a table for $$a^2+b^2$$ ? With probabilities?

42. hartnn

it will also contain 10 columns,right ? trying....

43. klimenkov

Right.

44. anonymous

just count pairs that add up to 10 in my table. there should be 18 of them. (0,0), (1,3), (1,7), to list a few

45. klimenkov

If you want to get it, better to draw the whole table for $$a^2+b^2$$.

46. hartnn

why is the answer drastically different from 2% ?

47. Zarkon

2 5 0 7 6 7 0 5 2 1 5 8 3 0 9 0 3 8 5 4 0 3 8 5 4 5 8 3 0 9 7 0 5 2 1 2 5 0 7 6 6 9 4 1 0 1 4 9 6 5 7 0 5 2 1 2 5 0 7 6 0 3 8 5 4 5 8 3 0 9 5 8 3 0 9 0 3 8 5 4 2 5 0 7 6 7 0 5 2 1 1 4 9 6 5 6 9 4 1 0

48. anonymous

here's the first half of (a,b) mod 10 (0,0), (1,3), (1,7), (2,4), (2,6), (3,1), (3,9), (4,2),(4,8)

49. klimenkov

Answer is $$\frac{14}{100}=0.14$$.

50. anonymous

i say it's 18/100, same as @Zarkon

51. hartnn

why is the answer drastically different from 2% ? how is that table formed ? @Zarkon ?

52. anonymous

the 2% only counted 5,5 and 0,0.

53. klimenkov

@sirm3d please write all the pairs.

54. Zarkon

I used Octave

55. Zarkon

for i=1:10;for j=1:10;A(i,j)=mod(i^2+j^2,10);endfor;endfor

56. Zarkon

>> A A = 2 5 0 7 6 7 0 5 2 1 5 8 3 0 9 0 3 8 5 4 0 3 8 5 4 5 8 3 0 9 7 0 5 2 1 2 5 0 7 6 6 9 4 1 0 1 4 9 6 5 7 0 5 2 1 2 5 0 7 6 0 3 8 5 4 5 8 3 0 9 5 8 3 0 9 0 3 8 5 4 2 5 0 7 6 7 0 5 2 1 1 4 9 6 5 6 9 4 1 0 >> length(find(A==0)) ans = 18

57. anonymous

here's the other nine (5,5) (6,2), (6,8) (7,1), (7,9) (8,4), (8,6) (9,3), (9,7)

58. hartnn

also why are we only considering numbers till 100, will it make any difference, if we consider 1000 numbers ?

59. klimenkov

Sorry, my fault. Really - $$\frac{18}{100}$$

60. hartnn

i got now, how we got 18 pairs for 100....

61. anonymous

finally, we are all in agreement. hurrah.

62. hartnn

why consider only 100? will it make any difference, if we consider 1000 numbers ?

63. hartnn

because if we consider only 10 numbers, we get different answer....

64. hartnn

0.2

65. anonymous

5^2 + 15^2 is divisible by 10, so is 5^2 + (10k+5)^2, so why bother bigger numbers, when the last digit suffices?

66. Zarkon

you are doing division by 10 (mod 10) there are only 10 numbers in that system. So we only need to consider the 10x10 possibilities to get the proportion

67. hartnn

aah! okk, got that....

68. anonymous

|dw:1352043506996:dw|

69. anonymous

|dw:1352043883988:dw|

70. anonymous

0.18 is not true. 0.02 is true. Be sure.

71. hartnn

where's the fault in our discussion ?

72. anonymous

@mahmit2012 what about the pairs 1,7 and 1,3? are they not solutions too? they were not counted in your argument.

73. anonymous

@mahmit2012 you only saw 5,5 and 0,0 in your proof. that explains your 2/100=0.02. what about 1,7 pair?

74. anonymous

|dw:1352045197951:dw|

75. anonymous

|dw:1352045432135:dw|