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? So, I was doing a simple combinatorics problem, and I merely wanted to know where I actually went wrong.
So the question was:

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):

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?
 A: 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$.
A: Ah, I think I know the problem, but I am not sure if I can explain my thoughts clearly...
First of all, I think that you want to count how many solutions which DOES NOT satisfied the requirement, don't you? If yes, then I think the problem is "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 problem is, there will be some solutions which will be counted twice. In my following examples, S = student, P = professor, | = the sign to separate two chairs next to each other, and --TABLE- = the long table.
Example 1:
S1 | P6 | S5 | P2 | P4 | S3
-TABLE-
S2 | P7 | P1 | P3 | P5 | S4
There are two ways to create this example.

*

*First you choose the students S1 and S2, and let them sit both on the left corner of the table. In the 10! permutations of the remaining 10 seats, there is a permutation like this:

P6 | S5 | P2 | P4 | S3
-TABLE-
P7 | P1 | P3 | P5 | S4


*You can also choose S3 and S4, and choose their seats both on the right corner. In the 10! permutations of the remaining 10 seats, there is a permutation like:

S1 | P6 | S5 | P2 | P4
-TABLE-
S2 | P7 | P1 | P3 | P5
And as you can see, this two ways of choosing seats have the same outputs.
Example 2:
S1 | P6 | S5 | P2 | P7 | S2
-TABLE-
S3 | P4 | P1 | P3 | P5 | S4
Similarly, if you let S1 and S3 sit on the left corner or let S2 and S4 sit on the right corner, then there are respectively two permutations (you can point them out by yourself) which makes these two ways of arranging become the same.
I hope that my explanation helps. ^^
