# 3. Classroom tasks and solutions / Аудиторні задачі та розв'язання > **Source of tasks.** The eleven problems below are taken **exactly** from the > practical-class assignment for this topic (set operations, Venn diagrams, and > set algebra); only the wording has been translated to English. Each task is > followed by a **complete worked solution** so the whole class can check every > step. The theory used is in [2method.md](2method.md). Throughout, $A$, $B$, $C$ are sets inside a universe $U$; recall the difference law $A \setminus B = A \cap \overline{B}$. ## A. Illustrating operations with diagrams (Tasks 1–3) ### Task 1 **Illustrate the set $E = A \setminus (B \cup C)$ with Euler/Venn circles.** **Solution.** Draw three overlapping circles $A$, $B$, $C$ inside the universe rectangle. Shade **inside-out**: 1. First mark $B \cup C$ — everything lying inside circle $B$ **or** circle $C$. 2. $E = A \setminus (B \cup C)$ keeps the part of $A$ that is **outside** that marked area. So the answer is the "petal" of circle $A$ that overlaps **neither** $B$ **nor** $C$ — the portion of $A$ separate from the other two circles. Everything of $A$ that it shares with $B$ or with $C$ is excluded. ![Shade B ∪ C, then keep the part of A outside it to obtain A \ (B ∪ C)](img/task1.png) ### Task 2 **Using Venn diagrams, verify the identity** $$A \cap (B \cup C) = (A \cap B) \cup (A \cap C).$$ **Solution.** Shade each side on its own diagram and compare. - **Left side $A \cap (B \cup C)$.** First shade $B \cup C$ (both circles $B$ and $C$); then intersect with $A$, keeping only the part of that region lying inside $A$. The result is *the portion of $A$ that overlaps $B$ or $C$*. - **Right side $(A \cap B) \cup (A \cap C)$.** Shade the lens $A \cap B$ and the lens $A \cap C$, then take their union. The result is again *the portion of $A$ overlapping $B$, together with the portion of $A$ overlapping $C$*. ![Both sides shade the same region — the part of A that overlaps B or C](img/task2.png) The two shaded regions coincide exactly, so the identity holds. (This is the **distributive law** of $\cap$ over $\cup$.) ### Task 3 **Write the formula for the shaded region of the given Venn diagram**, where the shading covers the parts of circles $A$ and $B$ that lie **outside** circle $C$. ![The given diagram: the parts of A and B lying outside C are shaded](img/task3.png) **Solution.** Read the region inside-out: 1. The shaded area covers everything in $A$ **or** $B$ — that is $A \cup B$. 2. …except whatever lies inside $C$, which is removed. Removing $C$ from $A \cup B$ gives $$E = (A \cup B) \setminus C.$$ ## B. Proving identities (Tasks 4–5) ### Task 4 **Prove that** $A \setminus (A \setminus B) = A \cap B.$ **Solution (algebraic).** $$ \begin{aligned} A \setminus (A \setminus B) &= A \cap \overline{(A \setminus B)} && \text{(difference law)} \\ &= A \cap \overline{(A \cap \overline{B})} && \text{(}A \setminus B = A \cap \overline{B}\text{)} \\ &= A \cap (\overline{A} \cup \overline{\overline{B}}) && \text{(De Morgan)} \\ &= A \cap (\overline{A} \cup B) && \text{(double complement)} \\ &= (A \cap \overline{A}) \cup (A \cap B) && \text{(distributivity)} \\ &= \varnothing \cup (A \cap B) && \text{(complement law)} \\ &= A \cap B. && \text{(identity law)} \end{aligned} $$ Hence $A \setminus (A \setminus B) = A \cap B$. $\blacksquare$ ### Task 5 **Prove that** $A = (A \cap B) \cup (A \setminus B),$ where $A$ and $B$ are sets. **Solution.** Start from the right-hand side and use $A \setminus B = A \cap \overline{B}$: $$ \begin{aligned} (A \cap B) \cup (A \setminus B) &= (A \cap B) \cup (A \cap \overline{B}) && \text{(difference law)} \\ &= A \cap (B \cup \overline{B}) && \text{(distributivity)} \\ &= A \cap U && \text{(complement law, } B \cup \overline{B} = U\text{)} \\ &= A. && \text{(identity law)} \end{aligned} $$ Thus $(A \cap B) \cup (A \setminus B) = A$. Intuitively, every element of $A$ either **is** in $B$ (so it lands in $A \cap B$) or **is not** (so it lands in $A \setminus B$); the two pieces together rebuild $A$. $\blacksquare$ ## C. Computing sets (Tasks 6–9) For Tasks 6–9 let $$A = \{2, 4, 6, 8, 10, 12\}, \qquad B = \{3, 6, 9, 12\}.$$ ### Task 6 **Write the set $E = A \cup B$.** **Solution.** The union collects every element that is in $A$ **or** in $B$ (each listed once): $$E = A \cup B = \{2, 3, 4, 6, 8, 9, 10, 12\}.$$ ### Task 7 **Write the set $E = A \cap B$.** **Solution.** The intersection keeps only the elements in **both** sets. Comparing the lists, $6$ and $12$ occur in each: $$E = A \cap B = \{6, 12\}.$$ ### Task 8 **Write the set $E = A \setminus B$.** **Solution.** The difference keeps the elements of $A$ that are **not** in $B$. Removing the shared elements $6$ and $12$ from $A$: $$E = A \setminus B = \{2, 4, 8, 10\}.$$ ### Task 9 **Write the set $E = \overline{A \setminus B}$**, the complement of $A \setminus B$ taken relative to the universe $U = A \cup B$. **Solution.** From Task 8, $A \setminus B = \{2, 4, 8, 10\}$, and from Task 6 the universe is $U = A \cup B = \{2, 3, 4, 6, 8, 9, 10, 12\}$. The complement removes $A \setminus B$ from $U$: $$E = \overline{A \setminus B} = U \setminus (A \setminus B) = \{3, 6, 9, 12\}.$$ (Notice this is exactly $B$ — consistent with Task 5, since $U = A \cup B$ and $U \setminus (A \setminus B) = B$ here.) ## D. Set-builder and power set (Tasks 10–11) ### Task 10 **List the elements of the following sets** (with $\mathbb{N} = \{1, 2, 3, \dots\}$): $$D = \{\, x \mid x \in \mathbb{N} \ \text{and}\ x \ \text{is a divisor of } 15 \,\}, \qquad E = \{\, x \mid x \in \mathbb{N} \ \text{and}\ 15 < x < 30 \ \text{and}\ x \ \text{is prime} \,\}.$$ **Solution.** Apply each defining property to the candidates. - $D$: the natural-number divisors of $15$ are $1, 3, 5, 15$ (since $15 = 1\cdot 15 = 3 \cdot 5$). Hence $D = \{1, 3, 5, 15\}$. - $E$: test each integer strictly between $15$ and $30$ for primality. The composites are ruled out ($16,18,\dots$ even; $21 = 3\cdot 7$; $25 = 5^2$; $27 = 3^3$), leaving the primes $17, 19, 23, 29$. Hence $E = \{17, 19, 23, 29\}$. ### Task 11 **List the elements of the power set $\mathcal{P}(G)$, where $G = \{1, 2, 3\}$** ($\mathcal{P}(G)$ is the set of all subsets of $G$). **Solution.** Since $|G| = 3$, there are $2^{3} = 8$ subsets. Enumerate them **by size** so none is missed: - size $0$: $\varnothing$; - size $1$: $\{1\}, \{2\}, \{3\}$; - size $2$: $\{1,2\}, \{1,3\}, \{2,3\}$; - size $3$: $\{1,2,3\}$. Therefore $$\mathcal{P}(G) = \big\{\, \varnothing,\ \{1\},\ \{2\},\ \{3\},\ \{1,2\},\ \{1,3\},\ \{2,3\},\ \{1,2,3\} \,\big\}.$$ ## E. Counting and products (Tasks 12–13) ### Task 12 **In a group of $30$ students, $18$ study French and $15$ study German, and $7$ study both. How many study (a) at least one of the two languages, (b) neither?** **Solution.** By **inclusion–exclusion**, $|F\cup G| = |F| + |G| - |F\cap G| = 18 + 15 - 7 = 26$. So **(a)** $26$ study at least one language, and **(b)** $30 - 26 = 4$ study neither. The $-|F\cap G|$ corrects the double-count of the $7$ students who are inside *both* $|F|$ and $|G|$. ### Task 13 **For $A = \{1, 2\}$ and $B = \{x, y, z\}$: (a) list $A \times B$ and give $|A\times B|$; (b) compute the symmetric difference $\{1,2,3\}\triangle\{2,3,4\}$.** **Solution.** **(a)** The Cartesian product pairs each element of $A$ with each of $B$: $$A\times B = \{(1,x),(1,y),(1,z),(2,x),(2,y),(2,z)\},\qquad |A\times B| = |A|\cdot|B| = 2\cdot 3 = 6.$$ **(b)** The symmetric difference keeps the elements lying in **exactly one** set: $\{1,2,3\}\triangle\{2,3,4\} = \{1,4\}$ (the shared $2,3$ drop out).