Home > CS1300: Discrete Structures > Set TheorySet Theory
Set: A collection of distinct objects (elements).
Note: Implications of order not mattering in sets:
- Two sets are equal if and only if they contain the same elements.
- Listing elements twice is redundant. \text{Example: } A: \{2,4,6,8,10\} = B: \{2,4,6,10,8\} \\~\\ \text{Can be Verified By: } (\forall x)[(x \in A \to x \in B) \land (x \in B \to x \in A)]
Braces (\{\}): Braces are used to indicate a set.
\in (belongs to): Used to show that an element belongs to a particular set.
Empty Set (\emptyset or \{\}): Set with no numbers.
Common Pitfall: Don’t accidentally use \{ \emptyset \} to represent an empty set, \{ \emptyset \} is a set containing an empty set!
Common Set Theory Notations:
Predicate Notation:Example: A = {x|(∃y)[(y ∈ {0, 1, 2})] ∧ (x = y2)}
Example: B = {x|(∃y)(∃z)(y ∈ {1, 2} ∧ z ∈ {2, 3} ∧ x = z − y)}
Infinite Sets:
S = \{x | x \text{ is a positive even integer} \}
Instructions: List the elements of each of the following sets.
Q: { x | x is a month with exactly thirty days }
Q: { x | x is an integer and 4 \lt x \lt t}
Instructions: What’s the predicate for each of the following sets?
Q: { 1, 4, 9, 16 }
Q: { 2,3,5,7,11,31,17, ...}
\text{Open Interval Example: }\\ \{ x \in \mathbb{R} | -2 < x < 3 \}
For sets S and M, M is a subset of S if and only if every element in M is also an element of S.
Symbolic Representation:
Examples:
- { 1, 2 } \subseteq { 0,1,2,3 }
- { 1,2 } \subseteq { 1,2 }
For sets S and M, if M \subseteq S and M \ne S, then there’s at least one element of S that’s not an element of M. In this case, M is a proper subset of S.
Symbolic Representation:
Example:
- { 0 } \sub { 0,1,2,3 }
- { 1, 2 } \sub { 0,1,2,3 }
- { 1, 2 } \not \sub { 1,2 }
Superset: If m is a subset of S, then S is a superset of m.
Symbolic Representation:
Proper Superset: If M is a proper subset of S, then S is a proper superset of M
Symbolic Representation:
Instructions: What statements are true?
Let:
- A = { x | x \in N \land x \ge 4} \to { 5,6,7,8,9,... }
- B = { 10,12,16,20 }
- C = { x | (\exists y)(y \in N \land x = 2y)} \to { 0,2,4,6,8,10,... }
Q: B \subseteq C
Q: A \subseteq C
Q: \{ 11,12,13 \} \subseteq A
Q: \{ 12 \} \in B
Q: \{ x | x \in N \land x <20 \} \not \subset B
Q: { \emptyset } \subset B
Q: \emptyset \subset B
Remember: Don’t get tripped-up by the empty set. You don’t need to surround it in brackets like “\{ 11 \} \subseteq A” because it’s already a set!
Cardinality: The number of elements within a set
Note: Remember that \in and \subset behave differently!
Power Set: The power set of a set S is a set that contains all possible subsets of set S.
Two ways to verify you have all the subsets written:
Common Pitfalls:
- Putting braces around \emptyset
- Listing the same subset twice (e.g., \{1,3\} and \{3,1\})
For the following definitions, let:
- A and B be sets.
- U be the universal set (contains everything, including A and B).
Union (\cup): Set that contains all elements in either A or B.
Note: The “or” in “A or B” is inclusive. That is, every element in A, B, or A and B is part of A \cup B.
Intersection (\cap): Set that contains all elements that are in both A and B.
Disjoint Sets: If A \cap B = \emptyset, then A and B are disjoint sets.
Complement Sets: For a set A \in P(U), the complement of set A—denoted as A'—is the set of all elements that aren’t in A.
Mathematical Definition: A' = \{ x | x \in U \land x \not \in A \}
Difference Sets: The difference of A-B is the set of elements in A that aren’t in B.
Mathematical Definition: A - B = \{ x | x \in A \land x \not \in B \}
Let— A = \{1, 2, 3, 5, 10\} \\ B = \{2, 4, 7, 8, 9\} \\ C = \{5, 8, 10\}
—be subsets of S = \{1, 2, 3, 4, 5, 6, 7, 8, 9, 10\}.
Solve:
Cartesian Product: The Cartesian product of two sets is the set of all combinations of ordered pairs that can be produced from the elements of both sets.
Mathematical Definition:
If A and B are subsets of S, then: A \times B = \{ (x,y) | x \in A \land y \in B \}
Note: Cardinality of cross product: |A| = n \\ |B| = m \\~\\ |A \times B | = nm
Note: Notation for a special case: A \times A = A^2
Pitfall: Cross product is not commutative: A \times B \ne B \times A