Discrete Mathematics : Sets

Contents

Concepts

What is a set?

A set is a collection of related items

Examples:

Subsets

Examples:

Set equality

Examples:

Venn diagrams

Examples:

Operations on sets

Let $A$ and $B$ be subsets of a universal set $U$.

  1. The union of $A$ and $B$, denoted $A \cup B$, is the set of all elements that are in at least one of $A$ or $B$.
    $A \cup B = \{ x \in U ~|~ x \in A \text{ or } x \in B \}$
  2. The intersection of $A$ and $B$, denoted $A \cap B$, is the set of all elements that are common to both $A$ and $B$.
    $A \cap B = \{ x \in U ~|~ x \in A \text{ and } x \in B \}$
  3. The difference of $B$ minus $A$ (or relative complement of $A$ in $B$), denoted $B - A$, is the set of all elements that are in $B$ and not $A$.
    $B - A = \{ x \in U ~|~ x \in B \text{ and } x \not\in A \}$
  4. The complement of $A$, denoted $A'$, is the set of all elements in $U$ that are not in $A$.
    $A' = \{ x \in U ~|~ x \not\in A \}$

Venn diagrams: union, intersection, difference, complement

Examples:

Operations on sets

Given real numbers $a$ and $b$ with $a \le b$:

Examples:

Operations on sets

Given sets $A_0, A_1, A_2, \ldots$ that are subsets of a universal set $U$ and given a nonnegative integer $n$,

Examples:

Empty set

Empty set, denoted by $\phi$, is a set with no elements.

Examples:

Disjoint sets

Examples:

Mutually disjoint sets

Examples:
Are the following sets mutually disjoint?

Partition of a set

Examples:

Power set

Examples:

Ordered $n$-tuple

Examples:

Cartesian product

Examples:

Properties of sets

Procedural versions of set definitions

Let $X$ and $Y$ be subsets of a universal set $U$ and suppose $x$ and $y$ are elements of $U$.

Set identities

LawsFormulaFormula
Commutative laws$A \cup B = B \cup A$$A \cap B = B \cap A$
Associative laws$(A \cup B) \cup C = A \cup (B \cup C)$$(A \cap B) \cap C = A \cap (B \cap C)$
Distributive laws$A \cup (B \cap C) = (A \cup B) \cap (A \cup C)$$A \cap (B \cup C) = (A \cap B) \cup (A \cap C)$
Identity laws$A \cup \phi = A$$A \cap U = A$
Complement laws$A \cup A' = U$$A \cap A' = \phi$
Double comp. law$(A')' = A$
Idempotent laws$A \cup A = A$$A \cap A = A$
Uni. bound laws$A \cup U = U$$A \cap \phi = \phi$
De Morgan's laws$(A \cup B)' = A' \cap B'$$(A \cap B)' = A' \cup B'$
Absorption laws$A \cup (A \cap B) = A$$A \cap (A \cup B) = A$
Complements$U' = \phi$$\phi' = U$
Set diff. laws$A - B = A \cap B'$

Element Argument

Type 1: Prove that a set is a subset of another

Type 2: Prove that two sets are equal

Type 3: Prove that a set equals the empty set

$A \cup (B \cap C) = (A \cup B) \cap (A \cup C)$

Prove that for all sets $A$, $B$, and $C$
$A \cup (B \cap C) = (A \cup B) \cap (A \cup C)$

Proof

We need to prove:
  1. $A \cup (B \cap C) \subseteq (A \cup B) \cap (A \cup C)$
  2. $(A \cup B) \cap (A \cup C) \subseteq A \cup (B \cap C)$
1. Prove that $A \cup (B \cap C) \subseteq (A \cup B) \cap (A \cup C)$.
Suppose $x \in A \cup (B \cap C)$.
$x \in A$ or $x \in B \cap C$     $(\because \text{defn. of union})$ 2. Prove that $(A \cup B) \cap (A \cup C) \subseteq A \cup (B \cap C)$.
Suppose $x \in (A \cup B) \cap (A \cup C)$.
$x \in A \cup B$ and $x \in A \cup C$     $(\because \text{defn. of intersection})$

$(A \cup B)' = A' \cap B'$

Prove that for all sets $A$ and $B$, $(A \cup B)' = A' \cap B'$.

Proof

We need to prove:
  1. $(A \cup B)' \subseteq A' \cap B'$
  2. $A' \cap B' \subseteq (A \cup B)'$
  1. Prove that $(A \cup B)' \subseteq A' \cap B'$.
    Suppose $x \in (A \cup B)'$.
    $x \not\in A \cup B$     $(\because \text{defn. of complement})$
    It is false that ($x$ is in $A$ or $x$ is in $B$).
    $x$ is not in $A$ and $x$ is not in $B$     $(\because \text{De Morgan's law of logic})$
    $x \not\in A$ and $x \not\in B$
    $x \in A'$ and $x \in B'$     $(\because \text{defn. of complement})$
    $x \in (A' \cap B')$     $(\because \text{defn. of intersection})$
    Hence, $(A \cup B)' \subseteq A' \cap B'$     $(\because \text{defn. of subset})$
  2. Prove that $A' \cap B' \subseteq (A \cup B)'$.
    Suppose $x \in A' \cap B'$.
    $x \in A'$ and $x \in B'$     $(\because \text{defn. of intersection})$
    $x \not\in A$ and $x \not\in B$     $(\because \text{defn. of complement})$
    $x$ is not in $A$ and $x$ is not in $B$
    It is false that ($x$ is in $A$ or $x$ is in $B$)     $(\because \text{De Morgan's law of logic})$
    $x \not\in A \cup B$
    $x \in (A \cup B)'$     $(\because \text{defn. of complement})$
    Hence, $A' \cap B' \subseteq (A \cup B)'$     $(\because \text{defn. of subset})$

$A \cap B = A$ and $A \cup B = B$

For any sets $A$ and $B$, if $A \subseteq B$, then
$(a)$ $A \cap B = A$ and $(b)$ $A \cup B = B$.

Proof

Part $(a)$: We need to prove:
  1. $A \cap B \subseteq A$
  2. $A \subseteq A \cap B$
Part $(b)$: We need to prove:
  1. $A \cup B \subseteq B$
  2. $B \subseteq A \cup B$
Part $(a)$.
  1. Proof that $A \cap B \subseteq A$.
    $A \cap B \subseteq A$     $(\because \text{inclusion of intersection})$
  2. Proof that $A \subseteq A \cap B$.
    Suppose $x \in A$
    $x \in B$     $(\because A \subseteq B)$
    $x \in A$ and $x \in B$
    $x \in A \cap B$     $(\because \text{defn. of intersection})$
Part $(b)$.
  1. Proof that $A \cup B \subseteq B$.
    Suppose $x \in A \cup B$
    $x \in A$ or $x \in B$     $(\because \text{defn. of union})$
    If $x \in A$, then $x \in B$     $(\because A \subseteq B)$
    $x \in B$     $(\because \text{Modus Ponens and division into cases})$
  2. Proof that $B \subseteq A \cup B$.
    $B \subseteq A \cup B$     $(\because \text{inclusion in union})$

$E \subseteq A$

If $E$ is a set with no elements and $A$ is any set, then $E \subseteq A$.

Proof

Proof by contradiction.

Only one empty set

There is only one set with no elements.

Proof

$A \cap \phi = \phi$

Prove that for any set $A$, $A \cap \phi = \phi$

Proof

Proof by contradiction.

If $A \subseteq B$ and $B \subseteq C'$, then $A \cap C = \phi$

For all sets $A$, $B$, and $C$, if $A \subseteq B$ and $B \subseteq C'$, then $A \cap C = \phi$.

Proof

Proof by contradiction.

Proof by counterexample: $(A - B) \cup (B - C) = A - C$

For all sets $A$, $B$, and $C$, $(A - B) \cup (B - C) = A - C$.

Venn diagram counterexample

Disproof

False!
$(A - B) \cup (B - C) \not= A - C$

Proof by induction: $|\text{PowerSet}(X)| = 2^n$

For all integers $n \ge 0$, if a set $X$ has $n$ elements, then $\text{PowerSet}(X)$ has $2^n$ elements.

Proof

Let $P(n)$ denote "Any set with $n$ elements has $2^n$ subsets."

1:1 correspondence: Any subset $A$ of $X - \{a\}$ can be matched up with a subset $B$, equal to $A \cup \{a\}$, of $X$ that contains $a$.

Algebraic proof: $(A \cup B) - C = (A - C) \cup (B - C)$

Construct an algebraic proof that for all sets $A$, $B$, and $C$,
$(A \cup B) - C = (A - C) \cup (B - C)$

Proof

Algebraic proof: $A - (A \cap B) = A - B$

Construct an algebraic proof that for all sets $A$ and $B$,
$A - (A \cap B) = A - B$

Proof