0
$\begingroup$

Question:

Two numbers $x,y$ are selected from the set of natural numbers. Then what is the

probability that $x^2+y^2$ is divisible by $5$?

Attempt:

Since the natural number upper limits are not given, I do not understand how can I divide the number in parts.

mean $1,6,11,16,\cdots \cdots 5n+1$

our $2,7,12,17,\cdots \cdots 5n+2$

our $3,8,13,18,\cdots \cdots 5n+3$

our $4,9,14,19,\cdots \cdots 5n+4$

our $5,10,15,20,25,\cdots \cdots, 5n$

Could some one help me with this? Thanks.

  • 0
    You cannot have a universal distribution on the set of natural numbers.2017-01-05

2 Answers 2

6

Considering the following cases gives a probability of $9/25$:

  • $\small[x\equiv0\pmod5]\wedge[y\equiv0\pmod5]\implies[x^2+y^2\equiv0^2+0^2\equiv\color\red 0\pmod5]$
  • $\small[x\equiv0\pmod5]\wedge[y\equiv1\pmod5]\implies[x^2+y^2\equiv0^2+1^2\equiv\color\green1\pmod5]$
  • $\small[x\equiv0\pmod5]\wedge[y\equiv2\pmod5]\implies[x^2+y^2\equiv0^2+2^2\equiv\color\green4\pmod5]$
  • $\small[x\equiv0\pmod5]\wedge[y\equiv3\pmod5]\implies[x^2+y^2\equiv0^2+3^2\equiv\color\green4\pmod5]$
  • $\small[x\equiv0\pmod5]\wedge[y\equiv4\pmod5]\implies[x^2+y^2\equiv0^2+4^2\equiv\color\green1\pmod5]$
  • $\small[x\equiv1\pmod5]\wedge[y\equiv0\pmod5]\implies[x^2+y^2\equiv1^2+0^2\equiv\color\green1\pmod5]$
  • $\small[x\equiv1\pmod5]\wedge[y\equiv1\pmod5]\implies[x^2+y^2\equiv1^2+1^2\equiv\color\green2\pmod5]$
  • $\small[x\equiv1\pmod5]\wedge[y\equiv2\pmod5]\implies[x^2+y^2\equiv1^2+2^2\equiv\color\red 0\pmod5]$
  • $\small[x\equiv1\pmod5]\wedge[y\equiv3\pmod5]\implies[x^2+y^2\equiv1^2+3^2\equiv\color\red 0\pmod5]$
  • $\small[x\equiv1\pmod5]\wedge[y\equiv4\pmod5]\implies[x^2+y^2\equiv1^2+4^2\equiv\color\green2\pmod5]$
  • $\small[x\equiv2\pmod5]\wedge[y\equiv0\pmod5]\implies[x^2+y^2\equiv2^2+0^2\equiv\color\green4\pmod5]$
  • $\small[x\equiv2\pmod5]\wedge[y\equiv1\pmod5]\implies[x^2+y^2\equiv2^2+1^2\equiv\color\red 0\pmod5]$
  • $\small[x\equiv2\pmod5]\wedge[y\equiv2\pmod5]\implies[x^2+y^2\equiv2^2+2^2\equiv\color\green3\pmod5]$
  • $\small[x\equiv2\pmod5]\wedge[y\equiv3\pmod5]\implies[x^2+y^2\equiv2^2+3^2\equiv\color\green3\pmod5]$
  • $\small[x\equiv2\pmod5]\wedge[y\equiv4\pmod5]\implies[x^2+y^2\equiv2^2+4^2\equiv\color\red 0\pmod5]$
  • $\small[x\equiv3\pmod5]\wedge[y\equiv0\pmod5]\implies[x^2+y^2\equiv3^2+0^2\equiv\color\green4\pmod5]$
  • $\small[x\equiv3\pmod5]\wedge[y\equiv1\pmod5]\implies[x^2+y^2\equiv3^2+1^2\equiv\color\red 0\pmod5]$
  • $\small[x\equiv3\pmod5]\wedge[y\equiv2\pmod5]\implies[x^2+y^2\equiv3^2+2^2\equiv\color\green3\pmod5]$
  • $\small[x\equiv3\pmod5]\wedge[y\equiv3\pmod5]\implies[x^2+y^2\equiv3^2+3^2\equiv\color\green3\pmod5]$
  • $\small[x\equiv3\pmod5]\wedge[y\equiv4\pmod5]\implies[x^2+y^2\equiv3^2+4^2\equiv\color\red 0\pmod5]$
  • $\small[x\equiv4\pmod5]\wedge[y\equiv0\pmod5]\implies[x^2+y^2\equiv4^2+0^2\equiv\color\green1\pmod5]$
  • $\small[x\equiv4\pmod5]\wedge[y\equiv1\pmod5]\implies[x^2+y^2\equiv4^2+1^2\equiv\color\green2\pmod5]$
  • $\small[x\equiv4\pmod5]\wedge[y\equiv2\pmod5]\implies[x^2+y^2\equiv4^2+2^2\equiv\color\red 0\pmod5]$
  • $\small[x\equiv4\pmod5]\wedge[y\equiv3\pmod5]\implies[x^2+y^2\equiv4^2+3^2\equiv\color\red 0\pmod5]$
  • $\small[x\equiv4\pmod5]\wedge[y\equiv4\pmod5]\implies[x^2+y^2\equiv4^2+4^2\equiv\color\green2\pmod5]$
  • 0
    A table is easier to read:$$ \begin{array}{cccccc} & 0 & 1 & 2 & 3 & 4 & \\ 0 & \color{red} 0 & \color{green}1 & \color{green}4 & \color{green}4 & \color{green}1 & \\ 1 & \color{green}1 & \color{green}2 & \color{red} 0 & \color{red} 0 & \color{green}2 & \\ 2 & \color{green}4 & \color{red} 0 & \color{green}3 & \color{green}3 & \color{red} 0 & \\ 3 & \color{green}4 & \color{red} 0 & \color{green}3 & \color{green}3 & \color{red} 0 & \\ 4 & \color{green}1 & \color{green}2 & \color{red} 0 & \color{red} 0 & \color{green}2 & \\\end{array} $$2017-01-05
  • 0
    @lhf: Yes, a lot more condensed for sure... I just wasn't sure how to depict a table in LaTex. Thank you for the illustration :)2017-01-05
5

Take the set of all possible unit digits of the squares of natural numbers as $\{0, 1, 4, 5, 6, 9\}$. But however all aren't equally likely: $0$ and $5$ only occur with probability $\frac{1}{10}$ each, the others with $\frac{1}{5}$ each. Now weighting all of the possible squares modulo $10$ by these probabilities, we get $\frac{9}{25}$ as the probability. Hope it helps.