Arranging boys and girls in a row Find the number of ways arranging 6 boys and 4 girls such that no boy sits in between 2 girls, i.e., he doesn't have 2 girls sitting immediately to his left and right. Assume that the boys and girls are not identical. In the book that I did it from gives the answer as $120960(=7!*4!)$ which I know is wrong as they have considered only the case when all the 4 girls are together. It should be greater than that because the case of $G_1G_2B_1B_2B_3G_3B_4B_5G_4B_6$ is also possible. I went doing it casewise like the number of possible cases when  no girls are sitting together, 2 girls are sitting together,... and so on, but it seems like a very lengthy approach. Is there an easier way to solve the problem?  
 A: You won't get the answer without some case-sorting, but I think I found a way which isn't that lengthy.
I will use the popular stars and bars notation to restate the problem. Let the girls be the bars that need to be placed between boys. To satisfy the requirements, there needs to be an arrangement like this:
$$ \circ | \Box | \Box | \Box | \circ $$
where in a position with square $\Box$ there can be $0$ or $2$ or more boys, and in a position with circle $\circ$ any number of boys.
Since the girls and boys are distinguishable, we can rearrange the girls in $4!$ ways and boys in $6!$ ways to yield new arrangement. So it suffices to count the arrangements where they are indistinguishable and multiply by $4!6!$.
Case 1. All squares have $0$ boys.
Then the $4$ bars effectively merge, because there is nothing between them. We have an arrangement like this: $\circ|\circ$
So we need to find the ways to put $1$ bar somewhere among $n_1=6$ boys. Since both edge positions are allowed, we have $n_1=6-1+2=7$ allowed spots. So there are $N_1=7$ possible arrangements. (Note that this is the case considered in your book, yielding $7!4!$)
Case 2. $2$ squares have $0$ boys.
We have an arrangement like this: $\circ|\Box|\circ$ which is equivalent to putting $2$ bars among $4$ boys (we know there are at least $2$ boys in the square, so we can distribute the remaining $4$ freely). So we need to put $2$ bars in $n_2=5$ spots. This is given by multiset coefficient, or combinations with repetition:
$$N_2= \left(\!\!{\binom{5}{2}}\!\!\right) = \binom{5+2-1}{2} = \binom{6}{2} = 15$$
Since any of the $3$ squares can have $2$ or more boys, we need to multiply the result by $3$.
Case 3. $1$ square has $0$ boys.
$$N_3= \binom{5}{3} = 10$$
Again we need to multiply the answer by $3$, since the empty square can be any of the $3$.
Case 4. No square has $0$ boys.
$$N_4= \binom{4}{4} = 1$$
Summary.
$N = (N_1 + 3N_2 + 3N_3 + N_4) \cdot 4!6! = 83 \cdot 4!6!$
A: You are asking for all the ways arranging these $b$ boys and $g$ girls. If you are interested in the ways (and not just in the number of those ways), a program seems to be the only choice:
import Control.Monad

boysgirls :: Bool -> Int -> Int -> [String]
-- Parameters:
--    Bool: Whether the last person was a girl
--    Int, Int: Number of boys and girls (resp)
--
-- Cases:
-- 0 boys, 0 girls => one possibility
boysgirls _ 0 0 = [ "" ]
-- 0 boys, g girls => one possibility: 'G...G' (g times)
boysgirls _ 0 g = [ replicate g 'G' ]
boysgirls _ b 0 = [ replicate b 'B' ]
-- for b, g , => try all possibilities
boysgirls lastWasGirl b g =
        if (b < 0 || g < 0) then [] else casegirl ++ caseboy
        where -- when trying to put a girl first, then
              -- add a girl left to of all possibilities for one girl left
              casegirl = map ('G':) (boysgirls True b (g-1))
              caseboy = if not lastWasGirl
                        -- if the last one was no girl, then we can just put a boy
                        -- without further restrictions
                        then map ('B':) (boysgirls False (b-1) g)
                        -- if the last one was a girl, we are not allowed to
                        -- bot another girl after the boy
                        -- we also know that there are still girls left
                        -- (otherwise a previous case would match), so we have
                        -- to put down two boys
                        else map (\t -> 'B':'B':t) (boysgirls False (b-2) g)

putBG b g = flip forM_ putStrLn $ boysgirls False b g

So you can use it as follows:
*Main> putBG 2 2
GGBB
GBBG
BGGB
BBGG
*Main> putBG 3 2
GGBBB
GBBGB
GBBBG
BGGBB
BGBBG
BBGGB
BBBGG
*Main> length $ boysgirls False 6 4 -- the actual requested numbers
83
*Main> putBG 6 4
GGGGBBBBBB
GGGBBGBBBB
GGGBBBGBBB
GGGBBBBGBB
GGGBBBBBGB
GGGBBBBBBG
GGBBGGBBBB
GGBBGBBGBB
GGBBGBBBGB
GGBBGBBBBG
GGBBBGGBBB
GGBBBGBBGB
GGBBBGBBBG
GGBBBBGGBB
GGBBBBGBBG
GGBBBBBGGB
GGBBBBBBGG
GBBGGGBBBB
GBBGGB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