LectureNote MA221 01aug
LectureNote MA221 01aug
• Example:
A = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, J, Q, K }
B = { S, H, D, C }
Spades = { (1,S), (2,S), (3,S), …, (Q,S), (K,S) }
Spades is a binary relation.
Relation
• A k-ary relation is a subset of a cartesian of k sets.
• Example:
L = { (x, y, z) | x + 2y + 3z = 0, and x, y, z ℝ}
the line L is a ternary relation of the space ℝ3
Binary Relation
• In the remaining of this lecture, we focus on a special type of relations:
• the binary relation from a set A to A.
• Such a relation is called a binary relation on A.
• Example : A = the set of integers
R = { (a, b) | a – b 12 }
Types of Binary Relations
• A binary relation R on A is said to be reflexive if, for every a A,
(a, a) R.
3 4
Closures
• Given a binary relation R, we may obtain a new relation R’ by adding
items into R, such that R’ will have certain property.
• Example :
R = { (1,1), (1,2), (2,3), (2,4), (3,4), (4,2) } on A = { 1, 2, 3, 4 }
If we add (2,2), (3,3), and (4,4) into R, the resulting relation will be reflexive.
Closures
• Let R be a binary relation
• The smallest possible relation R’ that contains R as a subset, such that
R’ has a property P, is the closure of R with respect to P.
1 2 3 4 1 2 3 4
1 1
2 2
3 3
4 4
Reflexive closure of R
Closures
• What is the transitive closure of
R = {(1,1), (1,2), (2,3), (2,4), (3,4), (4,2)} ?
1 2 3 4 1 2 3 4
1 1
2 2
3 3
4 4
Transitive closure of R
Finding Transitive Closure
• Getting the transitive closure seems difficult.
• Is there a systematic way to get this ?
--think about it.
Equivalence Relations
• A relation may have more than one properties.
• A binary relation R on a set A is an equivalence relation if it is
reflexive, symmetric, and transitive.
1. R1={(a, b) : a – b is an integer ; a, b ℝ}
2. R2={(a, b) : |a – b| < 1 ; a, b ℝ}
3. R3={(a, b) : a – b is divisible by 3 ; a, b ℤ}
4. R4={(a, b) : a divides b ; a, b ℤ +}
Equivalence Classes
• Let R be an equivalence relation on A, and x be an item in A.
• If (x, w) R, we say w is related to x, and we denote this by xRw or
xw or xw.