Generating function for $2n$ distinct balls to $n$ bins such that each bin will hold exactly two balls

191 Views Asked by At

Find the number of ways for having $2n$ distinct balls in $n$ distinct bins such that each bin will hold exactly two balls using a generating function

The generating function (exponential) would be: $(e^x-(e^x-\frac {x^2} 2))^n =(\frac {x^2} 2)^n$, so the closed form of that would be: $\frac 1 2 1^{n-2}\cdot (n-2)! = 2^{-1}(n-2)!$ but this isn't right...

This is the same as Ways to have exactly $n$ nominees out of $2n$ voters Only here I'm having trouble with the generating function of the same problem.

1

There are 1 best solutions below

2
On BEST ANSWER

The exponential generating for the number of ways to partition $[n]$ into a single pair is $\frac{x^2}{2!}$, since there is one way when $n=2$ and $0$ otherwise. Thus, the exponential generating function for the number of ways to partition $[n]$ into pairs is

$$e^{x^2/2}=\sum_{n\ge 0}\frac{x^{2n}}{2^nn!}=\sum_{n\ge 0}\left(\frac{(2n)!}{2^nn!}\cdot\frac{x^{2n}}{(2n)!}\right)\;.$$

Now just take into account the number of ways to order the pairs.

Added: I’m using here what Miklós Bóna refers to as the exponential formula in his Introduction to Enumerative Combinatorics.

Exponential Formula. Let $a_n$ be the number of ways to carry out a certain task on an $n$-element set, and set $a_0=0$. For $n\ge 1$ let $h_n$ be the number of ways to partition $[n]$ into an arbitrary number of non-empty blocks and then to carry out the first task on each of these blocks. Set $h_0=1$. If $$A(x)=\sum_{n\ge 0}a_n\frac{x^n}{n!}$$ and $$H(x)=\sum_{n\ge 0}h_n\frac{x^n}{n!}\;,$$ then $$H(x)=e^{A(x)}\;.$$