## mathmath333 one year ago counting question

1. mathmath333

|dw:1440892159292:dw|

2. mathmath333

In how many different ways can we put all 5 identical balls in a 3$$\times$$3 grid . Such that each row contains was atleast one ball.

3. mathmath333

4. Nnesha

no mod power today sorry ;~;

5. IrishBoy123

think about choosing 4 blanks squares from 9, maybe

6. mathmath333

9C4

7. mathmath333

8. jim_thompson5910

There are 9 C 5 = 126 ways to place the balls without worrying about whether all rows have at least one ball or not. If we focus on the cases where one row is left out, like row 3 left out, then we have 6 C 5 = 6 ways to fill up the first two rows only. So there are 3*6 = 18 ways to fill up 2 rows only leaving out one row blank The last thing to do is subtract 126 - 18 = 108

9. IrishBoy123

that works

10. mathmath333

how is leaving one row empty and chossing 5 out 6 and multiplying by 3 is similar to condition at least one row has one ball

11. jim_thompson5910

Well you only have 2 options: you either have each row have at least 1 ball OR one row gets left out entirely when I calculated the "18", that's the number of ways to leave out 1 row I subtracted from 126 because of this property (number of ways where each row gets at least 1 ball) + (number of ways to leave out one row entirely) = total number of ways to fill up the slots