CSCI 301 L03 Notes

Lecture 3 - Notes

Outcomes

Sets 2

Announcements

Subsets and Powersets

Definition: Suppose \(A\) and \(B\) are sets. If every element of \(A\) is also an element of \(B\), then \(A\) is a subset of \(B\); this is denoted \(A \subseteq B\).

For example, let:

Then the following are true:

  1. \(A \subseteq B\)
  2. \(B \subseteq A\)
  3. \(C \subseteq A\)
  4. \(C \not\in A\)
  5. \(A \not\subseteq C\)
  6. \(\{n^2 : n \in \mathbb{Z}\} \subseteq \mathbb{Z}\)

Aside: If \(A \subseteq B\) and \(A \ne B\), then \(A\) is a proper subset of \(B\), denoted \(A \subset B\).

Definition: The power set of a set \(A\) is the set of all subsets of \(A\). It is denoted \(\mathcal{P}(A)\), or sometimes \(2^A\). In other words, \(\mathcal{P}(A) = \{S : S \subseteq A\}\).

Do Exercises Part A

Cartesian Product

Terminology/notation:

Definition: The Cartesian product of two sets \(A\) and \(B\), denoted \(A \times B\), is the set of ordered pairs \((a, b)\) where \(a \in A\) and \(b \in B\). \[ A \times B = \{\left(a, b\right) : a \in A \text{ and } b \in B\} \] Example: \[ \begin{align*} A &= \{a, b\}\\ B &= \{1, 2, 3\} \end{align*} \]

\[ A \times B = \{(a, 1), (a, 2), (a, 3), (b, 1), (b, 2), (b, 3)\} \]

Generalization: The cartesian product generalizes to any number of sets: \(A \times B \times C\) is the set of all ordered triples (or 3-tuples) whose members are from \(A\), \(B\), and \(C\) respectively.

Do Exercises Part B

Set Operations

Definitions:

Example: Let \(S = \{1, 2, 3\}\) and \(T = \{2, 4\}\).

Do Exercises Part C

Complement, Venn diagrams

When talking about a set \(P\), it’s often useful to talk about it in terms of a universal set \(U\), where \(P \subseteq U\), where \(U\) is (informally) the set of all things that might have been considered for membership in \(P\). Notice that this is informal and context-dependent, but useful nonetheless:

Definition If \(A\) has a universal set \(U\), then the complement of \(A\), denoted \(\overline{A}\), is the set \(\overline{A} = U - A\).

Examples:

Venn Diagrams are a useful way to visualize sets and their relations with each other:

Here,

Let \(U\) = \(\{x : x \in \mathbb{N} \text{ and } x \le 20\}\) is the contents of the rectangular box.

Let \(A = \{x : x \in U \text{ and } x \text{ is odd}\}\) is the contents of the left circle.

Let \(B = \{x : x \in U \text{ and } x > 10\}\) is the contents of the right circle.

\(A \cup B\) is the contents of both circles.

\(A \cap B\) is the contents of the region where the circles overlap.

Do Exercises Part D