# Numbered balls in numbered boxes

There are 2n different balls so that each ball numbered from 1 to 2n. There are 2n different boxes numbered from 1 to 2n. How many ways are there so that there is a single even numbered ball in an even numbered box(the box and the ball can have different numbers - example ball number - 4, box number 6. they just have to both be even).

My solution for some reason isnt true - Pick an even numbered box - n choices, to which we will place an even numbered ball - n choices. Now to make sure the rest of even numbered boxes get uneven numbered balls - we have n uneven balls so we pick a random even box and have n choices, then n-1,..., and we get n!/2 choices to stuff all n-1 even boxes with uneven numbered balls. Now we have 1 uneven ball left and n-1 even balls, so n balls in total. We can randomly distribute them. so n!.

• Pick which even box is used to receive an even ball ($n$ options). Pick which even ball goes in said box ($n$ options). As the rest of the balls in the even boxes must be odd there will be exactly one odd ball used in an odd box. Pick which odd ball is used in an odd box and which odd box is used ($n$ options each). Now, arrange the remaining $n-1$ even balls among the remaining odd boxes ($(n-1)!$ options) and arrange the remaining $n-1$ odd balls among the even boxes ($(n-1)!$ options) giving the result. – JMoravitz Nov 17 '18 at 20:09
• As for what you did wrong... you seem to have first chosen an even box and an even ball to go into it, then from left to right filled the remaining even boxes with odd balls, then when all even boxes are filled you took the remaining $n$ balls and arranged them. This is all well and good, however the number of ways to accomplish this is $\frac{n!}{1} = n!$, not $\frac{n!}{2}$. Indeed, making this correction you get $n^2(n!)^2$ which happens to equal $n^4((n-1)!)^2$ – JMoravitz Nov 17 '18 at 20:14
• For the last even box you still have $2$ odd balls and this $2$ is still a part of the product that you take. For the $(n-1)$'st remaining even box you have $n$ odd balls to choose from. For the $(n-2)$'nd remaining even box you have $n-1$ odd balls to choose from, on up until for the $2$n'd remaining even box you have $3$ odd balls to choose from and for the final remaining even box you have $2$ odd balls to choose from. Multiplying the number of choices available for all of these (including the last one) you have $n\cdot (n-1)\cdots 3\cdot 2$ ways you can do this. – JMoravitz Nov 17 '18 at 20:31
• Yes, and notice that $n\cdot n\cdot (n!)\cdot (n!) = n\cdot n\cdot n\cdot (n-1)!\cdot n\cdot (n-1)! = n^4((n-1)!)^2$. Your only mistake can be attributed to an off-by-one error. – JMoravitz Nov 17 '18 at 20:49