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 find the number of students who like both flavors, we can use the principle of inclusion-exclusion.

Let's define:

- \( C \): the number of students who like chocolate = 15
- \( V \): the number of students who like vanilla = 13
- \( N \): the number of students who like neither = 10
- \( T \): the total number of students = 35
- \( B \): the number of students who like both chocolate and vanilla

We know that the total number of students who like at least one flavor can be calculated as:

\[
\text{Students who like at least one flavor} = T - N = 35 - 10 = 25
\]

Using the principle of inclusion-exclusion for the sets of students who like chocolate and vanilla, we have:

\[
\text{Students who like at least one flavor} = C + V - B
\]

Substituting the known values into this equation, we get:

\[
25 = 15 + 13 - B
\]

Now, simplifying this:

\[
25 = 28 - B
\]

Rearranging gives us:

\[
B = 28 - 25 = 3
\]

Thus, the number of students who like both flavors is \( \boxed{3} \).

Related Questions