Twenty students in a class when they are required to choose a partner The question consists of two subquestions:
There are 20 students in the class.
A. The students are required to divide into 10 pairs. In how many ways can they are divided?
Attempt: First of all, we know that there are 20 students so in the first stage we can arrange them in upline so we get 20! for that, In the second stage, we determine two students in the line will be pair and the change between them makes the calculation $2^n$, the last stage we can see of each pair can be move in the line together which gives us the $10!$.
Final solution: $\frac{20!}{10!\cdot 2^{10}}$.
This solution correct?
B. The students are required to divide into pairs again, however, they cannot be with the same partners as in subquestion - A.. In how many ways can they do so?
Attempt:  I tried to use the inclusion-exclusion principle without any success.
 A: In your attempt on section A, the naïve approach of lining up the students and pairing them off leads to $20!$ scenarios, which we can then assess to find which other scenarios will produce the same ten pairs. We can rearrange the pairs in $10!$ ways, and we can rearrange each pair of students, $2$ options per pair. These changes are independent of each other - these rearrangements can't cancel each other out. So for any set of pairs, there are $10!\cdot 2^{10}$ scenarios that will generate those same ten pairs. So overall we have $\dfrac{20!}{10!\cdot 2^{10}}$ different pairings here.
For section B,  we'll call the section A result $\mathcal P_{20}$, for making pairings from $20$ students. Now for reducing this total, we can consider how many different pairings exist with $18$ students (assuming a pairing carried over from the first time) - call this $\mathcal P_{18}$, calculated in a similar way to section A. Then also calculate how many for $16$ students (two pairings carried over), $\mathcal P_{16}$, etc. Now combine all these results using inclusion-exclusion to remove over- and under-counts from each adjustment based on choosing pairs from the first pairing:
$$ \mathcal P_{20} - \binom{10}{1}\mathcal P_{18} + \binom{10}{2}\mathcal P_{16} - \binom{10}{3}\mathcal P_{14}  + \binom{10}{4}\mathcal P_{12} - \binom{10}{5}\mathcal P_{10} \\ + \binom{10}{6}\mathcal P_{8} - \binom{10}{7}\mathcal P_{6} + \binom{10}{8}\mathcal P_{4} - \binom{10}{9}\mathcal P_{2}+ \binom{10}{10}\mathcal P_{0}$$ (noting that $\mathcal P_{2}=\mathcal P_{0}=1$)
A: For the first part, do
$$\frac{\text{(# students)}!}{\text{(# pairs)}! 2^{\text{# pairs}}}$$
So, you're answer is nearly correct, the $2^n$ should just be $2^{10}$.
A: Part A:
Label each student $1,\dots,20$. Pair student $1$ off ($19$ ways to do this). Regroup all the remaining students, and relabel $1,\dots,18$. Pair student $1$ off ($17$ ways to do this), regroup, etc...
This gives $19!!=19\cdot17\cdots3\cdot1$ ways to pair the students of.
Which is the same as $\frac{20!}{10!2^{10}}=\frac{20\cdot19\cdots1}{2\cdot10\cdot2\cdot9\cdots2\cdot1}$, just a different way of counting them.
