Find number of ways to divide a set into 2 parts

218 Views Asked by At

In how many ways can we divide a set into 2 parts having an element in equal number in both of resulting subsets.

For example, multiset = {1, 2, 3, 5, 5, 5, 5} and element being '5', one set of two subset can be {5, 1, 2, 3, 5}, {5, 5}

I tried taking combinations of the number of occurrence of the element taking half of them at a time but I am not sure is it is correct.

1

There are 1 best solutions below

0
On BEST ANSWER

If the cardinality of your specified element in your multiset is odd, there are no ways. If even, each part must get half of these. For each other element, if it has cardinality $m$, there are $m+1$ possibilities ($0, 1, \ldots, m$ of them in the first set, and the rest in the second). So the answer, if the cardinality of the specified element is even, is the product of $m_i+1$ where $m_i$ is the cardinality of the $i$'th unspecified element of the multiset.