In how many ways can 6 identical objects be placed into squares such that no row remains empty

combinatoricssolution-verification

In how many ways can 6 identical objects be placed into the squares given below such that no row remains empty? (one square can hold one object)

enter image description here

Since the total number of ways to put 6 objects into these 8 squares would be $8 \choose 6$, and of those 28, a row can be empty in two ways (one with $R_3$, and one with $R_2$ empty), the number of ways would be 26.

However, with an alternate method I get a wrong answer and I don't know why.

If I first fill up 1 square of each row, I can do this in ${2 \choose 1}.{2 \choose 1}.{4 \choose 1}$ ways. Now since no row is empty, I can fill up the remaining 5 squares with the remaining 3 objects in any way I want, so I can do this in ${5 \choose 3}$ ways. So in total I can do this in ${2 \choose 1}.{2 \choose 1}.{4 \choose 1}.{5 \choose 3}$ ways, which is 160 ways.

Where am I going wrong in this method? I'm assuming that this counts some cases multiple times, but its not immediately striking me as to which cases could repeat. Any help with understanding what's going wrong is appreciated.

Best Answer

Your first method is correct.

Your second method does indeed count each distribution multiple times.

The possible distributions are $(4, 1, 1)$, $(3, 2, 1)$, $(3, 1, 2)$, and $(2, 2, 2)$.

There are four distributions of the form $(4, 1, 1)$, depending on whether the left or right square is left empty in the second and third rows. Your second method counts such distributions four times, once for each way you could have designated one of the four objects in the first row as the object in the first row.

There are eight distributions of the form $(3, 2, 1)$, depending on which of the four squares is left empty in the first row and which of the two squares is left empty in the third row. Your second method counts such distributions $3 \cdot 2 = 6$ times, once for each way you could have designated one of the objects in the first row as the object in the first row and once for each way you could have designated one of the objects in the second row as the object in the second row.

By symmetry, there are eight distributions of the form $(3, 1, 2)$, each of which you have counted six times.

There are six distributions of the form $(2, 2, 2)$, depending on which two entries have been left empty in the first row. Your second method counts each such distribution $2 \cdot 2 \cdot 2 = 8$ times, once for each way you could have designated one of the two objects in each row as the object in that row.

Notice that $$\color{red}{4} \cdot 4 + 2 \cdot \color{red}{6} \cdot 8 + \color{red}{8} \cdot 6 = \color{red}{16} + \color{red}{96} + \color{red}{48} = \color{red}{160}$$