Note: italicized outcomes are the ones we didn’t get to during Lecture 2.
Know the definition of subset, power set.
Compute a Cartesian Product of two or more sets
Understand the notation and meaning for: union, intersection, difference, and complement
Be able to draw and interpret Venn diagrams
A1
Reminder: extended to Sunday. Today’s class covers the rest of what you need.
Reminder: you must submit a PDF generated by LaTeX from the provided .tex template. See the guide and come to office hours if you’re having trouble.
Lab 1: how’s it going? Due Sunday night.
Arun’s office hours are posted (Tuesday 3-4pm). You can visit either TA’s office hours, not only your own lab TA’s.
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:
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
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.
Definitions:
Example: Let \(S = \{1, 2, 3\}\) and \(T = \{2, 4\}\).
Do Exercises Part C
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:
If talking about the set of prime numbers, then \(\mathbb{N}\) makes for a natural universal set.
If talking about the set of students enrolled in this class, the universal set might be all CS premajors, or all students taking classes in CSE, all Western students, or all students in the USA.
Definition If \(A\) has a universal set \(U\), then the complement of \(A\), denoted \(\overline{A}\), is the set \(\overline{A} = U - A\).
Examples:
If \(P\) is the set of primes with universal set \(\mathbb{N}\), then \(\overline{P}\) is the set of composite numbers (and 1, which is usually considered neither prime nor composite).
In our Exercises Part C, we can consider \(U\) to be the universal set for \(A\) and \(B\), so \(\overline{A} = \{2, 4, 6, \ldots, 20\}\).
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.