Combinatorics question regarding arranging $13$ balls in a line but with a condition that on neither of the sides have a blue ball. I have $13$ balls. $6$ red , $4$ blue , $3$ yellow. I want to arrange in a line such that the right side and the left side do not have blue balls. ( balls in the same color are not distinct ).
I tried to calculate the options without any terms or conditions which is 13! divided by $6!4!3!$. ( ! is factorial )
and then subtract the options that contain having blue ball on the right side and the left side which is : ($4$ choose $2$ for the blue balls on each side) multiply by ( $11!$ divided by $(6!2!3!)$ which are the remaining $11$ balls left).
but I'm not getting the right answer. What am I doing wrong in the process?

You write:

and then subtract the options that contain having blue ball on the right side and the left side

But what you need is to subtract off the number of arrangements that have a blue ball on the left or right side.
You multiply by $\binom{4}{2}$, I guess to pick which blue balls go on the side? But you don't need this factor since they're indistinguishable. As soon as you say B goes on the left side, all you need is to specify the other 12 balls.
Instead I would break it into 3 steps:

*

*Find the number of arrangements where B is on the left

*Find the number of arrangements where B is on the right

*Subtract the number of arrangements where B is on both sides, to avoid double counting

