[HD] EECS3342 F26 - 2026-09-24 (Thursday) - Lecture 5
Overview
Jackie Wang develops the set-theory foundations for relations: subset and set-difference rules lead to power sets, Cartesian products, and a formal definition of relations. Examples show how to enumerate subsets and relations, calculate power-set size as either a sum of binomial coefficients or 2^|S|, and represent all relations from S to T as the power set of S × T.
Key takeaways
- To prove S₁ is a proper subset of S₂, establish S₁ ⊆ S₂ and provide a witness x ∈ S₂ with x ∉ S₁.
- If S₁ ⊆ S₂, then S₁ = S₂ exactly when S₂ \ S₁ is empty.
- A set with n elements has 2ⁿ subsets because each element independently can be included or excluded; equivalently, the count is the sum of n choose k for k = 0 through n.
- A Cartesian product S × T contains every valid ordered pair with its first element from S and second from T.
- Relations from S to T are precisely the subsets of S × T, so their total number is 2^(|S|·|T|); the empty relation and S × T are the minimum and maximum cases.
Chapters
- Jackie Wang says the Lab 1 solution will be released that night or the next day, with TA lab time and office hours available for questions.
- The programming test is scheduled for October 7; a PDF guide and a past-year test will be shared before then.
- Students should practice Rodin syntax and tool use, and can type the PDF solution into Rodin as extra practice.
- S₁ ⊆ S₂ means every x in S₁ is also in S₂; elements outside S₁ do not affect whether the implication holds.
- Subset inclusion allows S₁ and S₂ to be equal, unlike proper subset inclusion.
- Set comprehension is introduced as a way to define sets implicitly, including relational operators covered later.
- S₁ \ S₂ contains elements that are in S₁ and not in S₂; reversing the operands changes the result.
- If S₁ ⊆ S₂ and S₂ \ S₁ = ∅, then S₁ = S₂.
- A Venn-diagram interpretation identifies S₂ \ S₁ as the region inside S₂ but outside S₁.
- S₁ ⊂ S₂ requires S₁ ⊆ S₂ and at least one element x in S₂ that is not in S₁.
- The witness x demonstrates that the sets are not equal while preserving containment.
- Jackie Wang emphasizes this containment-plus-witness pattern as useful for later refinement arguments.
- O(n) is treated as a set of functions whose growth is asymptotically bounded by n, including constants, logarithmic functions, and linear functions such as 2n.
- O(n) is a proper subset of O(n²), since functions such as n² or n log n belong to O(n²) but not O(n).
- The example illustrates why proper-subset notation conveys more information than ordinary subset notation.
- The empty set is a subset of every set, and every set is a subset of itself; no set is a proper subset of itself.
- The empty set is a proper subset of S exactly when S is nonempty.
- Set equality can be proved by showing S ⊆ T and T ⊆ S; set difference is generally noncommutative because S₁ \ S₂ and S₂ \ S₁ select opposite regions.
- The power set P(S) contains every subset X of S, so each member of a power set is itself a set.
- For S = {1, 2, 3}, the smallest member is ∅ and the largest member is S itself.
- The definition uses ordinary subset inclusion, ensuring that both ∅ and S are included.
- Group the subsets of {1, 2, 3} by size: one subset of cardinality 0, three of cardinality 1, three of cardinality 2, and one of cardinality 3.
- The rows correspond to the binomial counts 3 choose 0, 3 choose 1, 3 choose 2, and 3 choose 3.
- Their total, 1 + 3 + 3 + 1 = 8, gives the cardinality of P({1, 2, 3}); sets with different element orderings are not counted as distinct.
- For a set S with n elements, count subsets separately by cardinality k, from 0 through n.
- The total number of subsets is the sum of the counts n choose k for all k from 0 to n.
- Although binomial counts are symmetric, calculating half and doubling requires care when the middle cardinality is not paired with a distinct row.
- Each element independently has two choices when constructing a subset: include it or exclude it.
- For S = {A, B, C}, three binary choices produce 2³ = 8 subsets, including ∅ and S.
- The formula |P(S)| = 2^|S| is an efficient alternative to summing the binomial coefficients.
- A Cartesian product S₁ × … × Sₙ contains n-tuples whose ith element is drawn from Sᵢ.
- For {A, B} × {2, 4} × {$, %}, each tuple has three components and there are 2 × 2 × 2 = 8 tuples.
- A branching tree enumerates the tuples systematically: each root-to-leaf path corresponds to one tuple.
- A relation from source S to target T is a set of ordered pairs (x, y), where x ∈ S and y ∈ T.
- For S = {1, 2, 3} and T = {A, B}, the pair (1, A) is valid, but the bare pair is not itself a relation until enclosed in a set.
- The pair (B, 2) is invalid for this source and target because its first component is not in S and its second is not in T.
- The empty relation ∅ is the minimum relation because it contains no ordered pairs.
- The maximum relation is S × T, which includes every valid source-target pair.
- For S = {1, 2, 3} and T = {A, B}, the maximum relation contains six pairs; relation order does not matter because a relation is a set.
- For S = {A, B} and T = {2, 4}, the maximum relation S × T has four pairs: (A, 2), (A, 4), (B, 2), and (B, 4).
- Every relation is a subset of that maximum relation; relations of cardinality k are counted by choosing k of its four pairs.
- Thus the set of all relations from S to T is P(S × T), and there are 2^(|S|·|T|) such relations.
Transcript excerpt
0:05 All right. So, uh your lab number one was due uh yesterday. Hopefully everybody submit in time. Uh I will release the solution to lab number one very soon either later tonight or tomorrow. Please take a look. And then you can definitely drop by the lab session next Wednesday to ask the TA about a solution. That's one way. Or if you want to drop at my office hour next Monday or Thursday to talk about it, you're welcome to. I'll leave it to you, right? uh you can take a look at the solution. The solution I give to you is not like in the rodent form. So you have to look at the PDF and if you want to type it uh type the solution in into into rodent that's another little practice for you as well. Okay. So definitely you want to target the actual programming test and by next Tuesday's class I will also make available to you guys about the uh PDF guide about
0:53 upcoming programming test and also I'll release a like a past year's uh programming test as well. So you guys can definitely take as a reference and practice earlier. Okay, your programming test is going to be right before the reading week October 7th. because definitely still have time but you got to make sure get yourself familiar with about the syntax of rodent and also make sure you know how to use the rodent tool right that's really the main requirements I'll later them out in the actual PDF guide so I'll also can go uh go over that guy briefly briefly with you uh next class on Tuesday okay and you know how to find the lecture digest and notes template right so uh same drill any questions
This is the start of the transcript. Save this video free for the whole transcript, searchable and time-coded.
In this course
Related notes
Summary, takeaways, and chapters were generated by AI from the video's transcript and may contain errors. The video belongs to its creator, Jackie Wang.