How many ways can $7$ professors and $5$ students be seated at this long rectangular table so that no student sits across from another student

combinationscombinatorics

So, I was doing a simple combinatorics problem, and I merely wanted to know where I actually went wrong.

So the question was:

Here is the image since I can't add images to post

My Method:
So originally, I realised that the only possible combinations which would not be included were once where $2$ students or $4$ students were sitting across from the table, and in the case where $4$ students were sitting across from each other, $2$ students were still in some way shape or form sitting across from each other.

So I originally assumed that $2$ students were sitting across from each other, something like this (s means students):

Here

This includes all the combinations that we don't want (I think), because as I explained before, $2$ students always sit across each other when we discard a permutation.

So the total number of such permutations would be $(5 \cdot 4) \cdot 6 \cdot 10!$ ($5 \cdot 4$ represents the way in which we can choose the $2$ students who would be sitting across from each other, $6$ because the $2$ students can be in any $6$ columns, and $10!$ to order the remaining $10$ people since we don't particularly care how they are seated since we have violated the condition anyways)

The actual answer includes seating the students first, which can be seated in $12 \cdot 10 \cdot 8 \cdot 6 \cdot 4$ and then the professors in $7!$ ways.

But I'm confused as to why what I described does not work, where am I missing something?

Best Answer

The problem with your solution is that you're not accounting for the possibility that more than one pair of students sits across from one another, so you're double counting those combinations. You can handle that with the principle of inclusion and exclusion and eventually get the correct answer, but it'll be a little messy.

I would solve the problem this way: There are $6$ columns, of which $5$ must have exactly one student each. There are $\binom 65=6$ ways to choose those $5$ columns. Once they're chosen, there are $2^5$ ways to choose which seats get students, and there are $5!$ ways to seat the students once those choices are made. Finally, there are $7!$ ways to seat the professors. Thus, the answer is $2^5 \cdot 6! \cdot 7!$. This is the same as the given answer because $2^5 \cdot 6! = 12 \cdot 10 \cdot 8 \cdot 6 \cdot 4 \cdot 1$.