Set theory in a nutshell

Set theory is an elegant framework often used in probability theory. So here is a small refresher.

Consider mm different objects o1,...,omo_1,..., o_m, of which we select some. To be concrete, assume that the mm objects are the numbers 11 to 1010, and the selected objects are the numbers from 11 to 66. The set AA with the elements 1,2,...,61,2,...,6 is denoted by

A={1,2,3,4,5,6}A=\{1,2,3,4,5,6\}

Equality of sets

The order of occurrence is not important, and identical objects count only as one, so we have

A={1,2,3,4,5,6}={2,2,3,1,4,3,6,5,4,6,6}\begin{array}{lll} A&=&\{1,2,3,4,5,6\} \\ &= &\{2,2,3,1,4,3,6,5,4,6,6\} \end{array}

In other words, to sets are equal, if the contain the same elements, no matter how often they occur.

Special sets

Magnitude

The magnitude of AA is the number of different elements in AA, and is denoted by A\vert A\vert, so we have

A=6\vert A \vert =6

Set relations

Set operations

Given two subsets AA and BB of SS, we can form a new set, which correspond to the logical statements NOT, AND, and OR:

Disjoint subsets

We say that two sets EE and FF are disjoint if they do not intersect, that is, if

EF={}E\cap F = \{\}

We say that the subsets E,FE, F and GG are pairwise disjoint if each pair is disjoint, that is, EF={}E \cap F=\{\}, EG={}E \cap G=\{\}, FG={}F \cap G=\{\}. Clearly, disjoint and pairwise disjoint subsets do not have elements in common (see figure below).

It is straightforward to generalise this to an arbitrary number of events.

Partitions

Consider mm subsets A1,A2,...AmA_1, A_2, ... A_m of SS. We say that these subsets form a partition of SS, if the subsets are pairwise disjoint:

AkAl={}for all klA_k \cap A_l =\{ \} \quad\text{for all $k\neq l$}

and the union of these subsets is SS:

A1...Am=SA_1 \cup ...\cup A_m = S

The Venn-diagram looks like a puzzle.

Here are two partitions of S={1,2,3,4,5,6}S=\{1,2,3,4,5,6\}:

Exercise 1
Q1

S={1,2,3,4,5,6,7,8,9,10}S=\{1,2,3,4,5,6,7,8,9,10\}, A={1,3,5,8}A=\{1,3,5,8\}, and B={2,5,10}B=\{2,5,10\}.

  1. Determine the sets ABA\cap B, ABA\cup B, AA^\prime, ABA\cap B^\prime and ABA \cup B^\prime.
  2. Is 3B3\in B?
  3. Is BAB\subset A?
Q2

AA is a subset of the universal set SS. Determine {}\{ \}^\prime, SS^\prime, AAA\cup A^\prime, AAA\cap A^\prime, and (A)(A^\prime)^\prime.

Q3

Consider two sets AA and BB with ABA\subset B. Determine ABA\cap B and ABA\cup B.

Q4

Consider the universal set SS and two subsets AA and BB of SS. Do the following subsets form a partition of SS?

  1. AA and AA^\prime
  2. AB,AB,ABA\cap B, A^\prime\cap B, A\cap B^\prime and ABA^\prime\cap B^\prime

Hint: draw the Venn-Diagram.

Q5

Show that for any two subsets AA and BB in SS the following is true:

AB=A+BAB\vert A\cup B\vert = \vert A\vert +\vert B\vert -\vert A\cap B\vert

Simplify the formula for the case where AA and BB are disjoint.

Hint: draw the Venn-Diagram.

Q6

Assume that A1,...,AmA_1,...,A_m is a partition of SS. Show that

A1+A2+...+Am=S|A_1|+|A_2|+...+|A_m|=|S|
Q7

Show that

  1. (AB)=AB(A\cup B)^\prime = A^\prime \cap B^\prime

  2. (AB)=AB(A\cap B)^\prime = A^\prime \cup B^\prime

Solution
A1
  1. AB={5}A\cap B=\{ 5\}, AB={1,2,3,5,8,10}A\cup B=\{1,2,3,5,8,10 \}, A={2,4,6,7,9,10}A^\prime=\{2,4,6,7,9,10\}, AB={1,3,8}A\cap B^\prime=\{ 1,3,8\} and AB={1,3,4,5,6,7,8,9}A \cup B^\prime=\{ 1,3,4,5,6,7,8,9\}
  2. 3∉B3\not\in B
  3. B⊄AB\not\subset A.
A2

{}=S\{ \}^\prime=S, S={}S^\prime=\{ \}, AA=SA\cup A^\prime=S, AA={}A\cap A^\prime=\{ \}, and (A)=A(A^\prime)^\prime=A

A3

AB=AA\cap B=A and AB=BA\cup B=B

A4

See figure below.

  1. Yes
  2. Yes
A5

See figure below.

If AA and BB are disjoint, it is AB=0\vert A\cap B\vert =0, and therefore

AB=A+B\vert A\cup B\vert = \vert A\vert +\vert B\vert
A6

It is a generalisation of A5. Because A1A_1, ..., AmA_m do not overlap, it is

A1A2...Am=S=A1+A2+...+Am|\underbrace{A_1 \cup A_2 \cup ... \cup A_m}_{=S}| = |A_1|+|A_2|+...+|A_m|

But the union of these sets is SS. Thus, it is

A1+A2+...+Am=S|A_1|+|A_2|+...+|A_m|=|S|
A7

See figure below.