[Math] A set contains $\{1,2,3,4,5….n\}$ where $n$ is a even number. how many subsets that contain only even numbers are there$?$

combinatorics

A set contains $\{1,2,3,4,5….n\}$ where $n$ is a even number. how many subsets that contain only even numbers are there for the set$?$

This is my solution, is this valid$?$

since number of single element subset that contain only a even number is: $n/2$
a element is either in or not in the subset, hence $2$ choices.
Hence $2^{(n/2)}$ would give us all possible combinations of subset that contains only even number, including the empty set.

Hence my answer is given by $2^{(n/2)} – 1$. subtracting the $1$ because of the empty set $C(n,0)=1$.

Best Answer

A set consisting only of even numbers can be constructed in one of the following ways: $n/2\choose n/2$ ways to construct a set consisting of $n/2$ elements;

$n/2\choose (n/2) -1$ ways to construct a set consisting of $(n/2)-1$ elements;

$n/2\choose (n/2)-2$ ways to construct a set consisting of $(n/2)-2$ elements;

and so on and so forth until

$n/2\choose 1$ ways to construct a set consisting of $1$ element;

$n/2\choose 0$ ways to construct a set consisting of no elements;

Thus the total number of possible subsets is

$n/2\choose n/2$ + $n/2\choose (n/2)-1$ +...+$n/2\choose 1$+$n/2\choose 0$=$(2)^{n/2}$.

Remark: A set $S$ consisting of only even numbers means that if $x\in S$, then $x$ should be even. This is vacuously true if the set is empty and hence we should include $n/2\choose 0$.