List all subsets of {a, b, c, d, e}, containing a but not containing b I wonder...can I solve this by just getting A = {a, c, d, e} minus those subsets which do not contain a?

So, let A be {a, c, d, e}. |A| is 2^4 = 16
And let B be {c, d, e}. |B| is 8
And let C be subset of subsets of {a, b, c, d, e}, containing a but not containing b

Can I conclude that that |C| will be 8, that is, |A| - |B|?

I could enumerate these:


{a}
{a, c}
{a, d}
{a, e}
{a, c, d}
{a,c, e}
{a, d, c}
{a, d, e}


Which are 8, not including the empty set so I guess there is some mistake with my reasoning. Could you people point that out for me?

P.S: this question is from the book Discrete Mathematics: Elementary and Beyond, by Lovász et al.
All you need to do is list all subsets of $\{c,d,e\}$, and then add $a$ to each of those.  There are eight of them.  (You've listed $\{a,c,d\}$ twice though, and you missed one of the eight.)
An important concept is something called a "power set". If SS is a set, then the power set of SS is the set of all subsets of SS, and may be written P(S)P(S), P(S)P(S), or P(S)P(S), depending on taste.

For example,
P(∅)={∅}
P(∅)={∅}
and
P({1,2})={∅,{1},{2},{1,2}}.
P({1,2})={∅,{1},{2},{1,2}}.
List out |P(S)||P(S)| for S={1,…,n}S={1,…,n} for a few small values of nn.

Now think about how you might represent the power set of SS as a finite sequence of 11s and 00s, that is, as a bit vector.

Can you see why the power set has the size it does for each nn?