# How to find the number of elements in a set when there are different conditions?

The problem is as follows:

A milk company applied a survey to $240$ people on the consumption of their yoghurts. These were from the following flavors, vanilla, strawberries and blueberries. From this survey the results were:

The number of people who consume the three flavors plus those who consume only blueberries are $30$.

The number of people who consume only vanilla is double those who consume only vanilla and blueberries.

The number of people who consume only strawberries is double the sum of those who consume only vanilla and strawberries with those who consume only strawberries and blueberries.

If all people consume at least one flavor, calculate the number of people who consume only two of the flavors.

I'm stuck at this situation as I don't know how to simplify it the way how can I calculate the number.

$$\textrm{s=straberries, b=blueberries, v=vanilla, x=all flavors}$$ $$\textrm{w=only vanilla and blueberries, y=only vanilla and strawberries}$$ $$\textrm{z=strawberries and blueberries}$$

$$x+b=30$$

$$v=2w$$

$$s=2(y+z)$$

But where to go from there?. Can someone help me with what should be done to solve this?.

Edit:

This problem may need the use of a Venn diagram and I am not very familiar with its use and understanding how to avoid count two times the same group therefore an answer that would include a very detailed explanation step by step would be very valuable for me as I would like to know what it is happening.

Creating a Venn diagram for this shows that we have 7 variables out of which we can eliminate 3 variables as per the given conditions namely, number of people who only consume vanilla, number of people who only consume strawberry and number of people who only consume blueberry. If we add all the remaining terms as per the Venn diagram and equate it to 240. We get

=> 2f + d + 2(d+e) + f + g + e + 30 - g = 240. => 3f + 3d + 3e = 210 => f + d + e = 70

Venn diagram

Edit- Further description: 7 variables: 1. People who consume only vanilla: a 2. People who consume only strawberry: b 3. People who consume only blueberry: c 4. People who consume vanilla and strawberry only: d 5. People who consume strawberry and blueberry only: e 6. People who consume vanilla and blueberry only: f 7. People who consume all 3: g

What is required is all people who consume only 2 out of 3 of the flavors i.e. d + e + f

From the conditions we know that: a = 2f ...(i) b = 2(d + e) ...(ii) c = 30 - g ...(iii)

So, we have "eliminated" a, b and c. Now, the above 7 variables are exclusive of each other and have absolutely no repetitions. Hence, the emphasis on the word "only" in the variable definitions above.

=> a + b + c + d + e + f + g = 240 Replacing a, b and c using the above conditions we get the result d + e + f = 70

• This answer is not very helpful in the sense that I do not understand very well what do you mean that we have 7 variables which are reduced to 4?. I think there are steps which you had skipped so I can understand. – Chris Steinbeck Bell Mar 15 '18 at 6:11
• How do you come to the conclusion that we have to add up all elements from all diagrams is equal to 240? How do we avoid to count twice?. Can you explain this part please? – Chris Steinbeck Bell Mar 15 '18 at 6:30

You have one more equation available, which is $s+b+v+x+w+y+z=240$ You are being asked for $w+y+z$ because those are all the people who eat exactly two flavors. Substituting in from your equations $$s+b+v+x+w+y+z=240\\2(y+z)+30+2w+w+y+z=240\\3(w+y+z)=210\\w+y+z=70$$ so $70$ people eat exactly two kinds of yogurt.

I have added a Venn diagram below. As Geogebra labels the points, I put a text in each region with three capital letters representing your variables. YYY designates the region for vanilla and strawberries but not blueberries. The three circles are the three flavors and a region that is in multiple circles means those people eat all the things they are in. You can see that $WWW, YYY, and ZZZ$ are the regions where people eat two of the three.

• I think that a diagram would be very useful to understand exactly what is happening and yes I was missing that equation you mentioned because I was not sure which where the elements to sum. But after taking a look more closely it was obvious that it was referring to all elements but taking care to not counting two times the elements which form an intersection and that was the part I was in doubt since they're shared by both sets. With these things in mind I could come to the solution. – Chris Steinbeck Bell Mar 22 '18 at 15:09
• I thought you wanted to avoid the use of a Venn diagram. I don't think it is necessary here, as we can just do the algebraic solution. Often they do help. Your letters correspond to the seven regions of a three circle diagram that are not the outside. The outside would be people who eat no yogurt and we are told there are none of those. – Ross Millikan Mar 22 '18 at 15:59
• The way how I wrote the question may have gave that impression but sooner or later I would need that diagram since I'm not good at processing different data at the same time mentally thus I thought on this reason for me it was necessary. Thanks for taking consideration of this and adding it to your answer. – Chris Steinbeck Bell Mar 22 '18 at 16:36