énoncés
By Pr. El Hadiq Zouhair
Let $A = \{2, 4, 6, 8\}$ and $B = \{1, 2, 3, 4, 5\}$. Compute: $A \cup B$, $A \cap B$, $A \setminus B$, $B \setminus A$.
Given the family of sets L = [{1,2,3}, {2,3,4}, {3,4,5}, {3,5,7}], compute:
With universe $U = \{1, 2, \dots, 10\}$ and $A = \{1, 3, 5, 7, 9\}$ (odd numbers), compute $A'$. Then verify $A \cup A' = U$ and $A \cap A' = \varnothing$.
Complement > Intersection > Union. With $U = \{1..10\}$, $A = \{1,2,3\}$, $B = \{2,3,4\}$, $C = \{3,4,5\}$, evaluate by hand, then in Python:
With $A = \{1..7\}$, $B = \{3..9\}$, $C = \{5..11\}$, write a function that returns the contents of each of the 8 regions of the Venn diagram of $A, B, C$. Which regions are empty?
Pick any $A, B \subseteq \{1, \dots, 20\}$ randomly and verify $|A \cup B| = |A| + |B| - |A \cap B|$ holds on 1000 random pairs.
For $U = \{1, 2, 3, 4\}$, check $(A \cup B)' = A' \cap B'$ for every pair of subsets of $U$ (there are $2^4 \times 2^4 = 256$ pairs).
Prove (by exhaustive check on $U = \{1, 2, 3\}$) that $A \cap (B \cup C) = (A \cap B) \cup (A \cap C)$ for all $A, B, C \subseteq U$.
Print the full membership (truth) table for $(A \cup B)'$ and $A' \cap B'$ and show they are equal.
Using SymPy's simplify (boolean), show that
$A \cup (A \cap B) \equiv A$ (absorption).
Then show $(A \cap B) \cup (A \cap B') \equiv A$ (a useful "splitting" identity).
Show, by brute force on $U = \{1, 2, 3, 4\}$, that:
A survey of 200 people about three streaming services (N, P, D) reports:
How many use:
venn_regions from 3 to $n$ sets.matplotlib_venn.venn3.sympy.simplify(Equivalent(...)) instead of brute force.Open the main lesson for the matching theory.