Set Basics
Set Basics
1 Representation of Sets
A set can be represented in two ways:
2 Types of Sets
• Finite Set: A set with limited elements. Example: A = {1, 2, 3, 4, 5}
• Infinite Set: A set with unlimited elements. Example: B = {x ∈ N | x > 0}
• Singleton Set: A set with exactly one element. Example: C = {0}
5
• Null Set: A set with no elements. Example: D = ∅
• Equal Sets: Two sets with exactly the same elements. Example: E = {1, 2}, F = {2, 1}
25
• Equivalent Sets: Sets with the same number of elements. Example: G = {a, b, c}, H = {1, 2, 3}
• Universal Set: The set containing all elements under consideration. Example: U = {1, 2, 3, 4, 5}
• Disjoint Sets: Sets with no common elements. Example: P = {1, 2}, Q = {3, 4}
• Subset: Every element of one set belongs to another. Example: A = {1, 2} ⊆ B = {1, 2, 3}
• Proper Subset: A subset that is not equal to the set. Example: A = {1, 2} ⊂ B = {1, 2, 3}
t8
• Superset: A set containing all elements of another set. Example: B = {1, 2, 3} ⊇ A = {1, 2}
• Power Set: Set of all subsets of a set. Example: P ({1, 2}) = {∅, {1}, {2}, {1, 2}}
3 Operations on Sets
A B
• Union: A ∪ B = {x | x ∈ A or x ∈ B} A∪B
1
A B
A B
5
A−B
25
• Difference: A − B = {x | x ∈ A and x ∈
/ B}
A
t8
• Complement: Ac = {x | x ∈ U and x ∈
/ A} Ac
A B
sa
• Associative Law:
(A ∪ B) ∪ C = A ∪ (B ∪ C), (A ∩ B) ∩ C = A ∩ (B ∩ C)
• Identity Law:
A ∪ ∅ = A, A∩U =A
• Absorption Law:
A ∩ (A ∪ B) = A, A ∪ (A ∩ B) = A
2
• Complement Law:
A ∪ Ac = U, A ∩ Ac = ∅
• Idempotent Law:
A ∪ A = A, A∩A=A
• Domination Law:
A ∪ U = U, A∩∅=∅
• De Morgan’s Laws:
(A ∪ B)c = Ac ∩ B c , (A ∩ B)c = Ac ∪ B c
A B A B
5
(A ∪ B)c (A ∩ B)c
• Double Complement:
Real numbers R
25
Q
Z
(Ac )c = A
t8
W
N Complex Numbers C
I
sa
here
• N = Natural numbers
• W = Whole numbers
• Z = Integers
• Q = Rational numbers
• I = Irrational numbers
• R = Real numbers
• C = Complex numbers
3
5 Addition of Sets (Minkowski Sum)
For two sets A and B,
A + B = { a + b | a ∈ A, b ∈ B }
Example:
A = {1, 2}, B = {3, 4} ⇒ A + B = {1 + 3, 1 + 4, 2 + 3, 2 + 4} = {4, 5, 6}
7 Principle of Inclusion–Exclusion
5
For n finite sets A1 , A2 , A3 , . . . , An :
n
! n
[ X X X
n(Ai ∩Aj ∩Ak )−· · ·+(−1)n−1 n(A1 ∩A2 ∩· · ·∩An )
n
i=1
Ai =
i=1
n(Ai )−
25 1≤i<j≤n
n(Ai ∩Aj )+
1≤i<j<k≤n
Rule: - Add intersections of an odd number of sets. - Subtract intersections of an even number of sets.