# Having at least one row of zeros on $5\times5$ board

If I have a $$5\times5$$ board that in each cell could have one of two numbers; $$0, 1$$. What is the probability that there will be at least one row of only zeros?

So the sample space is $$\ 2^{25}$$ (?) and at first I tried to think of each event. Like $$\ A_i$$ will be the event that the row $$\ i$$ will be zeros but there are $$5$$ different events and it's getting to complicated to calculate it.

Any hints how could I make this problem easier?

• It will be a little easier to think of how many ways there are without there being a row with all zeroes. Nov 1, 2018 at 13:55
• Yes I thought about it yet still couldn't come up with something.. Nov 1, 2018 at 13:56
• What is the probability that the first row does not consist solely of zeroes? Nov 1, 2018 at 13:58
• It should be $\ 1 - \frac{1 \cdot 2^{20}}{2^{25}}$ ? Nov 1, 2018 at 14:01
• If you think of a single row, there are 32 possible ways to fill it in ... only one of them has all zeroes ... so there are 31 ways to fill a row without having all zeroes ... so ... Nov 1, 2018 at 14:05

You want that the probability that it's not the case that every row has at least one nonzero.

For any given row to have at least one nonzero, you want that it's not all zeroes. The probability of that's $$1-(\frac12)^5$$.

Then that the above is untrue for at least one row you want to take away from certainty, the probability it's true for every row:

$$1-\left(1-\left(\frac12\right)^5\right)^5=\frac{4925281}{33554432}$$

• Let me make sure I understood. The probability of having at least one non zero in some row $\ i$ is $\ 1 - 0.5^5$ and then you say the probability of having at least one non-zero in every row is $\ {(1-0.5^5)}^5)$ and so the complement of this will give me the probability of having at least one row with all integer zero's? Nov 1, 2018 at 15:04
• @bm1125 yes that's right... and p.s. I checked this vs Bram's answer and they coincide which is reassuring. Taking $1-p(x=0)$ to find the probability of "at least least one" is a standard question in probability. This just does that twice. Nov 1, 2018 at 15:56

Let $$R_i$$ denote the number of possibilities with only zero's in row $$i$$.

To be found is $$2^{-25}|R_1\cup R_2\cup R_3\cup R_4\cup R_5|$$ and with the principle of inclusion/exclusion and symmetry we find:$$|R_1\cup R_2\cup R_3\cup R_4\cup R_5|=$$$$5|R_1|-10|R_1\cap R_2|+10|R_1\cap R_2\cap R_3|-5|R_1\cap R_2\cap R_3\cap R_4|+|R_1\cap R_2\cap R_3\cap R_4\cap R_5|=$$$$5\cdot2^{20}-10\cdot2^{15}+10\cdot2^{10}-5\cdot2^5+1\cdot2^0$$

• Thanks for your answer! I'm not sure what am I missing, I would think that $\ P(R_1 \cap R_2) = \frac{1}{2^{10}}$ and $\ P(R_1 \cap R_2 \cap R_3) = \frac{1}{2^{15}}$ and $\ P(R_1 \cap R_2 \cap R_3 \cap R_4 \cap R_5) = \frac{1}{2^{25}}$ Nov 1, 2018 at 14:24
• $P(R_1\cap R_2)=2^{-10}$ is correct and corresponds with $|R_1\cap R_2|=2^{15}$. The cardinality must be divided by $2^{25}$ (total number of possibilities) to get the probability. Nov 1, 2018 at 14:28

There is only $$1$$ out of $$32$$ possible ways to fill a row with all $$0$$'s

If follows that there are $$31$$ ways to fill a row without it having all $$0$$'s.

Hence, there are $$31^5$$ ways to fill all $$5$$ rows without any of them having all $$0$$'s

So, there are $$32^5-31^5$$ ways to fill the $$5$$ rows with at least of them having all $$0$$'s

Therefore, the probability of having at least one row with all $$0$$'s is:

$$\frac{32^5-31^5}{32^5}$$