Docsity

Discrete Mathematics(set operations), Lecture notes of Discrete Mathematics

Partial preview of the text

Download Discrete Mathematics(set operations) and more Lecture notes Discrete Mathematics in PDF only on Docsity!

Set Operations

Discrete Mathematics

Definition: Union of Sets

Definition Let A and B be sets. The union of the sets A and B, denoted by A ∪ B, is the set that contains those elements that are either in A or in B, or in both.

A ∪ B = {x | (x ∈ A) ∨ (x ∈ B)}.

A B

U

Definition: Disjoint Sets

Definition Two sets are called disjoint if their intersection is the empty set.

U

A B

Principle of Inclusion-Exclusion

The number of elements in the union of two sets is equal to the number of elements in the first set plus the number of elements in the second one, minus the number of elements in the intersection of the two sets because they were counted twice. Theorem

|A ∪ B| = |A| + |B| − |A ∩ B|

Definition: Symmetric Difference of Sets

Definition Let A and B be sets. The symmetric difference of A and B, denoted by A ⊕ B, is the set containing those elements in either A or B, but not in both A and B.

A ⊕ B = {x | (x ∈ A) ⊕ (x ∈ B)}.

A B

U

Definition: Complement of Sets

Definition Let U be the universal set. The complement of the set A, denoted by A or Ac^ , is the set containing those elements that are in U but not in A. In other words, the complement of the set A is the complement of A with respect to U, i.e. U − A.

A = {x | x ∈/ A}.

U

A

Set Identities (continued)

Identity Name A ∪ B = B ∪ A Commutative laws A ∩ B = B ∩ A (A ∪ B) ∪ C = A ∪ (B ∪ C ) Associative laws (A ∩ B) ∩ C = A ∩ (B ∩ C ) A ∪ (B ∩ C ) = (A ∪ B) ∩ (A ∪ C ) Distributive laws A ∩ (B ∪ C ) = (A ∩ B) ∪ (A ∩ C ) A ∩ B = A ∪ B De Morgan’s laws A ∪ B = A ∩ B A ∪ A = U Complement laws A ∩ A = ∅

Membership Table

We consider each combination of sets that an element can belong to and verify that elements in the same combinations of sets belong to both the sets in the identity. To indicate that an element is in a set, a 1 is used; to indicate that an element is not in a set, a 0 is used.

Example: De Morgan’s law: A ∪ B = A ∩ B

A B A ∪ B A ∪ B A B A ∩ B

Example of a Generalized Union of Sets

This Venn diagram shows the union of the sets A, B and C.

A B

U

C

Definition: Generalized Intersection of Sets

Definition The intersection of a collection of sets is the set that contains those elements that are members of all the sets in the collection. We use the notation

A 1 ∩ A 2 ∩ · · · ∩ An =

⋂^ n

i =

Ai

to denote the intersection of the sets A 1 , A 2 , ..., An.