\section*{Problem 6B - 131236B}

Let \(M\) be the set of all points \(P(x, y)\) in a plane rectangular Cartesian coordinate system, where \(x, y\) are rational integers, and \(0 \leq x \leq 4\) and \(0 \leq y \leq 4\).

Determine the probability that the distance between two different points chosen arbitrarily from \(M\) is a rational integer (the unit of measurement being the unit of the coordinate system).

Hint: If \(n\) is the number of different ways to choose two points and \(m\) is the number of ways in which the distance is a rational integer, then the quotient \(\frac{m}{n}\) is the probability to be determined. Two selection possibilities are considered different if and only if the sets of points (each consisting of two points) selected in them are different.
}

There are 25 points, and thus in total

\[
n=\frac{25 \cdot 24}{2}=300
\]

selection options for the (unordered) point pairs. Clearly, the distance for such a point pair is certainly rational if one of the two coordinates of the points coincides, which is the case in

\[
100\left(=2 \cdot 5 \cdot\binom{5}{4}\right)
\]

cases. In addition, there are all 8 point pairs \(\left\{\left(x_{1}, y_{1}\right),\left(x_{2}, y_{2}\right)\right\}\) for which

\[
\left\{\left|x_{1}-x 2\right|,\left|y_{1}-y_{2}\right|\right\}=\{3,4\}
\]

holds, as for them the distance \(5=\left(\sqrt{3^{2}+4^{2}}\right)\) is also rational. Thus, \(m=108\) and

\[
\frac{m}{n}=\frac{108}{300}=\frac{9}{25}=0.36
\]

for the desired probability here.