TITLE: Six x’s has to be placed in the squares in the adjacent figure, such that each row contains at least one x. This can be done in
QUESTION [5 upvotes]: Question is - 

Six x’s has to be placed in the squares in the adjacent figure, such
  that each row contains at least one x. This can be done in how many ways?

Due to the limit on the number of x's, I find this question very diffiult to solve. 
I tried representing the figure as $$_,_|_,_,_,_|_,_$$
And 3 x's are already use for each row and we are left with 3 more x's
but I'm unable to proceed further. How to tackle such problems?

REPLY [2 votes]: Here is an approach via generating functions.  Consider the more general problem of placing $r$ x's in the figure.  Let $a_r$ be the number of ways this can be done, subject to the constraint of having at least one x in each row.  Then the generating function for $\{a_r\}$ is
$$f(x) = [(1+x)^2-1]^2 \cdot [(1+x)^4-1] = x^8+8 x^7+26 x^6+44 x^5+40 x^4+16 x^3$$
The answer to the original problem is the coefficient of $x^6$, i.e. $26$.