[Math] Finding Number of Unique Combinations, Multiple n-sizes, Multiple Sets

combinationscombinatorics

Excuse me if my terminology is not precise.

Suppose I have two containers containing $x$ and $y$ objects respectively. The objects in each container are all different.

I am looking for the number of unique combinations when required to pull objects from both containers, assuming that a combination must include at least one item from each container. One complexity comes from the idea that a "unique combination" can include all possible scenarios by which someone could pull any number of objects between 1 and $x$ for container one, paired with any number of objects between 1 and $y$ for container two.

The other complexity stems from the idea that I want to eliminate instances where a mere reshuffling would produce another arrangement to count — in other words, I would not consider a draw of $A,B,C$ from the first container and $X,Y,Z$ from the second one, to be different from a draw of $B,C,A$ from the first one and $Y,Z,X$ from the second. Both of these, for my purpose, would constitute only one unique instance.

Question: Is there a well-known method to solve for the number of unique combinations pulling from both containers, given that I'm not only looking for a "pair," "group of 3," "group of 4," etc.? One should also note, if not already obvious, that the number of objects in each container ($x$ and $y$) are not equal.

Thanks in advance!

Best Answer

I think the answer should be $$\binom{x}{1}\bigg[\binom{y}{1}+\binom{y}{2}+...+\binom{y}{y}\bigg]+\binom{x}{2}\bigg[\binom{y}{1}+\binom{y}{2}+...+\binom{y}{y}\bigg]+...+\binom{x}{x}\bigg[\binom{y}{1}+\binom{y}{2}+...+\binom{y}{y}\bigg]$$ $$=\bigg[\binom{x}{1}+\binom{x}{2}+...+\binom{x}{x}\bigg]\cdot\bigg[\binom{y}{1}+\binom{y}{2}+...+\binom{y}{y}\bigg]$$ $$= (2^x-1)\cdot (2^y-1)$$ since all objects are different from each other. So we can simply seperate the problem to cases where we draw $1$ object from the first container and draw $1$ object to $y$ objects from the second container. Then next case is where we draw $2$ objects from the first container and draw $1$ object to $y$ objects from the second container, again. Continuing with a similar argument gives us the above result.

$\big($Notice that we also use the fact $\binom{n}{0}+\binom{n}{1}+...+\binom{n}{n} = 2^n\big)$

If it asks combinations but not permutations, then ordering is not important so $\{A,B,C,X,Y,Z\}$ is same as $\{B,C,A,Y,Z,X\}$.

SOME TERMINOLOGY AND NOTATION:

  • In general, $\{...\}$ is used for unordered tuples (combinations) while $(...)$ is used for ordered tuples (permutations).

  • When we have more than two ordered or unordered objects, say $n$ many of them, we generally call them $n$-tuple.

Related Question