Given n girls and boys how many ways are there to arrange them such that any two boys have atleast 'k' girls between them. Professor X wants to position $1 \leq  N \leq 100,000$ girls and boys in a single row to present at the annual fair.
Professor has observed that the boys have been quite pugnacious lately; if two boys too close together in the line, they will argue and begin to fight, ruining the presentation. Ever resourceful, Professor calculated that any two boys must have at least $0 \leq K < N $ girls between them in order to avoid a fight.
Professor would like you to help him by counting the number of possible sequences of $N$ boys and girls that avoid any fighting. Professor considers all boys to be the same and all girls to be the same; thus, two sequences are only different if they have different kinds of students in some position.
 A: If you have the same number (greater than 2) of boys and girls and $K \gt 1$, it is easy-there is no solution.  Let us assume we have $B$ boys and $G$ girls.  Take each boy except one and attach K girls to his right and line up the groups.  Add the last boy to the end of the row.  You now have $G-K(B-1)$ girls left.  If this is less than zero, you are done and there is no solution.  If it is zero, you are done and have the only solution.  Otherwise you have $B+1$ places to put the remaining girls.  You are looking for a weak composition of $G-K(B-1)$ into $B+1$ parts, of which there are ${G-K(B-1)+B-1 \choose B}$  
Added:  Say we have $3$ boys and $17$ girls and $K=3$.  We line up $\_BGGG\_BGGG\_B\_$ where the girls shown are needed to keep the boys apart.  The blanks show places where we might put the remaining $11$ girls.  We have to choose four numbers (which can include $0$) in order that sum to $11$, which is what a weak composition means.  If we increase each number by $1$, we are looking for four numbers in order that sum to $15$.  Think of lining up $15$ objects and putting three dividers between them or at the ends of the row.  That shows there are ${16 \choose 3}$ strong compositions of $15$ or weak compositions of $11$ into four parts.  If you are given only $N,K$ but not $B,G$, you have to sum over all possibilities of $B+G=N$
