[Math] Subsets of $\{1,2,3,4,5,6,7,8\}$ with at least 1 odd and 1 even number

elementary-set-theorynotation

How can I formally write the number of subsets of $S=\{1,2,3,4,5,6,7,8\}$ with at least 1 odd and 1 even number?

I know if I take the subset with even numbers, $E =\{2,4,6,8\}$, there are $2^4-1$ subsets with even numbers (excluding $Ø$), and the same number for an the odd subset, $O$, and multiplying these together will give me an exact answer. But I'm not really satisfied because this isn't very formal, and I don't know how to show this with the proper mathematical symbols.

Thanks in advance !

Best Answer

All non-empty subsets is $2^8 - 1$. There are $2^4 - 1$ non-empty subsets that consist only of even numbers, and $2^4 - 1$ non-empty ones that only have odd numbers. These are mutually exclusive sets.

We substract these last 2 from the first to get the right answer. This was my first approach.

Your answer is also correct, any good set can be seen as a unique disjoint union of a non-empty even set and a non-empty odd set. We can pick them independently, so we multiply.

Both come to 225.

Related Question