My question says,
Marco surveyed his 34 classmates and found that:
- 12 had a cat
- 13 had a dog
- 14 had fish
- 5 had a cat and a dog
- 4 had a cat and fish
- 3 had a dog and fish
- 2 had all three
How many students had no pets?
I'm not sure how to solve this question as I just started learning about set theory and logic. Any help is appreciated. Thank you!
Hint:
$$|A\cup B\cup C| = |A|+|B|+|C|-|A\cap B|-|A\cap C|-|B\cap C|+|A\cap B\cap C|$$
and
$$|A^c\cap B^c\cap C^c| = |S|-|A\cup B\cup C|$$
Letting $A$ be the set of students with a cat, $B$ the set of students with a dog, $C$ the set of students with a fish, and $S$ the set of students overall, the problem statement gives us all of the relevant values above.