Two integers are $m$ , $n$ chosen at random with replacement from the set of integers $1,2,3..9$ . Find the probability that $m^2-n^2$ is divisible by $4$ .
my solution : Two integers can be chosen (with replacement ) in $9\times 9=81$ ways .
$m^2-n^2 $ is divisible iff either both $m,n$ are odd or both are even . There are $4\times 4=16 $ ways way of obtaining both even integers and $5\times 5=25 $ ways of obtaining both odd integer.
So total number of favorable outcome $=16+25=41$ .
Hence required probability = $\frac{41}{81}$ .
Now i would like to slightly change the question :
Two integers are $m$ , $n$ chosen at random without replacement from the set of integers $1,2,3..9$ . Find the probability that $m^2-n^2$ is divisible by $4$
my solution when order consideration is relevant :
Total number of obtaining two integers $= 2\times 9\times 8=2\times 72$
Numbers ways of obtaining two even numbers $=2\times 4\times 3 $ and number of ways obtaining odd numbers $=2\times 5\times 4$ .
So total number of favorable cases= $2(4\times 3+5 \times 4)=2\times 32 $ . Hence required probability $=\frac{2 \times 32 }{2 \times 72 }=\frac{32}{72}$
my solution when order is considered irrelevant
Total numbers of cases $=9\times 8=72$
Numbers of ways obtaining both even and both odd integers is $4\times3=12$ and $5\times4=20$ respectably .
So number of favorable cases$=12+20=32$ .
Hence probability =$\frac{32}{72}$
Is my understanding in above problems correct ? Please point out if i calculated anything wrong?
Thank you