# Solving set theory exercise 'formally' (a different way)?

The exercise goes like this:

In a class, there are 32 people. They learn different languages. 25 people learn English, 10 people learn French. We also know that 7 people learn neither of the two. How many people learn both languages?

This is not a hard exercise, I would simply draw a Venn-diagram like this:

And then I can easily find an equation to solve, knowing that there are 32 people in total: $$(25-x)+(x)+(10-x)+(7)=32 \\ 42-x=32 \\ x=10$$

That's fine; As I said, this is an easy exercise. My question is, how would I be able to solve such a problem differently? For example, by only using set theory identities, or something, starting with:

$$|\mathbb{U}| = 32 \; \land |E| = 25 \; \land |F| = 10 \; \land | \overline{E \cup F} | = 7 \\ | E \cap F|=?$$

• Do you see that $$\vert U\vert = \vert E\vert + \vert \overline{E\cup F}\vert.$$ Also note that if $x = 10,$ as you initially found, we have that $F\subset E$. – Namaste Jan 18 '17 at 17:42
• @amWhy Yes, at least I can see that the equation is true, although I also understand how the second deduction is true. But that didn't answer my question; I am wondering whether I can solve the problem without drawing diagrams, or using any creativity, as if this was an algebraic exercise? – bertalanp99 Jan 18 '17 at 17:48
• Your diagram does not depict the situation at hand. I used nothing more that the realization that, since $32 = 27 +7$, the cardinality of F is irrelevant, and therefore, it must be a subset of E so that $E\cap F \subset E$ and such that $|F| =[ E\cap F| = 10$ – Namaste Jan 18 '17 at 18:01
• It is enough to conclude that $U = E \cup (U\setminus E)$, having found that $|U| = |E| \cup |U\setminus (E\cup F)| = |E|\cup |U\setminus E|$. – Namaste Jan 18 '17 at 18:11
• You are right, but one could not know that before realising that $F$ is a subset of $E$, n'est-ce pas? I understand that after noticing that $|U| = |E| + |U \backslash E |$, we can deduce that $|F| = |E \cap F|$. But how do we know that that equals $10$? – bertalanp99 Jan 18 '17 at 18:11

$$|\mathbb{U}|=32 \:;\: |E|=25 \:;\: |F|=10 \:;\: |\overline{A \cup F}|=7 \\ |\mathbb{U}|=|E \backslash F|+|E \cap F|+|F \backslash E|+|\overline{E \cup F}|=15+7+|E \cap F| \\ |E \cap F|=32-15-7=10 \\ |E \cap F|=10$$
So the answer is $10$.