$25$ colored dice $25$ colored dice are thrown and their results are put at random at a square matrix $5\times 5$. Dice colors are as follows: $5$ Red, $5$ Blue, $5$ Yellow, $5$ Green and $5$ Orange.


I am interested in calculating the following probabilities:



*

*The probability that a bar of length $3$ ($3$ consecutive dice of the same color),    vertical or horizontal, appears somewhere in the grid. 

*The probability that a bar of length $4$ ($4$ consecutive dice of the same color),    vertical or horizontal, appears somewhere in the grid. 

*The probability that a bar of length $5$ ($5$ consecutive dice of the same color),    vertical or horizontal, appears somewhere in the grid. 

 A: The third question can be solved without a computer.
We have one condition for each row and one for each column. Multiple conditions can only be satisfied simultaneously if they correspond to the same direction.
The probablity for $k$ particular compatible conditions to be satisfied simultaneously is $\prod_{j=0}^{k-1}\frac{5-j}{\binom{25-5j}5}$.
Thus, by inclusion–exclusion the probability for at least one of the conditions to be satisfied is
$$
10\cdot\frac5{\binom{25}5}-2\cdot\binom52\cdot\frac{5\cdot4}{\binom{25}5\binom{20}5}+2\cdot\binom53\cdot\frac{5\cdot4\cdot3}{\binom{25}5\binom{20}5\binom{15}5}
\\
-2\cdot\binom54\cdot\frac{5\cdot4\cdot3\cdot2}{\binom{25}5\binom{20}5\binom{15}5\binom{10}5}+2\cdot\binom55\cdot\frac{5\cdot4\cdot3\cdot2\cdot1}{\binom{25}5\binom{20}5\binom{15}5\binom{10}5\binom55}
\\
=\frac5{5313}-\frac5{10296594}+\frac5{10306890594}-\frac5{2597336429688}+\frac1{2597336429688}
\\[15pt]
=\frac{32145551}{34175479338}\approx9.406\cdot10^{-4}\;.
$$
Since it's highly unlikely that more than one condition is satisfied, this probability is very well approximated by the expected number of satisfied conditions,
$$
10\cdot\frac5{\binom{25}5}=\frac5{5313}\approx9.411\cdot10^{-4}\;.
$$
