6. A bag contains $m$ red balls and $n$ white balls, $m>n \geq 4$. Now, two balls are drawn at random. If the probability of drawing two balls of the same color is equal to the probability of drawing two balls of different colors, then the number of arrays $(m, n)$ that satisfy the relation $m+n \leq 40$ is $\qquad$ .
答贵 3 .
解析 记 “取出两个红球”为事件 $A$, “取出两个白球”为事件 $B$, “取出一红一白两球”为事件 $C$, 则
$$
P(A)=\frac{C_{m}^{2}}{C_{m+n}^{2}}, \quad P(B)=\frac{C_{n}^{2}}{C_{m+n}^{2}}, \quad P(C)=\frac{C_{m}^{1} \cdot C_{n}^{1}}{C_{m+n}^{2}}
$$

依题得 $P(A)+P(B)=P(C)$, 即 $C_{m}^{2}+C_{n}^{2}=C_{m}^{1} C_{n}^{1}$, 所以 $m+n=(m-n)^{2}$, 从而 $m+n$ 为完全平方数, 又由 $m>n \geq 4$ 及 $m+n \leq 40$, 得 $9 \leq m+n \leq 40$, 所以
$$
\left\{\begin{array} { l } 
{ m + n = 9 } \\
{ m - n = 3 }
\end{array} \text { , or } \left\{\begin{array} { l } 
{ m + n = 1 6 } \\
{ m - n = 4 }
\end{array} \text { , or } \left\{\begin{array} { l } 
{ m + n = 2 5 } \\
{ m - n = 5 }
\end{array} \text { , or } \left\{\begin{array}{l}
m+n=36 \\
m-n=6
\end{array}\right.\right.\right.\right.
$$

解之得 $(m, n)=(6,3)$ (discard), or $(10,6)$, or $(15,10)$, or $(21,15)$. 故符合题意的数组 $(m, n)$ 有 3 个.

Answer: 3.
Explanation: Let "drawing two red balls" be event $A$, "drawing two white balls" be event $B$, and "drawing one red and one white ball" be event $C$, then
$$
P(A)=\frac{C_{m}^{2}}{C_{m+n}^{2}}, \quad P(B)=\frac{C_{n}^{2}}{C_{m+n}^{2}}, \quad P(C)=\frac{C_{m}^{1} \cdot C_{n}^{1}}{C_{m+n}^{2}}
$$

According to the problem, $P(A)+P(B)=P(C)$, which means $C_{m}^{2}+C_{n}^{2}=C_{m}^{1} C_{n}^{1}$, so $m+n=(m-n)^{2}$, thus $m+n$ is a perfect square. Given $m>n \geq 4$ and $m+n \leq 40$, we have $9 \leq m+n \leq 40$, so
$$
\left\{\begin{array} { l } 
{ m + n = 9 } \\
{ m - n = 3 }
\end{array} \text { , or } \left\{\begin{array} { l } 
{ m + n = 1 6 } \\
{ m - n = 4 }
\end{array} \text { , or } \left\{\begin{array} { l } 
{ m + n = 2 5 } \\
{ m - n = 5 }
\end{array} \text { , or } \left\{\begin{array}{l}
m+n=36 \\
m-n=6
\end{array}\right.\right.\right.\right.
$$

Solving these, we get $(m, n)=(6,3)$ (discard), or $(10,6)$, or $(15,10)$, or $(21,15)$. Therefore, there are 3 pairs of $(m, n)$ that satisfy the conditions.