Notes-UNIT I - Set Theory and Relations
Notes-UNIT I - Set Theory and Relations
Set:
Note:
i) Roster method: Here all the elements of the set are listed, if possible,
Eg: V a, e, i, o, u
A 1,3,5,7,..........
X = 1,2, a, b,3
Y= 0,1,2,3,....
ii) Set builder method: Here we define the elements of the set by
C x : x is a vowel in the English alphabet ={a,e,I,o,u}
D= x : x is an even number between 20 and 30
The set which contains all the objects under consideration is called the
Universal set and is denoted by U .
Eg: 1. If A = 1,2,3 and B = x : x N, 1 x 10, then A B .
2. If A = {a, e, i, o, u} and 𝐵 = {𝑥: 𝑥 𝑖𝑠 𝑎 𝑠𝑒𝑡 𝑜𝑓 𝑎𝑙𝑝ℎ𝑎𝑏𝑒𝑡𝑠}
A set having no elements is called a null set or empty set. A null set is
denoted by φ or .
Eg: A = x : x N, 8 x 10 and x is prime
A Null Set is a subset of every set.
Eg: N, R, Z etc.
Operations on sets:
Union: The union of two sets A and B is the set of elements that belong
to A or B or both.
i.e., A B x A or x B
Eg: A = {1,2,3}, B = {2,3,4}, C = {3,4,5} then 𝐴 ∪ 𝐵 = {1,2,3,4}, 𝐵 ∪ 𝐶 =
{2,3,4,5} 𝑎𝑛𝑑 𝐴 ∪ 𝐶 = {1,2,3,4,5}
i.e., A B x : x A and x B
Eg: A = {1,2,3}, B = {2,3,4}, C = {3,4,5} then 𝐴 ∩ 𝐵 = { 2,3}, 𝐵 ∩ 𝐶 =
{3,4}𝑎𝑛𝑑 𝐴 ∩ 𝐶 = {3}
Disjoint sets: Two sets A and B are disjoint if they do not have any
element in common.
Complement of a set
The set of elements in the universal set U , that are not in A , is called the
c
complement of A , denoted by A or A or A .
A
c
x U: x A
Eg: If U universal sets= {1,2,3,4,5} and A = {1,3,5} then complement of
A is A {2 , 4} .
i.e., A B x : x A and x B = A B
c
B A x : x B and x A = B A c
A – B = {2} and
B – A = {5,7}.
A -B ≠ B- A always
Symmetric difference
If A and B are any two sets, the set of elements that belong to A or B, but
not to both is called the symmetric difference of A and B and is denoted
by A B or A Δ B .
A ΔB A B A B B A = A B A B
Eg: If A = {a,b,c,d} and B = {c,d,e,f} then
A-B={a,b}, B-A={e,f}
A B =(A-B)U(B-A)= {a,b,e,f}.
Power Set
The power set of a set A (denoted P(A) ) denotes the set of all subsets of
A . For example, the power set of the set A ={1, 2, 3} has eight
elements and is given by:
A={1,2,3,4}
Proof:
We know that 𝑥 = 𝑦 𝑖𝑓𝑓 𝑥 ⊆ 𝑦 and 𝑦 ⊆ 𝑥.
Let 𝑥 ∈ 𝐴 ∩ 𝐵
⇔ 𝑥 ∈ 𝐴 𝑎𝑛𝑑 𝑥 ∈ 𝐵
⇔ 𝑥 ∈ 𝐵 𝑎𝑛𝑑 𝑥 ∈ 𝐴
⇔𝑥 ∈𝐵∩𝐴
∴𝐴∩𝐵 =𝐵∩𝐴
Similarly
Let 𝑦 ∈ 𝐴 ∪ 𝐵
⇔ 𝑦 ∈ 𝐴 𝑜𝑟 𝑦 ∈ 𝐵
⇔ 𝑦 ∈ 𝐵 𝑜𝑟 𝑦 ∈ 𝐴
⇔𝑦 ∈𝐵∪𝐴
∴𝐴∪𝐵 =𝐵∪𝐴
2. Prove the associative laws: 𝐴 ∪ (𝐵 ∪ 𝐶) = (𝐴 ∪ 𝐵) ∪ 𝐶 and
𝐴 ∩ (𝐵 ∩ 𝐶) = (𝐴 ∩ 𝐵) ∩ 𝐶
Proof:
LHS RHS and RHS LHS
𝐴 ∪ (𝐵 ∪ 𝐶) (𝐴 ∪ 𝐵) ∪ 𝐶
Select one element in LHS and try to prove the same element is in
RHS, then LHS RHS
Let 𝑥 ∈ 𝐴 ∪ (𝐵 ∪ 𝐶)
⇔ 𝑥 ∈ 𝐴 𝑜𝑟 [𝑥 ∈ (𝐵 ∪ 𝐶)]
⇔ 𝑥 ∈ 𝐴 𝑜𝑟 [𝑥 ∈ 𝐵 𝑜𝑟 𝑥 ∈ 𝐶]
⇔ [𝑥 ∈ 𝐴 𝑜𝑟 𝑥 ∈ 𝐵]𝑜𝑟 𝑥 ∈ 𝐶
⇔ 𝑥 ∈ [𝐴 ∪ 𝐵] 𝑜𝑟 𝑥 ∈ 𝐶
⇔ 𝑥 ∈ [𝐴 ∪ 𝐵] ∪ 𝐶
∴ 𝐴 ∪ (𝐵 ∪ 𝐶) = (𝐴 ∪ 𝐵) ∪ 𝐶
Similarly
Let 𝑦 ∈ 𝐴 ∩ (𝐵 ∩ 𝐶)
⇔ 𝑦 ∈ 𝐴 𝑎𝑛𝑑 𝑦 ∈ 𝐵 ∩ 𝐶
⇔ 𝑦 ∈ 𝐴 𝑎𝑛𝑑 [𝑦 ∈ 𝐵 𝑎𝑛𝑑 𝑦 ∈ 𝐶]
⇔ [𝑦 ∈ 𝐴 𝑎𝑛𝑑 𝑦 ∈ 𝐵] 𝑎𝑛𝑑 𝑦 ∈ 𝐶
⇔ 𝑦 ∈ (𝐴 ∩ 𝐵)𝑎𝑛𝑑 𝑦 ∈ 𝐶
⇔ 𝑦 ∈ (𝐴 ∩ 𝐵) ∩ 𝐶
𝐴 ∩ (𝐵 ∩ 𝐶) = (𝐴 ∩ 𝐵) ∩ 𝐶
𝟏. (𝑨 ∩ 𝑩)′ = 𝑨′ ∪ 𝑩′
RHS
LHS
𝑯𝒆𝒏𝒄𝒆 (𝑨 ∩ 𝑩)′ = 𝑨′ ∪ 𝑩′
2. (𝑨 ∪ 𝑩)′ = 𝑨′ ∩ 𝑩′
AUB (AUB)'
𝑨′ ∩ 𝑩′
Draw Venn diagrams for:
(1) A - B – C is A only
Soln:
(2) (A B) C
Soln:
(3) (A B) C
Soln:
Simple Problems :
1. Show that (A − B) − C = A − (B ∪C)
Soln.
(A − B) − C = (A ∩B’) ∩C’
(by Difference of sets: A-B = A ∩B’)
= A ∩(B’∩C’)( by associative law)
= A ∩(B ∪C)’ ( by De Morgan’s law)
= A − (B ∪C).
C are sets.
Soln.
(𝐴 − 𝐶) ∩ (𝐶 − 𝐵) = {𝑥⁄𝑥 ∈ 𝐴𝑎𝑛𝑑 𝑥𝐶 𝑎𝑛𝑑 𝑥𝐶 𝑎𝑛𝑑 𝑥𝐵}
= 𝑥⁄𝑥 ∈ 𝐴 𝑎𝑛𝑑 (𝑥 ∈ 𝐶 𝑎𝑛𝑑 𝑥 ∈ ̅̅̅
𝐶) 𝑎𝑛𝑑 𝑥 ∈ 𝐵̅
̅̅̅
= {𝑥⁄𝑥 ∈ 𝐴 ∩ ∅ 𝑎𝑛𝑑 𝑥 ∈ 𝐵}
̅̅̅
= {𝑥⁄𝑥 ∈ ∅ 𝑎𝑛𝑑 𝑥 ∈ 𝐵}
= {𝑥⁄𝑥 ∈ ∅}
=∅
Venn diagram that (𝐴 − 𝐶) ∩ (𝐶 − 𝐵) = ∅
𝐴 − (𝐵 ∩ 𝐶) = (𝐴 − 𝐵) ∪ (𝐴 − 𝐶).
Soln.
𝐴 − (𝐵 ∩ 𝐶) = {𝑥⁄𝑥 ∈ 𝐴 𝑎𝑛𝑑 𝑥(𝐵 ∩ 𝐶)}
= {𝑥⁄𝑥 ∈ (𝐴 − 𝐵) ∪ (𝐴 − 𝐶)}
= (𝐴 − 𝐵) ∪ (𝐴 − 𝐶)
Venn diagram
LHS:
RHS:
7. If A, B and C are sets, prove both analytically and graphically that
𝐴 ∩ (𝐵 − 𝐶) = (𝐴 ∩ 𝐵) − (𝐴 ∩ 𝐶).
Soln.
𝑨 ∩ (𝐵 − 𝐶) = {𝑥 ⁄ 𝑥 ∈ 𝐴 𝑎𝑛𝑑 𝑥 ∈ (𝐵 − 𝐶)}
= {𝑥⁄𝑥 ∈ (𝐴 ∩ 𝐵 ∩ 𝐶̅ )}
= 𝐴 ∩ 𝐵 ∩ 𝐶̅
= {𝑥⁄𝑥 ∈ (𝐴 ∩ 𝐵)𝑎𝑛𝑑 (𝑥 ∈ 𝐴̅ 𝑜𝑟 𝑥 ∈ 𝐶̅ )}
= {𝑥⁄𝑥 ∈ (𝐴 ∩ 𝐴̅ ∩ 𝐵) 𝑜𝑟 𝑥 ∈ (𝐴 ∩ 𝐵 ∩ 𝐶̅ )}
Since 𝐴 ∩ 𝐴̅ = ∅
Also ∅∩𝐵 =∅
={𝑥⁄ 𝑥 ∈ (𝐴 ∩ 𝐵 ∩ 𝐶̅ )}
Venn diagram
LHS:
RHS:
identities.
Soln.
̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅
𝐴 ∪ (𝐵 ∩ 𝐶) = 𝐴̅ ∩ (𝐵 ∩ 𝐶 ), by De Morgan’s law
̅̅̅̅̅̅̅
Soln.
𝐴̅ ∪ 𝐵̅ ∪ (𝐴 ∩ 𝐵 ∩ 𝐶̅ ) = (𝐴 ∩ 𝐵 ) ∪ [(𝐴 ∩ 𝐵) ∩ 𝐶̅ ] by De Morgan’s law.
̅̅̅̅̅̅̅
̅̅̅̅̅̅̅̅̅̅
= [(𝐴 𝐴 ∩ 𝐵 ∪ 𝐶̅ ] by distributive law
∩ 𝐵) ∪ (𝐴 ∩ 𝐵)] ∩ [ ̅̅̅̅̅̅̅
𝐴 ∩ 𝐵 ∪ 𝐶̅ by inverse law
= 𝑈 ∩ ̅̅̅̅̅̅̅
𝐴 ∩ 𝐵 ∪ 𝐶̅ by identity law
= ̅̅̅̅̅̅̅
= 𝐴̅ ∪ 𝐵̅ ∪ 𝐶̅ by De Morgan’s law
Soln.
̅ ))]
(𝐴 ∩ 𝐵) ∪ [𝐵 ∩ ((𝐶 ∩ 𝐷) ∪ (𝐶 ∩ 𝐷
= (𝐴 ∩ 𝐵) ∪ [𝐵 ∩ 𝐶] , by identity law
= (𝐵 ∩ 𝐴) ∪ (𝐵 ∩ 𝐶) , by commutative law
= 𝐵 ∩ (𝐴 ∪ 𝐶) , by distributive law
Soln.
The dual of the statement 𝐴 = (𝐵̅ ∩ 𝐴) ∪ (𝐴 ∩ 𝐵) is
𝐴 = (𝐵̅ ∪ 𝐴) ∩ (𝐴 ∪ 𝐵)
Given two sets A, B, their Cartesian product or cross product A×B is the
set of all ordered pairs (a,b) such that a ∈ A and b ∈ B:
A
1
A
2
......A
n
1 2 n i
a a ......a : a A , i 1,2,......n
i
A={1,2,3}, B={a,b}
A B ={(1,a),(1,b),(2,a),(2,b),(3,a),(3,b)}
BXA={(a,1),(a,2),(a,3),(b,1),(b,2),(b,3)}
Note:
2. If either A or B is φ , then A B φ
If A, B, C are sets, then
(i) A (B C) (A B) (A C)
Proof:
(x, y) A (B C) x A and y B C
x A and (y B and y C)
(x, y) (A B) (A C)
(ii) A (B C) (A B) (A C)
Proof:
(x, y) A (B C) x A and y B C
x A and (y B or y C)
(x A and y B) or (x A and y C)
(x, y) A B or (x, y) A C
(x, y) (A B) (A C)
(iii) (A B) C (A C) (B C)
Proof:
(x, y) (A B) C x A B and y C
(x A and x B) and y C)
(x A and y C) or (x B and y C)
(x, y) A C or (x, y) B C
(x, y) (A C) (B C)
Cartesian Products:
1. If A = {α, β} and B = {1, 2, 3} what are A × B, B × A, A × A, B × B
and(A × B) ∩(B × A)?
Soln.
(i) A × B = {(α, 1), (α, 2), (α, 3), (β, 1), (β, 2), (β, 3)}
(ii) B × A = {(1, α), (1, β), (2, α), (2, β), (3, α), (3, β)}
(iii) A × A = {(α, α), (α, β), (β,α), (β, β)}
(iv) B × B ={(1, 1), (1, 2), (1, 3), (2, 1), (2, 2), (2, 3),(3, 1), (3, 2),
(3,3)}
(v) (A × B) ∩(B × A) = φ
(iii) B ∪C = {3, 4, 5, 6}
A × (B ∪C) = {(1, 3), (1, 4), (1, 5), (1, 6), (2, 3), (2, 4), (2, 5),
(2, 6),(3, 3), (3, 4), (3, 5), (3, 6)}
(iv)(A × B) ∪(A × C) = {(1, 3), (1, 4), (1, 5), (1, 6), (2, 3), (2, 4),
(2, 5),(2, 6), (3, 3), (3, 4), (3, 5), 3, 6)}
that (𝐴 ∩ 𝐵) × (𝐶 ∩ 𝐷) = (𝐴 × 𝐶) ∩ (𝐵 × 𝐷).
Soln.
A ∩ B = {2,3}
C ∩ D = {6,7}
∴ (A ∩ B) × (C ∩ D) = {(2,6), (2,7), (3,6), (3,7)} __________ (1)
Now
A × C = {(1,5), (1,6), (1,7), (2,5), (2,6), (2,7), (3,5), (3,6), (3,7)}
B × D = {(2,6), (2,7), (2,8), (3,6), (3,7), (3,8), (4,6), (4,7), (4,8)}
∴ (A × C) ∩ (B × D) = {(2,6), (2,7), (3,6), (3,7)} __________ (2)
Hence (A ∩ B) × (C ∩ D) = (A × C) ∩ (B × D) proved.
Applications
n A B C n A n B n C n A B n B C n A C n A B C
Hint:
Some Problems:
=30+40-20
=50
Soln.
𝑛(𝐽 ∩ 𝑂) = 25 + 28 − 33 = 20.
Thus the number of programmers who knew both languages = 20.
2. Among 50 students in a class, 26 passed in first semester and 21
passed in second semester examinations. If 17 did not pass in either
semester, how many passed in both the semesters?
Soln. n(S)=50
Given 𝑛(𝐴) = 26, 𝑛(𝐵) = 21.
Given that 17 have not passed in either semester. (none)
None = U- 𝑛(𝐴 ∪ 𝐵)
∴ 𝑛(𝐴 ∪ 𝐵) = 𝑢𝑛𝑖𝑣𝑒𝑟𝑠𝑎𝑙 𝑠𝑒𝑡 − 𝑁𝑜𝑛𝑒 = 50 − 17 = 33.
i.e. 33 students have passed in at least first or the second semester or
both.
Thus by principle of inclusion and Exclusion,
𝑛(𝐴 ∪ 𝐵) = 𝑛(𝐴) + 𝑛(𝐵) − 𝑛(𝐴 ∩ 𝐵)
⇒ 𝑛(𝐴 ∩ 𝐵) = 𝑛(𝐴) + 𝑛(𝐵) − 𝑛(𝐴 ∪ 𝐵)
⇒ 𝑛(𝐴 ∩ 𝐵) = 26 + 21 − 33
⇒ 𝑛(𝐴 ∩ 𝐵) = 14 . i.e., the number of students passed in both the
semesters = 14.
Solution:
None = U- 𝑛(𝐹 ∪ 𝐵 ∪ 𝐻)
n(F B H) universal none 500 50 450
n F BH n F n B n H n F B
n(F B H) = 20
500
50-20 115-30-20-25
195-30-20-
50=95
70-20 45-20
4. In a survey of college students, it was found that 40% use their own
books, 50%use library books, 20% use borrowed books, 20% use both
their own books and library books, 15% use their own books and
borrowed books, 10% use library books and borrowed books and 4% use
their own books, library books and borrowed books. Calculate the
percentage of students who do not use a book at all. - (None)
40
50
50-16-4-6
Solution:
n(O) = 40, n(L) = 50, n(B) = 30, n(O ∩L) = 20, n(O ∩B) = 15,
30
n(L ∩B) = 10, n(O ∩L ∩B) = 4.
n(O ∪L ∪B) = n(O) + n(L) + n(B) − n(O ∩L) − n(O ∩B) − n(L ∩B)
+ n(O ∩L ∩B)
= 40+50+30 − 20 − 15 − 10 + 4 = 79
∴The percentage of students who do not use a book at all is:
None = n(O '∪L '∪B') = 100 − n(O ∪L ∪B)
= 100 − 79 = 21.
Solution:
n(M) = 40, n(P) = 64, n(C) = 35, n(A ∩B ∩C) = 1, n(M ∩P) = 25,
n(M ∩C) = 3, n(P ∩C) = 20.
The no. of students studying only mathematics and Chemistry:
= n(M ∩C) − n(M ∩P ∩C)
= 3− 1 = 2.
No. of students studying only mathematics and physics:
= n(M ∩P) − n(M ∩P ∩C)
= 25 − 1 = 24
No. of students studying only physics and chemistry:
= n(P ∩C) − n(M ∩P ∩C) = 20 − 1 = 19
No. of students studying only mathematics:
= n(M) − 24 − 1 − 2 = 13
No. of students studying only physics:
= n(P) − 24 − 19 − 1 = 20
No. of students studying only chemistry:
= n(C) − 2 − 19 − 1 = 13
∴Total no. of students studying either Physics or Chemistry or
Mathematics:
n(M ∪P ∪C) = n(M) + n(P) + n(C) − n(M ∩P) − n(P ∩C)− n(M ∩C) + n(M
∩P ∩C)
= 40+64+35 − 25 − 3 − 20 + 1 = 92
∴None of the students who studied any of the three
= n(M ∩P ∩C)_ = 100 − 92 = 8
6. The survey was conducted among 1000 students. 595 like Discrete
Mathematics, 565 like Probability & Statistics, 550 like Digital signal
processing, 395 like Discrete Mathematics and Probability & Statistics,
350 like Probability & Statistics and Digital signal processing, 400 like
Digital signal processing and Discrete Mathematics and 250 like all the
three subjects.
i) Find the number of students who like at least one of the subjects.
ii) How many of them like Probability & Statistics and do not like Discrete
Mathematics and Digital Signal Processing.
iii) How many of them who do not like Discrete Mathematics, Probability &
Statistics and Digital Signal Processing.
iv) How many of them do not like all the three subjects.
Solution:
D S 400, D P S 250
i) Number of students who like atleast one of the subjects = D P S
= 815
ii) Number of students who like Probability & Statistics but not Discrete
= PDS
= U PDS
7.How many positive integers not exceeding 500 are divisible by 7 or 11?
Soln:
Let A = Set of positive integers less than 500, that are divisible by 7.
B = Set of positive integers less than 500, that are divisible by 11.
n(A)
500 71
7
71.42
n(B)
500 45
11
=45.5
[Number of integers which are divisible by both 7 and 11]
500
n(A B)
7 *11 6
LCM(7,11) =77
divisible by 7 or 11
n A B n A n B n A B
= 71 + 45 – 6 = 110
8. Find the number of integers between 1 and 250, both inclusive, that
Solution:
Let A = Set of positive integers less than 250, that are divisible by 4.
D = Set of positive integers less than 250, that are divisible by 15.
250
n( A) 62
4
250
n( B ) 50
5
250
n(C ) 41
6 41.6
250
n( D ) 16
15 16.66
250
n( A B ) 12
4 * 5 LCM(4,5)=20
250
n( A C ) 20
12 [LCM =(A and C)=LCM (4,6) =12]
250
n( A D ) 4
60
250
n( B C ) 8
30
250
n( B D ) 16
15
250
n(C D) 8
30
250
n( A B C ) 4
60 [LCM(A,B,C)=LCM (4,5,6) =60]
250
n( A B D ) 4
60
250
n( A C D ) 4
60
250
n( B C D ) 8
30
250
n( A B C D ) 4
60 LCM(4,5,6,15)=60
9.Determine the number of integers between 1 and 250 that are not
divisible by 2, 3, or 5?
Soln:
Let A = Set of positive integers less than 250, that are divisible by 2.
n(A)
250 125
2
n(B)
250 83
3
n(C)
250 50
5
n(A B)
250 41
6
n(A C)
250 25
10
n(B C)
250 16
15
n(A B C)
250 8
30
n A B C n A n B n C n A B n B C n A C n A B C
= 184
= 250 – 184 = 66
A= nos. divisible by 7
B= nos. divisible by 2
C= nos. divisible by 3
D= nos. divisible by 5
Relations
Connection between two sets
If A and B are two sets, a relation (or a binary relation) from A to B
is a subset of A B .(Subset of the cartesian product between two sets) If
x A is related to an element y B under the relation R , then we write
x R y (x is related to y).
Examples:
Then R (1, 3), (2, 2), (3, 1), (4, 0). (0,4) not possible
Domain of R = 1, 2, 3, 4
Range of R = 0,1, 2, 3
Then R (1, 1), (1, 2), (1, 3), (1, 4), (2, 2), (2, 3), (2, 4), (3, 3), (3, 4), (4, 4)
Then R = {(1,1), (1, 3), (1, 5), (2, 2), (2, 4), (3, 1), (3, 3), (3, 5), (4, 4),
(4, 2), (5, 1), (5, 3), (5, 5)}
Then R = {(1, 3), (2, 3), (3, 3), (3, 4), (3, 5),(3,1),(3,2),(4,3),(5,3)}
subset of AXA
Types of relations:
Eg. If A 1, 2, 3 , then the identity relation on A is R (1, 1), (2, 2), (3, 3)
multiple of b . Then R .
Eg. Let A 2, 3, 5, B 6, 8,10 and let the relation R be defined as a R b iff
a divides b .[b/a]
Then R = (2, 6), (2, 8), (2, 10), (3, 6), (5, 10) and
Reflexive relation
A relation on a set A is reflexive if (a, a)∈ R [or] aRa for all a ∈ A, i.e., if
every element of A is related to itself.
a) The relation “ is equal to“ (=) on the set of real numbers is reflexive,
since every element is equal to itself.[1=1, 2=2, .....]
b) The relation “ is parallel to “ on the set of all straight lines in a plane is
reflexive, since every straight line is parallel to itself
Symmetric relation
1) R={ (1,1)(2,2),(3,3),(2,3),(3,2),(1,3),(3,1),(4,3)}
Transitive relation
Eg: The relation “ is parallel to “ on the set of all straight lines in a plane.
Antisymmetric relation
1) The relation ‘ is less than or equal to’ on the set of real numbers.
Asymmetric relation
Irreflexive relation
Equivalence relation
Eg:
R (a, b) : a is congruent to b
R (a, b) : a is parallel to b
Practice Problems
1) Let A = {1, 2, 3} and B = {1, 4} and consider the relation R such that
“<” [a<b] then find R, RC, R−1.
Solution:
Universal set
A × B = {(1, 1), (1, 4), (2, 1), (2, 4), (3, 1), (3, 4)}
R = {(1, 4), (2, 4), (3, 4)}
2). Let A = {a, b, c} and B = {1, 2, 4} the relation R = {(a, 1), (a, 4),
(b, 1), (b, 4),(c, 1), (c, 2), (c, 4)}, find RC, R−1.
Solution:
Universal set
A × B = {(a, 1), (a, 2), (a, 4), (b, 1), (b, 2), (b, 4), (c, 1), (c, 2), (c, 4)}
R−1 = {(1, a), (4, a), (1, b), (4, b), (1, c), (2, c), (4, c)}
S = {(1, 2), (1, 6), (2, 2), (2, 6), (3, 2)(3, 6)}.
Find R ∪ S & R ∩ S
Solution:
R = {(1, 1), (1, 2), (2, 1), (1, 3), (3, 1), (2, 2), (3, 3)},
S = {(1, 1), (1, 2), (1, 3), (2, 1), (2, 2), (2, 3), (3, 1), (3, 2), (3, 3)}
Ans:
The relation R is symmetric but not reflexive and also not transitive
(1,2)&(2,1) imply(1,1) in R
(1,2)&(2,2)imply (1,2) i n R
Not transitive
The relation S is symmetric, transitive, but not reflexive since (4,4) is not
in S.
5)
6)
Ans:
7)
Ans:
Solution:
To check R is reflexive (a, a) ∈R ,∀ a ∈ R. That is aRa. for all a ∈ R
(1,1) and (1,2) ∈R implies (1,2) ∈R ; (1,2) and (2,2) ∈R implies (1,2) ∈R
(1,2) and (2,1) ∈R implies (1,1) ∈R ; (2,2) and (2,1) ∈R implies (2,1) ∈R
(2,1) and (1,1) ∈R implies (2,1) ∈R ; (2,1) and (1,2) ∈R implies (2,2) ∈R
Therefore R is transitive
R is symmetric
(1,1) and (1,3) ∈R implies (1,3) ∈R ; (1,3) and (3,1) ∈R implies (1,1) ∈R
𝑅 = {(1,3), (2,4), (3,5), (4,6), (5,7), (6,4), (5,3), (4,2), (3,1), (7,5)}
equivalence relation?
Solution:
Solution:
To check R is reflexive: aRa for all aϵA
a
That is the line a is parallel to itself.
c
That is the line a is parallel to c [aRc]
Solution:
a
That is, the line a cannot be perpendicular to itself.
Hence R is symmetric
a
That is the line a is parallel to c
8) Let a relation R be defined on the set of all real numbers by if x,y are
real numbers, xRy ⇔ x−y is a rational number. Show that the relation R
is an equivalence relation.
Solution:
To check R is Symmetric
(ii) Let xRy then x−y = z for some rational number.
To check R is Transitive
Hence R is transitive.
A={1,2,3...9} R in A×A
(a, b) R (c, d) if (a, b)(c, d) ∈ A∈A aRb
a+ d=b+ c
To prove R is reflexive (a,b ) related to itself
To prove R is Transitive
1) If R is the relation on the set of integers such that (a, b)∈R iff
3a+4b = 7n for some integer n, prove that R is an equivalence relation.
Solution : aRa
To prove 3b+4a=7m
Given (a, b) ∈R this implies 3a+4b = 7n where n is a integer by
definition.
= 7(b+a) −7n
⟹ 3a + 7b + 4c = 7(m+n)
3a + 4c =7 times an integer
Then xb=ya which implies bx=ay. i.e., ay=bx. Which in turn implies
(a,b)R(x,y).
Therefore R is symmetric.
ya bc
⟹x & d
b a
ya bc
Consider xd yc (x,y)R(c,d)
b a
Hence R is transitive.
Therefore R is reflexive.
Therefore R is symmetric.
2
xy
Therefore ac a perfect square.
b
Therefore R is transitive.
Thus R is transitive.
integers.
Ans:
x y mk , where k is an integer.
x x 0 0.m
i.e., x R x R is reflexive.
(ii) R is symmetric:
Let x R y
x y mk , where k is an integer.
( y x) ( x y ) mk m(k ) , where k is an integer.
y Rx
i.e., x R y y R x R is symmetric.
(iii) R is transitive
x y y z mk1 mk 2
x z m k1 k 2 , k1 k 2 is an integer
i.e., x R z
i.e., x R y , y R z x R z
R is transitive.
R is an equivalence relation.
5) If R is the relation on the set of positive integers such that (a,b)∈R iff
a2+b is even. Prove that R is an equivalence relation.
ii) When a2+b is even, ‘a’ and ‘b’ must be both even or both odd.
So R is symmetric.
iii) When a,b,c are even, a2+b and b2+c is even. Also a2+c is even.
When a,b,c are odd, a2+b and b2+c is even. Also a2+c is even.
Therefore R is transitive.
Equivalence classes
[a] = {x: (a, x)ϵ R}= the set of elements that are related with a are
coming under the equivalence class of a
A={{1,2},{3}}
Note
1) a ϵ[a], [That is, an element must belong to its respective equivalence class]for all a ϵA
Representation of relations
Apart from set notation, there are other ways too to write the relation.
They are
1. Relational matrix
2. Digraph representation
3. Arrow diagram
1 if ai ,b j R
matrix MR mij where mij
0 if ai ,b j R
Note :
Solution.
b1 b 2 b3 b 4
a1 1 0 0 1
a2 0 1 1 0
MR
a3 1 0 1 0
a4 0 0 0 0
2)
3)
1 2 3 4
1
2
1
3
4
Solution :
R = {(1,1),(1,3),(2,3),(3,1),(4,1),(4,2),(4,4)}
The elements of the set A are represented by dots or small circles called
notes or vertices.
Problems
1) Write the directed graph of relation
R ={(a, a), (a, b),(b, b),(b, c),(c, c),(c, b),(c, a)}. Also check whether the
relation is an equivalence relation
Since, there is loop at every node, it is reflexive but it is not symmetric as
there is an edge from a to b but no opposite edge from b to a R is not
transitive as there is an edge from a to b and b to c but no edge from a to
c.The relation is not an equivalence relation.
Solution:
1 2
4 3
Arrow diagram
The elements of A and B are written in two columns in two disjoint discs
respectively, and then an arrow is drawn from a A to b B , if a is
related to b .
and MS =
1 1 0 0
0 0 0 0
2) M RS
0 0 0 0
0 0 0 0
1 1 1 0
1 0 0 0
1 0 0 0
1 1 1 0
1 1 1 1
1 1 1 1
1 1 0 1
0 0 0 0
Problems
relation matrix
1 x
2
y
3
z
4
3
3
R= x y z
1 0 1 1
2 0 0 0
3 0 1 0
4 1 0 1
Thus for the height relation R given by (a, p), (a, r ), (b, q) , an arrow is
R={(2,2),(2,4),(2,6),(4,4),(4,2),(6,2)}
2 2
4 4
6
6
8
8
Composition of relations
R: A B and S: B C RS: A C
M M .M S
R S R
M M M
RS R S
M M M
RS R S
M M
R R
M
R 1
M
R
T
1 1 1, 1 0 1, 0 1 1, 0 0 0
1 1 1, 1 0 0, 0 1 0, 0 0 0
Powers of a relation:
1 0 1 0 1 1
M R 0 1 1 , M S 1 1 0
0 0 0 0 1 0
1) R S 2) R S 3) R 4) R 1 5) R S
(1) M R S M R M S =
1 0 1 0 1 1 1 0 0 1 1 1 1 1 1
0 1 1 1 1 0 0 1 1 1 1 1 1 1 1
0 0 0 0 1 0 0 0 0 1 0 0 0 1 0
1 0 1 0 1 1 0 0 1
(2) M R S M R M S = 0 1 1 1 1 0 0 1 0
0 0 0 0 1 0 0 0 0
0 1 0
(3) M R M R 1 0 0
1 1 1
1 0 0
(4) M R 1 M R 0 1 0
T
1 1 0
(5) M R S M R . M S =
1 0 1 0 1 1 0 0 0 1 0 1 1 0 0 0 1 1
0 1 1 1 1 0 0 1 0 0 11 0 0 0 1 1 0
0 0 0 0 1 0 0 0 0 0 0
0
[matrix multiplication]
0 1 0 0 1 0
M R 1 1 1 , M S 0 1 1
1 0 0 1 1 1
v) R S
Solution :
0 1 0
i) MR S MR MS 1 1 1
1 1 1
0 1 0
ii) MR S MR MS 0 1 1
1 0 0
0 1 1
iii) MR S MR MS 1 1 1
0 1 0
1 1 1
iv) MSR MS MR 1 1 1
1 1 1
0 0 0
v) MR S MR S MR S 1 0 0 R S RS RS
0 1 1
[Since ]
Example 3
Let R be a relation (2, 2), (2, 5), (5, 6), (6, 6) on A 2, 5, 6 . Find R, R 2 , R 3 .
Ans:
1 1 0
R 0 0 1
0 0 1
1 1 0 1 1 0 1 1 1
R R R 0 0 1 . 0 0 1 0 0 1
2
0 0 1 0 0 1 0 0 1
1 1 1 1 1 0 1 1 1
R 3 R 2 R 0 0 1 0 0 1 0 0 1
0 0 1 0 0 1 0 0 1
Example 4
If R is the relation on A 1, 2, 3 such that (a, b) R iff a b is even, find
the relational matrix M R . Also find M R 1 , M R , M R 2 .
Ans:
R (1, 1), (1, 3), (2, 2), (3, 1), (3, 3)
1 2 3
11 0 1
M R 20 1 0
3 1 0 1
1 0 1
M R 1 M R 0 1 0
T
1 0 1
0 1 0
M R M R 1 0 1
0 1 0
1 0 1
M R 21 M R .M R 0 1 0
1 0 1
Example 5.
Example 6.
Questions
answer.
4. Let X = 1,2 ,3 ,4 and R 1,1, 1,4, 4,1, 4,4 , 2,2 , 2,3, 3,2 , 3,3 . Write
the matrix of R.
5. If A= 1, 2,3, 4 and R 1,1 , 1,3 , 2,3 , 3, 2 , 3,3 , 4,3 , determine the
1 0 1 1 0 0 1 0
M R 1 1 0 and M S 1 0 1 0 1 find M R S , M R , M S , M R S and
1 1 1 0 1 0 1 0
prove that M R S M S R .
S 1,3 , 1, 4 , 2,3 , 3,1 , 4,1 are the relations on A 1, 2,3, 4 , find
relation.
15. Let the relation R be defined on the set of all real numbers: If
x,y are real numbers, xRy x y is a rational number. Show that R
is an equivalence relation.