# In how many ways can a teacher sit k students on n chairs so that no 2 students sit next to each other? [duplicate]

There are $n$ chairs in a row. In how many ways can a teacher sit k students on these chairs so that no $2$ students sit next to each other (and obviously no $2$ students sit on $1$ chair)?

I think that is not a typical stars and bars problem. It is not exactly $\binom{n-1}{k-1}$ right?

• Your question is mostly identical to this one: math.stackexchange.com/questions/12587/… – Tanner Swett Jun 29 '17 at 13:59
• No, it's not $n! (k+1)!$. What are your thoughts after reading the top answer to the question I linked? Did you find that answer helpful? – Tanner Swett Jun 29 '17 at 14:11
• Yea i think so. I just made a little misunderstanding and then posted answer too quickly. The true answer regarding to linked topic should be n!(n+1 choose k) * k!. – endrew Jun 29 '17 at 14:13
• This exact question has been answered here. – N. F. Taussig Jun 29 '17 at 14:16

You can either have a student at the right end or not. If so, the rest of the students need an empty seat to their right, so attach a seat to each. You have $k-1$ pairs of student/empty and (how many) empty seats left? How many ways to arrange them. If not, attach a seat again and ...