Question
In a class, there are 15 students who like chocolate. 13 students like vanilla. 10 students like neither. If there are 35 people in the class, how many students like both flavors?
Answers
GPT-4o mini
To solve this problem, we can use a Venn diagram approach, but let's break it down step by step using set notation.
Let:
- \( A \) be the set of students who like chocolate.
- \( B \) be the set of students who like vanilla.
- \( |A| = 15 \) (students who like chocolate).
- \( |B| = 13 \) (students who like vanilla).
- \( |A^c \cap B^c| = 10 \) (students who like neither).
The total number of students in the class is:
\[
|U| = 35
\]
We want to find the number of students who like both flavors, which we will denote as \( |A \cap B| \).
First, we can find the number of students who like either or both flavors. This is given by the total minus those who like neither:
\[
|A \cup B| = |U| - |A^c \cap B^c| = 35 - 10 = 25
\]
Now, we can apply the principle of inclusion-exclusion to find \( |A \cap B| \):
\[
|A \cup B| = |A| + |B| - |A \cap B|
\]
Substituting in the known values:
\[
25 = 15 + 13 - |A \cap B|
\]
This simplifies to:
\[
25 = 28 - |A \cap B|
\]
Rearranging this gives:
\[
|A \cap B| = 28 - 25 = 3
\]
Thus, the number of students who like both flavors is:
\[
\boxed{3}
\]
Let:
- \( A \) be the set of students who like chocolate.
- \( B \) be the set of students who like vanilla.
- \( |A| = 15 \) (students who like chocolate).
- \( |B| = 13 \) (students who like vanilla).
- \( |A^c \cap B^c| = 10 \) (students who like neither).
The total number of students in the class is:
\[
|U| = 35
\]
We want to find the number of students who like both flavors, which we will denote as \( |A \cap B| \).
First, we can find the number of students who like either or both flavors. This is given by the total minus those who like neither:
\[
|A \cup B| = |U| - |A^c \cap B^c| = 35 - 10 = 25
\]
Now, we can apply the principle of inclusion-exclusion to find \( |A \cap B| \):
\[
|A \cup B| = |A| + |B| - |A \cap B|
\]
Substituting in the known values:
\[
25 = 15 + 13 - |A \cap B|
\]
This simplifies to:
\[
25 = 28 - |A \cap B|
\]
Rearranging this gives:
\[
|A \cap B| = 28 - 25 = 3
\]
Thus, the number of students who like both flavors is:
\[
\boxed{3}
\]