1
$\begingroup$

I need to count the following: Number of ways to write $\{1,\ldots,k\}$ as a union of pairs of elements.

1) One way to do this is just $\frac{k!}{2^{k/2}(k/2)!}$ so you look at all the permutations of $\{1,\ldots,k\}$ and remove all those pairs that could be permuted amongst themselves and then take all $(k/2)!$ permutations of these pairs.

2) Another intuitive way to me is: First pick 2 elements (there are $\binom{k}{2}$ ways), then pick another 2 elements from the remaining $(k-2)$ elements (there are $\binom{k-2}{2}$ ways) and so on and finally we get $k/2$ pairs and in order to take care of over-counting just divide by $(k/2)!$. So this quantity would be $\Pi_{i=1}^{k/2-1} \binom{k-2i+2}{2}/(k/2)!$

However, it seems like $\Pi_{i=1}^{k/2-1} \binom{k-2i+2}{2}/(k/2)! \neq \frac{k!}{2^{k/2}(k/2)!}$ according to matlab (interestingly the first k for which they are not equal is $k=11 $ :) )

  • 2
    $k=11$ looks strange as I would have thought $k$ had to be even2017-01-07
  • 1
    Any error is due to computational imprecision. Write the $\binom{k-2i+2}{2}$ as $\frac{(k-2i+2)!}{(k-2i)!\, 2!}$ and cancel factorials with neighbouring terms in the product to see that the two calculations are the same2017-01-07

0 Answers 0