You are on page 1of 50

CSC301: Discrete Mathematics

B.Tech. (CSE), 2020

Chapter: Set Theory

Dr. Nanda Dulal Jana


Assistant Professor
Department of Computer Science & Engineering
National Institute of Technology Durgapur
West Bengal, India
Set Theory: Topics covered

Definition of Sets, Venn Diagrams, Operations on Sets, Cartesian


Products, Power Sets, Counting Principle, Cardinality (Countable
and Uncountable), Proofs on general identities on sets, Pigeonhole
Principle.
Learning Objectives:

The students will be familiar with the following objectives after


studying the set theory:
I Understanding what constitutes a set and how to represent a
set
I Recognizing the different types of standard sets
I Defining various operations on sets
I Representing sets through Veen Diagrams
I Understanding Multisets
Introduction

The set theory was developed by German mathematician Georg


Cantor in 1870.
Sets:

I Set: A set is a well-defined collection of distinct objects.


Well-defined- There exists certain rule by which it can be
decided that whether a given object or elements belongs to the
collection or not.
Example: A set of 3rd semester CSE students.
I Sets are denoted by Capital letters such as A, B, C,... and the
elements are denoted by lowercase letters such as a, b, c,...
I If an element x belongs to a set A, then
x ∈ A otherwise x ∈/ A.
Example: A set of 3rd semester CSE students.
S = {1, 2, 3, ..., 189} → by roll numbers
S = {n1 , n2 , ...., n189 } → by name ?
Representation of a Set
In general, two types of representations are there-
1. Listing/Tabular/Roster form
2. Set-builder/Rule based form
I Listing Form: All the elements are listed and separated by
commas(,) and enclosed with in braces.
For instance, A = {a,b,c,d} and B = {2,4,6,8,...,20}
I Set-Builder Form: Certain property can be defined that
recognizes all the elements of a set.
For example: A set of even numbers less than 20
S = {x : x is an even integer, 2 ≤ x ≤ 20} or
S = {x|2 ≤ x ≤ 20, x is an even integer }
where : or | read as such that.
Example: Write a set of first five natural numbers in two forms
Listing: A = {1, 2, 3, 4, 5} and
Set-builder: S = {x : x is a natural number less than 6}
Some Important Sets with Notation

N is the set of all natural numbers


Z is the set of all integers
Z+ is the set of all positive integers
Q is the set of all rational numbers
Q+ is the set of all positive integers
R is the set of all real numbers
R+ is the set of all positive real numbers
C is the set of all complex numbers

Examples: Find the elements of the following sets


a) X = {x : x ∈ Z and x 2 ≤ 4}
b) X = {x : x ∈ Z+ and x 2 ≤ 4}
c) X = {x : x ∈ Z and x < 2 and x 2 ≤ 4}
d) X = {x : x ∈ Z and x 2 = 3}
I Cardinality of a set: The number of distinct elements in a
set. It is denoted by |x| or n(x).
Examples:
a) A = {x : x ∈ Z and x 2 = 4}. Find |A|.
b) A = {x : x ∈ Z and x 2 = 1 and x 2 = 9}. Find |A|.
I Empty Set: A set contain no element is called empty set. It
is denoted by φ or {}.
Example: A = {x : x ∈ R and x 2 + 1 = 0}.
I Singleton Set: A set with only one element is called singleton
set.
Example: A = {x : x ∈ Z and 3 < x < 5}.
Note:
{φ} = φ ?
{φ} → The set contain one element which is φ
φ → which is = {}, a null set.
I Cardinality of a set: The number of distinct elements in a
set. It is denoted by |x| or n(x).
Examples:
a) A = {x : x ∈ Z and x 2 = 4}. Find |A|.
b) A = {x : x ∈ Z and x 2 = 1 and x 2 = 9}. Find |A|.
I Empty Set: A set contain no element is called empty set. It
is denoted by φ or {}.
Example: A = {x : x ∈ R and x 2 + 1 = 0}.
I Singleton Set: A set with only one element is called singleton
set.
Example: A = {x : x ∈ Z and 3 < x < 5}.
Note:
{φ} = φ ?
{φ} → The set contain one element which is φ
φ → which is = {}, a null set.
I Cardinality of a set: The number of distinct elements in a
set. It is denoted by |x| or n(x).
Examples:
a) A = {x : x ∈ Z and x 2 = 4}. Find |A|.
b) A = {x : x ∈ Z and x 2 = 1 and x 2 = 9}. Find |A|.
I Empty Set: A set contain no element is called empty set. It
is denoted by φ or {}.
Example: A = {x : x ∈ R and x 2 + 1 = 0}.
I Singleton Set: A set with only one element is called singleton
set.
Example: A = {x : x ∈ Z and 3 < x < 5}.
Note:
{φ} = φ ?
{φ} → The set contain one element which is φ
φ → which is = {}, a null set.
Subset and Proper Subset:

I Subset: A set X is said to be a subset of a set Y if all the


elements of X are also elements of Y . It is represent as
X ⊆ Y . Mathematically,
X ⊆ Y if and only if ∀x (x ∈ X ⇒ x ∈ Y )

I Proper subset: A set X is said to be a proper subset of a set


Y if all the elements of X are also the elements of Y and
atleast one element in Y which is not in X . It is represent as
X ⊂ Y . Mathematically,
X ⊂ Y iff ∀x(x ∈ X ⇒ x ∈ Y ) and |X | < |Y | or
X ⊂ Y if ∃y , y ∈ Y but y ∈
/X
Examples:
a) Z ⊆ Q
b) Q ⊆ R
I Equal Sets: Two sets A and B are equal if they contains same
number of elements. It is denoted by A = B. Mathematically,
if A ⊆ B and B ⊆ A, then A = B.
Example: C = {2, 3, 4} and D = {x|x is a digit in the numeral
23432}. Then C = D.
I Power Set:The power set of a set X that contains all the
subsets of the set X and denoted by P(X ).
Example: X = {1, 2}. Find power set P(X ).
P(X ) = {φ, {1}, {2}, {1, 2}}.
• Cardinality of P(X ) = 2n , n is the number of elements of a set.

Qus: What is the power set of X = {φ} ?


I Universal Set: It is possible to consider a special set U(6= Φ)
such that every set under discussion is a subset of U is called a
Universal set. Thus A ⊆ U for every set A.
Ex: The set of all the students of NIT Durgapur.
Basic Concepts on Sets

• Suppose two sets A = {a, b, c, d} and B = {a, b, c, {a, b, c}}

• A = {a, {a}, {{a}}}.

• Suppose S1 = {John, Mary },


S2 = {{John, Mary }},
S3 = {{{John, Mary }}}.
is John ∈ S2 ?

Qus1: Suppose A = {1, 3, 5, 7}, comments on the following sets.


a) {1, 3} ⊂ A, b) {3} ∈ A, c) φ ∈ A, d) Φ ⊆ A

Qus2: A = {{1}, {2, 3}, {4}}


a) {2, 3} ⊂ A, b) {1} ∈ A, c) 2 ∈ A, d) {{1}, {4}} ⊆ A

Qus3: Characteristics/Features/Properties of the set X


X = {x : −2 < x 2 < 2 and x ∈ Z}
Venn Diagram
I Venn Diagram: A set can be represent in the form of
geometric figures known as Venn Diagram. These diagram
used to represent the relationship among sets with universal
set.
I The universal set is generally represented by a rectangle and
other sets are represented by circles inside the universal set.
Example:

Set A A⊆B Relation of A and B


Operations on Sets:
I Union: The union of two sets A and B denoted by A ∪ B, is a
set that contains those elements that are either in A or in B or
both. Mathematically,
A ∪ B = {x : x ∈ A or x ∈ B or in both}

A∪B A∪B A∪B =B

Example: X = {x : x ∈ Z and x 2 ≤ 9} and Y = {y : y ∈ Z and


2 ≤ y ≤ 4}. Find X ∪ Y .
Since, x 2 ≤ 9 ⇒ −3 ≤ x ≤ 3, ie. x = {−3, −2, −1, 0, 1, 2, 3}
Since, 2 ≤ y ≤ 4, Y = {2, 3, 4}
Therefore, X ∪ Y = {−3, −2, −1, 0, 1, 2, 3, 4} or
X ∪ Y = {x : x ∈ Z and −3 ≤ x ≤ 4}.
I Intersection:The intersection of two sets A and B, denoted
by A ∩ B, is a set that contains elements that are in both A
and B. Mathematically,
A ∩ B = {x : x ∈ A and x ∈ B}

A∩B A∩B =Φ A∩B =A

Example: X = {x : x ∈ Z and x 6= 0 and x 2 ≤ 5} and


Y = {y : y ∈ Z and y 2 ≥ 1}. Find X ∩ Y .
Since, x ∈ Z, x 6= 0 and x 2 ≤ 5 ⇒ x = {−2, −1, 1, 2}
Since, y ∈ Z and y 2 ≥ 1 ⇒ y ≤ −1 and y ≥ 1
Therefore, X ∩ Y = {−2, −1, 1, 2} or
X ∩ Y = {x : x ∈ Z and x 6= 0 and −2 ≤ x ≤ 2}.
I Difference of two sets: The difference of two sets A and B,
denoted by A − B, is a set of elements in A and not in B.
Mathematically,
A − B = {x : x ∈ A and x ∈ / B}

A−B A−B =A A−B

• A − B also known as relative complement of B in A.


• For any, A 6= U, A − U = Φ and U − A 6= Φ (This leads a new set !!!)
• A − B 6= B − A.
Example: X = {x : x ∈ Z and 3 ≤ x ≤ 7} and Y = {y : y ∈ Z and
5 ≤ y ≤ 9}. Find X − Y and Y − X .
Sol: Since, x = {3, 4, 5, 6, 7} and Y = {5, 6, 7, 8, 9}, then
X − Y = {3, 4} and Y − X = {8, 9}. or
X − Y = {x : x ∈ Z and 3 ≤ x ≤ 4}.
Y − X = {y : y ∈ Z and 8 ≤ y ≤ 9}.
I Complement: The (absolute) complement of a set A,
denoted by Ac or Ā or A0 , is a set of elements are in the
universal set U but not in A. Mathematically,
A0 = {x : x ∈ (U − A), ie x ∈ U but x ∈
/ A}

A0 = U − A

Example: A is the set of vowels in English alphabet. The


complement of A is the set of all consonants in the English
alphabet.
I Symmetric Difference: The Symmetric Difference of two sets
A and B, denoted by A ⊕ B or A 4 B is the set of elements
which belongs to either A or B but not both. Mathematically,
A ⊕ B = (A − B) ∪ (B − A)
= (A ∪ B) − (A ∩ B)

A⊕B = (A∪B)−(A∩B) A⊕B =A∪B A⊕B =A−B

Example: A = {a, b, ..., z, 0, ..., 9} and B = {0, ..., 9, +, −, ∗, /}.


A ⊕ B = {a, b, ..., z, +, −, ∗, /}.
Generalized Union and Intersection

The set operations can be extended to any number of sets. Let A1 ,


A2 , A3 ,...,An be n sets.
I Index Set: I called the index set, be the subscripts i used to
name the sets Ai where I = {1, 2, 3, ..., n}.
I The union of a collection of sets is a set contains elements
that are members of at least one set in the collection.
Mathematically,
A1 ∪ A2 ∪ ... ∪ An = ∪ni=1 Ai = {x : x ∈ Ai for some
1 ≤ i ≤ n}.
I The intersection of a collection of sets is a set that contains
elements that are members of every set in the collection.
Mathematically,
A1 ∩ A2 ∩ ... ∩ An = ∩ni=1 Ai = {x : x ∈ Ai ∀1 ≤ i ≤ n}.
Laws of Sets
Sets are satisfying various laws and properties under the operations
of union, intersection and complement. Let A, B and C be any
three sets and U be Universal set.
I Idempotent law: A ∪ A = A and A ∩ A = A
I Identity law: A ∪ Φ = A and A ∩ U = A
I Inverse law: A ∪ A0 = U and A ∩ A0 = Φ
I Domination law: A ∪ U = U and A ∩ Φ = Φ
I Commutative law: A ∪ B = B ∪ A and A ∩ B = B ∩ A
I Double Complement law: (A0 )0 = A
I Associative law: A ∪ (B ∪ C ) = (A ∪ B) ∪ C and
A ∩ (B ∩ C ) = (A ∩ B) ∩ C
I Distributive law: A ∪ (B ∩ C ) = (A ∪ B) ∩ (A ∪ C ) and
A ∩ (B ∪ C ) = (A ∩ B) ∪ (A ∩ C )
I De Morgan’s law: (A ∪ B)0 = A0 ∩ B 0 and (A ∩ B)0 = A0 ∪ B 0
I Absorption law: A ∪ (A ∩ B) = A and A ∩ (A ∪ B) = A
Some Properties

I If A ⊂ B, then A ∩ B = A
I If A ⊂ B, then A ∪ B = B
I If A ⊂ B, then B 0 ⊂ A0
I A − B = A ∩ B0
I A ⊕ B = (A ∪ B) − (A ∩ B)
Note: The parentheses are essential to indicate the groupings in the
distributive laws.
For example, A ∩ B ∪ C ?
A ∩ (B ∪ C ) = (A ∩ B) ∪ (A ∩ C )
(A ∩ B) ∪ C = (A ∪ C ) ∩ (B ∪ C ).
Proof of Set Laws
Prove the Distributive law A ∪ (B ∩ C ) = (A ∪ B) ∩ (A ∪ C ).
Proof: Let x ∈ A ∪ (B ∩ C )
⇒ x ∈ A or x ∈ (B ∩ C )
⇒ x ∈ A or (x ∈ B and x ∈ C )
⇒ (x ∈ A or x ∈ B) and (x ∈ A or x ∈ C )
⇒ x ∈ (A ∪ B) and x ∈ (A ∪ C )
⇒ x ∈ (A ∪ B) ∩ (A ∪ C )
Thus, A ∪ (B ∩ C ) ⊆ (A ∪ B) ∩ (A ∪ C ) · · · (i)
Similarly, Let y ∈ (A ∪ B) ∩ (A ∪ C )
⇒ y ∈ (A ∪ B) ∩ y ∈ (A ∪ C )
⇒ y ∈ (A ∪ B) and y ∈ (A ∪ C )
⇒ (y ∈ A or y ∈ B) and (y ∈ A or y ∈ C )
⇒ y ∈ A or (y ∈ B and y ∈ C )
⇒ y ∈ A or y ∈ (B ∩ C )
⇒ y ∈ A ∪ (B ∩ C )
Thus, (A ∪ B) ∩ (A ∪ C ) ⊆ A ∪ (B ∩ C ) · · · (ii)
Therefore, From, (i) and (ii)
A ∪ (B ∩ C ) = (A ∪ B) ∩ (A ∪ C ). (Proved)
Example: Prove that (A ∪ B)0 = (A0 ∩ B 0 ).
Proof: Let x ∈ (A ∪ B)0
⇒x ∈ / (A ∪ B)
⇒x ∈ / A and x ∈ / B)
⇒ x ∈ A0 and x ∈ B 0
⇒ x ∈ (A0 ∩ B 0 )
Thus, (A ∪ B)0 ⊆ (A0 ∩ B 0 ) · · · (i)
Similarly, Let y ∈ (A0 ∩ B 0 )
⇒ y ∈ A0 and y ∈ B 0
⇒y ∈ / A and y ∈ / B)
⇒x ∈ / (A ∪ B)
⇒ y ∈ (A ∪ B)0
Thus, (A0 ∩ B 0 ) ⊆ (A ∪ B)0 · · · (ii)
Therefore, From, (i) and (ii)
(A ∪ B)0 = (A0 ∩ B 0 ). (Proved)
Note: x ∈ / A∩B ⇒x ∈ / A or x ∈ / B. When x does not belongs to
A ∩ B, then x can not be a member of both the sets. Thus, x is
either a member of A alone or a member of B alone or x does not a
member to both the sets. In other words, either x ∈ / A and x ∈/ B.
Example: Prove that (A ∪ B)0 = (A0 ∩ B 0 ).
Proof: Let x ∈ (A ∪ B)0
⇒x ∈ / (A ∪ B)
⇒x ∈ / A and x ∈ / B)
⇒ x ∈ A0 and x ∈ B 0
⇒ x ∈ (A0 ∩ B 0 )
Thus, (A ∪ B)0 ⊆ (A0 ∩ B 0 ) · · · (i)
Similarly, Let y ∈ (A0 ∩ B 0 )
⇒ y ∈ A0 and y ∈ B 0
⇒y ∈ / A and y ∈ / B)
⇒x ∈ / (A ∪ B)
⇒ y ∈ (A ∪ B)0
Thus, (A0 ∩ B 0 ) ⊆ (A ∪ B)0 · · · (ii)
Therefore, From, (i) and (ii)
(A ∪ B)0 = (A0 ∩ B 0 ). (Proved)
Note: x ∈ / A∩B ⇒x ∈ / A or x ∈ / B. When x does not belongs to
A ∩ B, then x can not be a member of both the sets. Thus, x is
either a member of A alone or a member of B alone or x does not a
member to both the sets. In other words, either x ∈ / A and x ∈/ B.
Example: Prove that (X − Y ) − Z = X − (Y ∪ Z ) using set laws.
Proof:LHS = (X − Y ) − Z
= (X − Y ) ∩ Z 0 (by A − B = A ∩ B 0 )
= (X ∩ Y 0 ) ∩ Z 0 (by A − B = A ∩ B 0 )
= X ∩ (Y 0 ∩ Z 0 ) (by Associative law)
= X ∩ (Y ∪ Z )0 (by De Morgan’s law)
= X − (Y ∪ Z ) (by A − B = A ∩ B 0 )
= RHS (Proved)
Example:Let A, B and C denote subsets of a set S. C 0 is the
complement of C in S. If A ∩ C = B ∩ C and A ∩ C 0 = B ∩ C 0 .
Prove that A = B.
Proof: A = A ∩ S
= A ∩ (C ∪ C 0 ) (by ?)
= (A ∩ C ) ∪ (A ∩ C 0 ) (by Distributive law)
= (B ∩ C ) ∪ (B ∩ C 0 ) (by given conditions)
= B ∩ (C ∪ C 0 ) (by ?)
= B ∩ S (by set definition)
= B (Proved)
Example:Let A and B two sets. Prove that A ⊆ B if and only if
(iff) A ∪ B = B.
Proof: Let A ⊆ B (we want to proved A ∪ B = B)
Let x ∈ A ∪ B
⇒ x ∈ A or x ∈ B
⇒ x ∈ B (since A ⊆ B)
Thus, (A ∪ B) ⊆ B · · · (i)
Similarly, Let y ∈ B
⇒ y ∈ A or y ∈ B (since A ⊆ B)
⇒y ∈A∪B
Thus, B ⊆ A ∪ B · · · (ii)
Therefore, From, (i) and (ii)
A ∪ B = B. (Proved)
Conversely, Let A ∪ B = B (we want to proved A ⊆ B)
Let x ∈ A
⇒ x ∈ A or x ∈ B
⇒x ∈A∪B
⇒ x ∈ B (since A ∪ B = B)
Therefore, A ⊆ B. (Proved)
Example: Let A, B, C be sets such that A ∩ B = A ∩ C and
A ∪ B = A ∪ C . Prove that B = C .
Proof: Left for your exercise

Example:Show that X ∩ (Y − Z ) ⊂ X − (Y ∩ Z ).
Proof: Left for your exercise

Example: Prove that (A − B) ∪ (B − A) = (A ∪ B) − (A ∩ B)


using elementary method.
Proof: Let x ∈ (A − B) ∪ (B − A)
⇒ x ∈ (A − B) or x ∈ (B − A)

. . . complete the proof

Example: Prove that (A − B) ∪ (B − A) = (A ∪ B) − (A ∩ B)


using set laws.
Proof: LHS=(A − B) ∪ (B − A)
=(A ∩ B 0 ) ∪ (B ∩ A0 )
= . . . = RHS. (proved)
Finite and Infinite Sets
I One-to-one correspondence: If it is possible to pair off the
elements in sets A and B such that every element in A is
paired off with a distinct element in B.
Example: • Suppose, A = {a, b} and B = {c, d}. The
one-to-one correspondence between the elements in A and B
are (a, c), (b, d) or (a, d), (b, c)
• {a, b, c} and {a, φ, d} → correspondence.
• {a, b, c} and {a, d} → no correspondence.
I Finite Set: If there is one-to-one correspondence between the
elements in the set and the elements in some set n, where
n ∈ N and n is the cardinality of the set.
I Infinite set: A set which is not finite known as infinite set.
I Countable infinite: If there is one-to-one correspondence
between the elements in the set and the elements in N.
I Uncountable infinite set: A set which is not countably
infinite is called uncountable infinite or non-denumerable set.
Example: The set R+ of all the real numbers less than 1 that can
be represented by the decimal of the form 0.a1 a2 ...., where ai is an
integer such that 0 ≤ ai ≤ 9.

Example: Investigate on finite, infinite, countable infinite or


uncountable set w.r.t the set N of the following sets.
a) The set of even integers.
b) The set of negative integers.
c) The set of integers that of multiplies of 5.
d) The set of real numbers between 0 and 0.6.
e) The set of all trees on Earth.

Example: State the size of the following sets.


a) Set of all prime numbers.
b) Set of real numbers between 0 and 1.
c) Number of fish in Indian Ocean.
Example: Show that the intersection of countable infinite sets may
be finite with an example.
Solution: Suppose A is a set of all integers less than or equal to 2.
A = {2, 1, 0, −1, −2, ...}
N = {Set of Natural numbers}
N = {1, 2, 3, ...}
Thus, A ∩ N = {1, 2} is finite.
Example: Show that the intersection of countable infinite sets may
be finite with an example.
Solution: Suppose A is a set of all integers less than or equal to 2.
A = {2, 1, 0, −1, −2, ...}
N = {Set of Natural numbers}
N = {1, 2, 3, ...}
Thus, A ∩ N = {1, 2} is finite.
I Ordered Set: A set of ordered collection of distinct elements
so that one can recognize first element, second element and
successively the last element.
• An ordered set with n elements or n-tuples denoted by
(a1 , a2 , ..., an ).
• Two n-tuples are equal if and only if their corresponding elements
are equal. i.e (a1 , a2 , ..., an ) = (b1 , b2 , ..., bn ) iff a1 = b1 ,
a2 = b2 ,..., an = bn .

Example: The ordered set of the days in a week is (Sun,


Mon,...,Sat).
I Cartesian Product: The Cartesian product of two sets A and
B, denoted by A × B is the set of all ordered pairs (a, b) with
a ∈ A and b ∈ B. Mathematically,
A × B = {(a, b) : a ∈ A and b ∈ B}.
• If A and B are finite sets, then n(A × B) = n(A).n(B)
• If either A or B is an infinite, then (A × B) is an infinite set.
• The Cartesian product of A × A is denoted by A2 .
More generally,
An = A × A × A · · · × A (n times).
= {(a1 , a2 , ..., an )|ai ∈ A, i = 1, 2, ..., n}.
It can be extended to n sets A1 , A2 , ..., An such as
A1 × A2 × · · · × An = {(a1 , a2 , ..., an )|ai ∈ Ai }.
• If A and B are finite sets, then A × B 6= B × A.

Example: Let A = {a, b} and B = {x, y }, then


A × B = {(a, x), (a, y ), (b, x), (b, y )}
B × A = {(x, a), (x, b), (y , a), (y , b)}.

Example: Linda would like to make a trip from Kolkata to Delhi


and then to Kashmir. She can travel by car, plane or rail from
Kolkata to Delhi and by plane or rail from Delhi to Kashmir. Find
the set of various modes of transportation from the trip.
Properties of Cartesian Product
I For any three sets A, B and C , then
1. A × (B ∪ C ) = (A × B) ∪ (A × C )
2. A × (B ∩ C ) = (A × B) ∩ (A × C )
Proof (1): Let a and b be arbitrary elements of A × (B ∪ C ). Then
(a, b) ∈ A × (B ∪ C )
⇒ a ∈ A and b ∈ (B ∪ C )
⇒ a ∈ A and (b ∈ B or b ∈ C )
⇒ (a ∈ A and b ∈ B) or (a ∈ A and b ∈ C )
⇒ (a, b) ∈ (A × B) or (a, b) ∈ (A × C )
⇒ (a, b) ∈ (A × B) ∪ (A × C )
Thus, A × (B ∪ C ) ⊆ (A × B) ∪ (A × C ) . . . (i)
Similarly, (c, d) ∈ (A × B) ∪ (A × C )
⇒ (c, d) ∈ (A × B) or (c, d) ∈ (A × C )
⇒ (c ∈ A and d ∈ B) or (c ∈ A and d ∈ C )
⇒ c ∈ A and (d ∈ B or d ∈ C )
⇒ c ∈ A and d ∈ (B ∪ C )
⇒ (c, d) ∈ A × (B ∪ C )
Thus, (A × B) ∪ (A × C ) ⊆ A × (B ∪ C ) . . . (ii)
I For any three sets A, B and C , then
A × (B − C ) = (A × B) − (A × C )
Proof: Left for the exercise
I For any sets A, B, C , and D, then
(A × B) ∩ (C × D) = (A ∩ C ) × (B ∩ D)
Proof: Let (a, b) ∈ (A × B) ∩ (C × D)
⇒ (a, b) ∈ (A × B) and (a, b) ∈ (C × D)
⇒ (a ∈ A and b ∈ B) and (a ∈ C and b ∈ D)
⇒ (a ∈ A and a ∈ C ) and (b ∈ B and b ∈ D)
⇒ a ∈ (A ∩ C ) and b ∈ (B ∩ D)
⇒ (a, b) ∈ (A ∩ C ) × (B ∩ D)
Thus, (A × B) ∩ (C × D) ⊆ (A ∩ C ) × (B ∩ D) . . . (i)

Similarly, (c, d) ∈ (A ∩ C ) × (B ∩ D)
Example: For any non empty sets A and B, prove that
A×B =B ×A⇔A=B
Solution: Assume A = B, then
A×B =A×A
= B × A (Proved)
Conversely, Assume A × B = B × A
let x ∈ A
⇒ (x, b) ∈ A × B for b ∈ B
⇒ (x, b) ∈ B × A Since A × B = B × A
⇒x ∈B
Thus, A ⊆ B.
Similarly, Let y ∈ B
⇒ (y , a) ∈ B × A for a ∈ A
⇒ (y , a) ∈ A × B Since A × B = B × A
⇒y ∈A
Thus, B ⊆ A. (Proved)
Therefore, A = B.
Multiset

I Multiset: An unordered collection of elements in which an


element can occur as a member more than once.

• It is represent as {n1 x1 , n2 x2 , ...., nk xk }, where x1 , x2 , ..., xk


appear n1 , n2 , ..., nk times. The number ni (1 ≤ i ≤ k) is called
the multiplicity of the element xi .

• A set is a special case of multiset in which multiplicity of


each element is either 0 or 1.
Example: A set of marks obtained by ten students as
R = {60, 70, 80, 85, 90, 85, 70, 85, 75, 80}.
In the form of multiset, R = {60, 2.70, 75, 2.80, 3.85, 90}
Multiset

I Multiset: An unordered collection of elements in which an


element can occur as a member more than once.

• It is represent as {n1 x1 , n2 x2 , ...., nk xk }, where x1 , x2 , ..., xk


appear n1 , n2 , ..., nk times. The number ni (1 ≤ i ≤ k) is called
the multiplicity of the element xi .

• A set is a special case of multiset in which multiplicity of


each element is either 0 or 1.
Example: A set of marks obtained by ten students as
R = {60, 70, 80, 85, 90, 85, 70, 85, 75, 80}.
In the form of multiset, R = {60, 2.70, 75, 2.80, 3.85, 90}
Operations on Multiset:

Let A be a multiset. The multiplicity of an element x ∈ A is


denoted by mA (x).
I Union: The multiplicity of an element is the maximum of its
multiplicities in the two sets. Mathematically,
A ∪ B = {x|x ∈ A or x ∈ B, mA∪B (x) = Max(mA (x), mB (x))}
Example: A = {a, a, b, b, c} and B = {a, a, b, d}
A = {2a, 2b, c} and B = {2a, b, d}, then
A ∪ B = {2a, 2b, c, d}.
I Intersection:The multiplicity of an element is the minimum of
its multiplicities in the two sets. Mathematically,
A ∩ B = {x|x ∈ A and x ∈ B, mA∩B (x) = Min(mA (x), mB (x))}
Example: A = {a, a, b, b, c} and B = {a, a, b, d}
A = {2a, 2b, c} and B = {2a, b, d}, Then
A ∩ B = {2a, b}.
I Sum of Multisets: The multiplicity of an element is the sum
of its multiplicities in the sets. Mathematically,
A + B = {x|x ∈ A or x ∈ B, mA∪B (x) = (mA (x) + mB (x))}
Example: A = {a, a, b, c, c} and B = {a, b, b, d}
A = {2a, b, 2c} and B = {a, 2b, d}, then
A + B = {3a, 3b, 2c, d}.
I Difference of Multisets: The multiplicity of an element
equals to the multiplicity of element in a set minus the
multiplicity of element in other set, if the difference is positive
and is equal to zero if the difference is zero and negative.
Mathematically,
A − B = {x|x ∈ A, mA−B (x)}, where

 mA (x) − mB (x) if x ∈ B and mA (x) − mB (x) > 0
mA−B (x) = 0 if x ∈ B and mA (x) − mB (x) < 0
mA (x) if x ∈
/B

Example: A = {a, a, b, c, c, d} and B = {a, b, b, d}


A = {2a, b, 2c, d} and B = {a, 2b, d}, Then
A − B = {a, 2c}.
Example: Let A and B two multisets defined by A = {2a, 3b, c}
and B = {a, 4b, d}. Then find A ∪ B, A ∩ B, A + B, A − B and
B − A.
Principle of Inclusion and Exclusion

I Partition: A set A is defined to be set of non-empty subsets


Ai , each of which is pairwise disjoint
Qand whose union yields
the original set A. It is denoted as (A).

Properties:
i) Each set Ai is non-empty
ii) The subsets are pairwise disjoint, i.e
Ai ∩ Aj = Φ, i 6= j
iii) The union of Ai is A i.e ∪i=1 Ai = A
I Covering: A set A is defined to be set of non-empty subsets
Ai , in which union yields the original set A. The non-empty
subsets need not be disjoint.
Properties:
i) Each subset is non-empty.
ii) The subsets are not necessarily disjoint i.e Ai ∩ Aj 6= Φ
iii) The union of subsets Ai is A i.e ∪i=1 Ai = A
I Rule of Addition:
Given a partition on A, where Ai , i = 1, 2, ..., n are non-empty
subsets, then
n
|A| = | ∪ni=1 Ai | =
P
|Ai |
i=1
I Rule of Inclusion and Exclusion:
Given a set A be a covering on sets A1 , A2 , ..., An , then
If n = 2, i.e A has two subsets A1 , A2
|A| = |A1 ∪ A2 | = |A1 | + |A2 | − |A1 ∩ A2 |
If n = 3, then
|A| = |A1 ∪ A2 ∪ A3 |
= |A1 | + |A2 | + |A3 | − |A1 ∩ A2 | − |A2 ∩ A3 | − |A3 ∩ A1 |
+|A1 ∩ A2 ∩ A3 |
In general,
|A| = | ∪ni=1 Ai |
n
P n P
P n n P
P n P
n
= |Ai | − |Ai ∩ Aj | + |Ai ∩ Aj ∩ Ak |
i=1 i=1 j=1i6=j i=1 j=1 k=1i6=j6=k
. . . (−1)n+1 | ∩ni=1 Ai |
Some Results on Cardinality of Sets:
Some simple results related to the size of finite sets are:
1. |A ∪ B| = |A| + |B| − |A ∩ B|
2. |A ∪ B| = |A| + |B| if A ∩ B = Φ
3. |A ∪ B| ≤ |A| + |B|
4. |A ∩ B| ≤ min(|A|, |B|)
5. |A ⊕ B| = |A| + |B| − 2|A ∩ B|
6. |A − B| ≥ |A| − |B|
Proof 1:
Let n(A ∩ B) = k, Since A ∩ B ⊆ A and A ∩ B ⊆ B
We can assume that,
n(A) = a + k and n(B) = b + k for some +ve integers a and b.
Now, n(A ∪ B) = a + k + b
= (a + k) + (b + k) − k
= n(A) + n(B) − n(A ∩ B)
Some Results on Cardinality of Sets:
Some simple results related to the size of finite sets are:
1. |A ∪ B| = |A| + |B| − |A ∩ B|
2. |A ∪ B| = |A| + |B| if A ∩ B = Φ
3. |A ∪ B| ≤ |A| + |B|
4. |A ∩ B| ≤ min(|A|, |B|)
5. |A ⊕ B| = |A| + |B| − 2|A ∩ B|
6. |A − B| ≥ |A| − |B|
Proof 1:
Let n(A ∩ B) = k, Since A ∩ B ⊆ A and A ∩ B ⊆ B
We can assume that,
n(A) = a + k and n(B) = b + k for some +ve integers a and b.
Now, n(A ∪ B) = a + k + b
= (a + k) + (b + k) − k
= n(A) + n(B) − n(A ∩ B)
Example: Find the number of positive integers ≤ 200 and divisible
by 2 and 5.
Solution: Let A = {x : x ∈ N and x ≤ 200 and divisible by 2}
B = {x : x ∈ N and x ≤ 200 and divisible by 5}
Thus, A = {2, 4, 6, ..., 200} and B = {5, 10, 15, ...200}
and A ∩ B = {10, 20, ..., 200}
Now, n(A) = 100, n(B) = 40 and n(A ∩ B) = 20
By Inclusion and Exclusion principle,
n(A ∪ B) = n(A) + n(B) − n(A ∩ B)
= 100 + 40 − 20 = 120

Example: In a group of 100 persons, 70 can speak in English and


45 can speak in Hindi. Find the number of persons
i) Who can speak in English only
ii) Who can speak in Hindi only, and
iii) Who can speak in both English and Hindi.
Example: Find the number of positive integers ≤ 200 and divisible
by 2 and 5.
Solution: Let A = {x : x ∈ N and x ≤ 200 and divisible by 2}
B = {x : x ∈ N and x ≤ 200 and divisible by 5}
Thus, A = {2, 4, 6, ..., 200} and B = {5, 10, 15, ...200}
and A ∩ B = {10, 20, ..., 200}
Now, n(A) = 100, n(B) = 40 and n(A ∩ B) = 20
By Inclusion and Exclusion principle,
n(A ∪ B) = n(A) + n(B) − n(A ∩ B)
= 100 + 40 − 20 = 120

Example: In a group of 100 persons, 70 can speak in English and


45 can speak in Hindi. Find the number of persons
i) Who can speak in English only
ii) Who can speak in Hindi only, and
iii) Who can speak in both English and Hindi.
Example: Find the number of positive integers ≤ 200 and divisible
by 2 and 5.
Solution: Let A = {x : x ∈ N and x ≤ 200 and divisible by 2}
B = {x : x ∈ N and x ≤ 200 and divisible by 5}
Thus, A = {2, 4, 6, ..., 200} and B = {5, 10, 15, ...200}
and A ∩ B = {10, 20, ..., 200}
Now, n(A) = 100, n(B) = 40 and n(A ∩ B) = 20
By Inclusion and Exclusion principle,
n(A ∪ B) = n(A) + n(B) − n(A ∩ B)
= 100 + 40 − 20 = 120

Example: In a group of 100 persons, 70 can speak in English and


45 can speak in Hindi. Find the number of persons
i) Who can speak in English only
ii) Who can speak in Hindi only, and
iii) Who can speak in both English and Hindi.

You might also like