How to solve set theory question given a problem solving question Sarah has decided to open an ice cream shop.She has taken a tally and finds that she has
10 flavors that contain chocolate
5 flavors that contain nuts
2 flavors that contain chocolate and nuts
11 flavors that do not contain chocolate or nuts
Determine the total number of ice cream  flavors Sarah has
my work:
So to determine the total number of flavors you simply add all the flavors to 10+5+2+11=28
so the answer is 28,Sarah has 28 total flavors in her ice cream shop
There are four types of flavors:  Those that have chocolate and nuts.  Call that $A$.  Those the contain chocolate and no nuts.  Call that $B$.  Those that have nuts but no chocolate.  Call that $C$. And those that have neither chocolate nor nuts. Call that $D$.
We know:
10 flavors that contain chocolate.  $A$ and $B$ contain chocolate but $C$ and $D$ do not.  So $A+B=10$.
5 flavors that contain nuts.  $A$ and $C$ contain nuts but $B$ and $D$ do not.  So $A+C = 5$.
2 flavors contain chocolate and nuts.  That's $A$.  $A$ are all the flavors that contain chocolate and nuts.  So $A = 2$.
11 flavors that do not contain chocolate or nuts.  That's $D$.  $D$ are all the flavors that contain neither chocolate nor nuts.  So $D = 11$.
So $A + B = 10$,  $A+C=5$, $A = 2$, And $D=11$.  So replace $A$ with $2$:
$2 + B=10$,  $2+C=5$ so $B=8$ and $C = 3$.
now there are $2$ flavors with chocolate and nuts, $8$ flavors with chocolate but no nuts, $3$ with nuts but no chocolate.  And $11$ with neither chocolate or nuts.
So there are $2 + 8 +3+11 = 24$ total.
Now read your notes about &quot;Inclusion-Exclusion principle&quot;.
Total Number =  Number of flavors with Chocolate + Number of Flavors with nuts - number flavors with both + number of flavors with neither= $10 + 5 -2 + 11=24$
You dont add the flavors with both because you counted them when you counted the chocolate flavores.  and you counted them again when you counted the nut flavors.  Because you counted them twice when you should have only counted them once, you must subtract them.  So the total is $10 + 5 -2 + 11$.
My answer is 13.
Sarah has 2 ice-creams that contain chocolate and nuts, 10 that contain chocolate (the previous 2 are included in here) and 5 that contain nuts (again the first 2 are included in here). So for now you have 2 + 8 + 3 = 13.
Now, if you count the ice-creams that contain only one flavour you have 11, which is exactly what she has, so you do not add more ice-creams to the 13 you already counted. (It is said the 11 do not contain chocolate or nuts, so it can be one of them).