0% found this document useful (0 votes)
24 views

Lecture-08

Uploaded by

Hasanul Mahi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
24 views

Lecture-08

Uploaded by

Hasanul Mahi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 17

Lecture 8

Topics:
1. Set Operations
2. Set Identities
3. De Morgan’s Law for Set Operations
2.2 Set Operations
Definition 1: 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. An element x belongs to the union of the sets A and B if and
only if x belongs to A or x belongs to B.
This tells us that A ∪ B = {x ∣ x ∈ A ∨ x ∈ B}.
EXAMPLE 1: The union of the sets {1, 3, 5} and {1, 2, 3} is the set {1,
2, 3, 5}; that is, {1, 3, 5}∪{1, 2, 3} = {1, 2, 3, 5}
EXAMPLE 3: The intersection of the sets {1, 3, 5} and {1, 2, 3} is the
set {1, 3}; that is, {1, 3, 5}∩{1, 2, 3}={1, 3}.
Venn Diagram

U U

A B A B

A ∪ B is shaded. A ∩ B is shaded.
Disjoint Set

Definition 3: Two sets are called disjoint if their intersection is


the empty set.
EXAMPLE 5:
Let A = {1, 3, 5, 7, 9} and B = {2, 4, 6, 8, 10}. Because A ∩ B = ∅,
A and B are disjoint.
Principle of inclusion–exclusion
We are often interested in finding the cardinality of a union of two finite sets A and
B. Note that |A| + |B| counts each element that is in A but not in B or in B but not in
A exactly once, and Be careful not to overcount! each element that is in both A and B
exactly twice. Thus, if the number of elements that are in both A and B is subtracted
from |A| + |B|, elements in A ∩ B will be counted only once.
Hence, |A ∪ B| = |A| + |B| − |A ∩ B|.
The generalization of this result to unions of an arbitrary number of sets is called the
principle of inclusion–exclusion. The principle of inclusion–exclusion is an
important technique used in enumeration. We will discuss this principle and other
counting techniques in detail in Chapters 6 and 8.
Difference of two sets
Definition 4: Let A and B be sets. The difference of A and B, denoted by A − B, is
the set containing those elements that are in A but not in B. The difference of A
and B is also called the complement of B with respect to A.

Remark: The difference of sets A and B is sometimes denoted by A∖B. An


element x belongs to the difference of A and B if and only if x ∈ A and x ∉ B. This
tells us that A − B = {x ∣ x ∈ A ∧ x ∉ B}.

EXAMPLE 6: The difference of {1, 3, 5} and {1, 2, 3} is the set {5};

that is, {1, 3, 5} − {1, 2, 3} = {5}. This is different from the difference of {1, 2, 3} and
{1, 3, 5}, which is the set {2}
Complement of a set

Definition 5: Let U be the universal set. The complement of the set A, denoted
by Ac, is the complement of A with respect to U.
Therefore, the complement of the set A is U − A.
Remark: The definition of the complement of A depends on a particular universal
set U. This definition makes sense for any superset U of A. If we want to identify
the universal set U, we would write “the complement of A with respect to the set
U.” An element belongs to Ac if and only if x ∉ A.
This tells us that Ac = {x ∈ U ∣ x ∉ A}.
Venn Diagram

U U

A
A B

Venn diagram for the difference of A Venn diagram for the complement of
and B the set A.
2.2.2 Set Identities
Identity Name

A∩U=A Identity laws


A∪∅=A

A∪U=U Domination laws


A∩∅=∅

A∪A=A Idempotent laws


A∩A=A

(Ac)c = A Complementation law

A∪B=B ∪A Commutative laws


A∩B=B∩A
Identity Name

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)c = Ac ∪ Bc De Morgan’s laws


(A ∪ B)c = Ac ∩ Bc

A ∪ (A ∩ B) = A Absorption laws
A ∩ (A ∪ B) = A

A∪Ā=U Complement laws


A∩Ā =∅
EXAMPLE 10 Prove that (A ∩ B)c = Ac ∪ Bc
Do it by yourself
Proof of DeMorgan’s theorem
EXAMPLE 11 Use set builder notation and logical equivalences to establish the first De Morgan law (A ∩ B) c = Ac ∪
Bc

Solution: We can prove this identity with the following steps.

(A ∩ B)c = {x ∣ x ∉ A ∩ B} by definition of complement

= {x ∣ ¬(x ∈ (A ∩ B))} by definition of does not belong symbol

= {x ∣ ¬(x ∈ A ∧ x ∈ B)} by definition of intersection

= {x ∣ ¬(x ∈ A) ∨ ¬(x ∈ B)} by the first De Morgan law for logical equivalences

= {x ∣ x ∉ A ∨ x ∉ B} by definition of does not belong symbol

= {x ∣ x ∈ Ac ∨ x ∈ Bc} by definition of complement

= {x ∣ x ∈ Ac ∪ Bc} by definition of union

= Ac ∪ Bc by meaning of set builder notation


Union and Intersection of several sets

U
U

A B A B

C C

(a) A U B U C is shaded. (b) A ∩ B ∩ C is shaded.


Ex 13: Use a membership table to show that A ∩ (B ∪ C) = (A ∩ B) ∪ (A ∩ C).
A B C BUC A ∩ (B ∪ C) (A ∩ B) (A ∩ C). (A ∩ B) ∪
(A ∩ C)

1 1 1 1 1 1 1 1

1 1 0 1 1 1 0 1

1 0 1 1 1 0 1 1

1 0 0 0 0 0 0 0

0 1 1 1 0 0 0 0

0 1 0 1 0 0 0 0

0 0 1 1 0 0 0 0

0 0 0 0 0 0 0 0
EXAMPLE 14 : Let A, B, and C be sets. Let A, B, and C be sets.
Show that (A ∪ (B ∩ C)) c = (C c ∪ B c) ∩ Ac.
Solution: We have (A ∪ (B ∩ C)) c
= Ac ∩ (B ∩ C) c by the first De Morgan law
= Ac ∩ (B c ∪ C c) by the second De Morgan law
= (B c ∪ C c) ∩ Ac by the commutative law for intersections
= (C c ∪ B c) ∩ Ac by the commutative law for unions.
Union and intersection of a collection of sets
Definition 6 The union of a collection of sets is the set that contains those elements that
are members of at least one set in the collection.

=⋃ni = 1, Ai to denote the union of the sets A1, A2, … , An


We use the notation A1 ∪ A2 ∪ ⋯ ∪ An

Definition 7 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 A1 ∩ A2 ∩ ⋯ ∩ An = ∩ni=1 Ai


The end

You might also like