How to form a set from 4 sets with the given property? Hi, this question is related to Combinatorics. If there is anything I can improve with my question, please let me know.
Problem: Let us suppose  we have $4$ sets $S_1,S_2,S_3,S_4$ having $a,b,c,d$ elements. All elements in each $S_i$ are distinct for $1\leq i\leq 4$.
We need to form a set $S$ from  the elements of $S_i;1\leq i\leq 4$ with the following property:
$S$  must contain $a-1$ elements of $S_1$, $b-1$ elements of $S_2$, $c-1$ elements of $S_3$ and $d-1$ elements of $S_4$.
Find the number of ways to form $S$ if $S$ has

*

*$a+b+c+d-3$ elements.

*$a+b+c+d-2$ elements.

My try:
Method 1: Note that $a+b+c+d-3=(a-1)+(b-1)+(c-1)+(d-1)+1$.
We first choose  $a-1$ elements from $S_1$ in $\binom{a}{a-1}=a$ ways,then choose  $b-1$ elements from $S_2$ in $\binom{b}{b-1}=b$ ways,
then choose  $c-1$ elements from $S_3$ in $\binom{c}{c-1}=c$ ways
and finally choose  $d-1$ elements from $S_4$ in $\binom{d}{d-1}=d$ ways.
We now need to choose $1$ remaining  element of $S$ from $\bigcup_{i=1}^4 S_i$.
Now $1$ remaining  element of $S$ from $\bigcup_{i=1}^4 S_i$ can be chosen in $\binom{4}{1}=4$ ways.
So total number of ways= $4\times a\times b\times c\times d$.
Method 2: We choose $a$ elements from $S_1$, $b-1$ from $S_2$, $c-1$ from $S_3$, $d-1$ from $S_4$.
Note that $a$ elements can be chosen from $S_1$ in $\binom{a}{a}=1$ way,then choose  $b-1$ elements from $S_2$ in $\binom{b}{b-1}=b$ ways,
then choose  $c-1$ elements from $S_3$ in $\binom{c}{c-1}=c$ ways
and finally choose  $d-1$ elements from $S_4$ in $\binom{d}{d-1}=d$ way.
Thus it becomes $b\times c\times d$ ways.
Similarly  we can choose $a-1$ elements from $S_1$, $b$ from $S_2$, $c-1$ from $S_3$, $d-1$ from $S_4$.
Thus it becomes $a\times c\times d$ ways. Similarly  we can choose $a-1$ elements from $S_1$, $b-1$ from $S_2$, $c$ from $S_3$, $d-1$ from $S_4$. Thus it becomes $a\times b\times d$ ways.
So total ways= $bcd+acd+abd+abc.$
I have 3 questions:

*

*Why are the answers in two methods coming different?

*I feel Method 2 gives the correct answer but the method is very lengthy and cumbersome and can't be extended. Is it possible to write it in a short and elegant way?

*How to do the second part of the question where $S$ must have $(a-1)+(b-1)+(c-1)+(d-1)+2$ elements? How to extend Method 1 or Method 2 here?

I am looking for some help from all the experts out here. Waiting for your responses.

Method 2 is correct. Method 1 overcounts, because in the event that you end up using all $a$ elements of $S_1$, it distinguishes between the $a-1$ originally chosen elements and the element added later. But all ways to choose $a-1$ elements and then add the last one are equivalent (they all give you the whole of $S_1$).
To answer your final question, in part 2 instead of having three sets with one element missing and one full, you have two sets with one element missing and two full. The number of ways to choose $a-1$ elements from $S_1$, $b-1$ from $S_2$, and all the rest is $ab$, so you need all permutations of this, i.e. $ab+ac+ad+bc+bd+cd$.
The issue with extending is really one of notation. It is cumbersome because you have $a$ elements in $S_1$, $b$ in $S_2$, etc., instead of the more natural $a_1$ in $S_1$, $a_2$ in $S_2$, etc. With this notation your first expression would become
$\sum_{i,j,k\text{ distinct}}a_ia_ja_k$ and your second $\sum_{i,j\text{ distinct}}a_ia_j$.
