midterm logic
midterm logic
1. Union (A U B) Example:
The union of two sets is a set that contains all Let A = {1, 2} and B = (a, b)
elements from both sets, without duplicates. A x B= (1, b), (2, a), (2, b)}
AUB = {x | x ∈ A or x ∈ B}
Example 1:
Example:
Let the following sets be defined:
Let A= (1, 2, 3) and B = (3, 4, 5}
A = {1, 2, 3, 4, 5}
The union is (A U B) = {1, 2, 3, 4, 5)
B = {4, 5, 6, 7}
2. Intersection (A∩B)
C = {2, 4, 6, 8}
The intersection of two sets is a set that
contains only the elements common to both U = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}
sets.
A ∩ B = {xlx ∈ A and x ∈ B} 1. (AUB) ∩ (AUC)
Example: B = {5, 6, 7, 8, 9}
A ∩ A= {1, 2, 3}
7. Absorption Laws
AU(A∩B)=A
A∩(AUB)=A
8. De Morgan's Laws
A = {1, 3, 5, 7, 9}
B = {2, 3, 5, 8}
C = {1, 2, 6, 8, 9}
(AUB)-(A∩C)
AUB (Union)
A∩C (Intersection)
(AUB)-(A∩C)
(Set Difference)
={2, 4,6,8}