# Seating Arrangement with Derangement

A group of n students is assigned seats for each of two classes in the same classroom.How many ways can these seats be assigned if no student is assigned the same seat for both classes?

Okay so this can be done like first I can have $$n!$$ ways to seat n students in class 1 of the classroom and then when class 2 begins, I make sure these n students sit in $$D_n$$ ways($$D_n$$-Derangement of n numbers).

Now initial seating arrangement of $$n!$$ can be for any one of the two classes.

Hence total ways must be $$2 \times n! \times D_n$$

Am I Correct?

Suppose there are only $$2$$ students.

Then the possible arrangement are

$$(1,2,2,1)$$

and

$$(2,1,1,2)$$

Notice that $$2!D_2=(2)(1)=2$$

Your argument is almost right besides that we shouldn't have multiplied by $$2$$, that is it should be $$n!D_n$$.

• If those 2 classes were to be taken in 2 different rooms and suppose labelled seats were kept in both classroom in exact same order Like in class 1, first row has 1,2,3,4 and similarly class 2 has same order. Then in this case would answer change? – user3767495 Dec 5 '18 at 4:54
• I think that's the setting that I assumed. – Siong Thye Goh Dec 5 '18 at 4:57

You are right, if the classes are distinguishable, say one class is Algebra and the other is Biology, yet both are in the same classroom.

Firstly, you choose the class in $${2\choose 1}$$ ways.

Seconldly, you seat $$n$$ students in $$n!$$ ways in the chosen class.

Thirdly, you seat $$n$$ students in $$!n$$ ways in the other class.

Hence, the final answer is $$2(n!)(!n)$$.

Note: $$!n=D_n$$.

• But correct one is that given by Siong They Goh – user3767495 Dec 8 '18 at 16:10
• Right. I overcounted. Choosing class is excessive, because the two classes are symmetric. – farruhota Dec 8 '18 at 17:58