2

Imagine a 10 x 5 grid where each square can be either 1 or 0. However, each row (10 squares) must contain five 1's and five 0's. Therefore, each grid (of 50 squares) has twenty five 1's and twenty five 0's but their distribution is somewhat controlled in that each row must contain five of each.

How many possible combinations of grids can this produce?

  • You seem to have a requirement of "even distribution" for rows (10 squares) but not columns (5 squares). So if you work out how many possibilities there are for one row, raising that to the fifth power (because there are five rows) gives the answer. – hardmath Mar 18 '19 at 19:07
  • So that would be (2^10 )^5 ? – lurning too koad Mar 18 '19 at 19:14
  • No, use the binomial coefficient to count choosing five out of ten entries in one row. $2^{10}$ would count all possible subsets, not just the "evenly distributed" possibilities. See Answer below. – hardmath Mar 18 '19 at 19:18
  • Where do I send your food? – lurning too koad Mar 18 '19 at 19:21
  • 1
    Heh, I will dream of rows of eclairs (ones) and doughnuts (zeros)! – hardmath Mar 18 '19 at 19:24

1 Answers1

3

For each row, choose five positions to have 1's. The remaining 5 positions have zeros. Do this for each row.

That is:

$$\dbinom{10}{5}^5 = 252^5$$

SlipEternal
  • 10,555
  • 1
  • 17
  • 38
  • Clearly I'm not a math guy (I'm trying to compute the possibilities of a visual hash in my program) and so excuse my ignorance, but what is that (10 5) notation/syntax called? I'm not familiar with it. – lurning too koad Mar 18 '19 at 19:23
  • 1
    @hgale $\binom{n}k=\frac{n!}{(n-k)!\cdot k!}$ is the binomial coefficient. See here In your case$\binom{10}5=\frac{10\cdot 9\cdot 8\cdot 7\cdot 6}{1\cdot 2\cdot 3\cdot 4\cdot 5}=252$ – callculus42 Mar 18 '19 at 19:39
  • ...if only they were this nice in the iOS tag lolz – lurning too koad Mar 18 '19 at 19:48