There are 5 boys and 4 girls in my class. In how many ways can they be seated in a row of 9 chairs such that at least 2 boys are next to each other
Notice that this is equivalent to finding the the total number of possible arrangements less the number of arrangements where none of the boys sit together
Since the total number of students = 9, the total number of arrangements = 9!
And the arrangement that would have none of the boys sitting together would look like this :
B G B G B G B G B
And we have 5! ways to arrange the boys and 4! ways to arrange the girls
So.....the total number of arrangements where none of the boys sit together = 5! * 4!
So....the total ways in which they can be arranged with at least two boys next to each other =
9! - 5! * 4! = 362880 - 360,000 = 2880