Round Table Seating Problem Let us have a class $\space C \space$ with $\space n \space$ pupils, and let there are $\space n_b \space$ boys and $\space n_g \space$ girls, where $\space 0 < n_b \le n_g \space \left(n_b + n_g = n \right)$. In how many ways can they all sit around the table so that no girl have boys as both neighbors?
All I do, so far, is some calculation by hand. This is what I found:

*

*for $\space n=3 \space$ the number of possible ways is $\space 3$,

*for $\space n=4 \space$ the number of possible ways is $\space 8$,

*for $\space n=5 \space$ the number of possible ways is $\space 10$,

*for $\space n=6 \space$ the number of possible ways is $\space 21$.


Figures for $\space n=3, \space$ and $\space n=4$:


 A: First we should have $g$ girls sit on the round table, no. of ways $= (g-1)!$
Now you can have $b$ boys sit in alternate places between them so that at least on one side of each girl, there is a girl.
Case 1: $g$ is even.
Empty places meeting the condition, $e = \frac{g}{2}$
$b$ boys can sit in $e$ places as $\displaystyle \frac {(b + e - 1)!}{(e-1)!}$
You can look at the above permutation in two steps. Use Stars and Bars so $e$ places sum to $b$ count. This is because, as an example, you can have all boys between two girls and all other places can remain empty (meaning all other girls are together). After Stars and Bars, given these are boys we are talking about and not identical objects, they can be arranged in $b!$ ways.
Now please note, there are $2$ ways to choose these $e$ alternate places.
So total number of ways = $\displaystyle \frac{2 \, (g-1)! \, (b + e - 1)!}{(e-1)!}$
Case 2: $g$ is odd. You will have $1/2$ of $(g-1)$ empty places meeting the condition. Also the number of ways to choose $e$ places will be $g$ because you can have $2$ consecutive alternating places empty.
So total number of ways = $\displaystyle \frac{g \, (g-1)! \, (b + e - 1)!}{(e-1)!}$
