Professional Documents
Culture Documents
Chapter 8: Relations
Department of Mathematics
The FPT university
Topics covered:
Topics covered:
Chapter 8: Relations
Topics covered:
Chapter 8: Relations
Chapter 9: Graphs
Topics covered:
Chapter 8: Relations
Chapter 9: Graphs
Chapter 10: Trees
Topics covered:
Chapter 8: Relations
Chapter 9: Graphs
Chapter 10: Trees
Chapter 11: Boolean Algebra
Topics covered:
Chapter 8: Relations
Chapter 9: Graphs
Chapter 10: Trees
Chapter 11: Boolean Algebra
Chapter 12: Modeling Computation
Topics covered:
Topics covered:
Topics covered:
Topics covered:
Topics covered:
Topics covered:
Let R be a relation on A.
Let R be a relation on A.
Let R be a relation on A.
Let R be a relation on A.
Let R be a relation on A.
Let R be a relation on A.
(1) R = set of pairs of students in a class that have the same birthday
(1) R = set of pairs of students in a class that have the same birthday
(2) R = set of pairs of two integers (a, b) with a divisible by b
(1) R = set of pairs of students in a class that have the same birthday
(2) R = set of pairs of two integers (a, b) with a divisible by b
(3) R = set of pairs of real numbers (x, y ) with x + y = 0
(1) R = set of pairs of students in a class that have the same birthday
(2) R = set of pairs of two integers (a, b) with a divisible by b
(3) R = set of pairs of real numbers (x, y ) with x + y = 0
(4) R = set of pairs of negative numbers (a, b) with a > 2b
(1) R = set of pairs of students in a class that have the same birthday
(2) R = set of pairs of two integers (a, b) with a divisible by b
(3) R = set of pairs of real numbers (x, y ) with x + y = 0
(4) R = set of pairs of negative numbers (a, b) with a > 2b
(1) R = set of pairs of students in a class that have the same birthday
(2) R = set of pairs of two integers (a, b) with a divisible by b
(3) R = set of pairs of real numbers (x, y ) with x + y = 0
(4) R = set of pairs of negative numbers (a, b) with a > 2b
Example.
The join operator J2 used on these relations will produce the relation
The join operator J2 used on these relations will produce the relation
The join operator J2 used on these relations will produce the relation
Let R = {(1, 3), (2, 2), (1, 4), (2, 1), (3, 1)} on A = {1, 2, 3, 4}.
Let R = {(1, 3), (2, 2), (1, 4), (2, 1), (3, 1)} on A = {1, 2, 3, 4}.
Let R = {(1, 3), (2, 2), (1, 4), (2, 1), (3, 1)} on A = {1, 2, 3, 4}.
Let R = {(1, 3), (2, 2), (1, 4), (2, 1), (3, 1)} on A = {1, 2, 3, 4}.
reflexive
reflexive
symmetric
reflexive
symmetric
antisymmetric
reflexive
symmetric
antisymmetric
transitive
Then:
Then:
A ∧ B = [aij ∧ bij ]
Then:
A ∧ B = [aij ∧ bij ]
A ∨ B = [aij ∨ bij ]
Then:
A ∧ B = [aij ∧ bij ]
A ∨ B = [aij ∨ bij ]
A ⊕ B = [aij ⊕ bij ]
Then:
A ∧ B = [aij ∧ bij ]
A ∨ B = [aij ∨ bij ]
A ⊕ B = [aij ⊕ bij ]
A = [aij ]
Example.
Example.
1
0 1 0 0 =
1
Example.
1
0 1 0 0 = 0 ,
1
Example.
1 0
0 1 0 0 = 0 , 0 1 0 1 =
1 1
Example.
1 0
0 1 0 0 = 0 , 0 1 0 1 = 1
1 1
Example.
1 0
0 1 0 0 = 0 , 0 1 0 1 = 1
1 1
Example.
1 0
0 1 0 0 = 0 , 0 1 0 1 = 1
1 1
Example.
1 0
0 1 0 0 = 0 , 0 1 0 1 = 1
1 1
Example.
Example.
1 0
0 1 0 0 = 0 , 0 1 0 1 = 1
1 1
Example.
1 0
0 1 0 0 = 0 , 0 1 0 1 = 1
1 1
MR∪S = MR ∨ MS
MR∪S = MR ∨ MS
MR∩S = MR ∧ MS
MR∪S = MR ∨ MS
MR∩S = MR ∧ MS
MR⊕S = MR ⊕ MS
MR∪S = MR ∨ MS
MR∩S = MR ∧ MS
MR⊕S = MR ⊕ MS
MR = MR
MR∪S = MR ∨ MS
MR∩S = MR ∧ MS
MR⊕S = MR ⊕ MS
MR = MR
MR −1 = (MR )T
MR∪S = MR ∨ MS
MR∩S = MR ∧ MS
MR⊕S = MR ⊕ MS
MR = MR
MR −1 = (MR )T
MS◦R = MR MS
MR∪S = MR ∨ MS
MR∩S = MR ∧ MS
MR⊕S = MR ⊕ MS
MR = MR
MR −1 = (MR )T
MS◦R = MR MS
[n]
MR n = MR MR · · · MR =: MR
MR∪S = MR ∨ MS
MR∩S = MR ∧ MS
MR⊕S = MR ⊕ MS
MR = MR
MR −1 = (MR )T
MS◦R = MR MS
[n]
MR n = MR MR · · · MR =: MR
reflexive
reflexive
symmetric
reflexive
symmetric
antisymmetric
reflexive
symmetric
antisymmetric
transitive
reflexive
symmetric
antisymmetric
transitive
reflexive
symmetric
antisymmetric
transitive
reflexive
symmetric
antisymmetric
transitive
reflexive
symmetric
antisymmetric
transitive
reflexive?
reflexive?
symmetric?
reflexive?
symmetric?
reflexive and symmetric?
Example 2.
Example 3.
Let
R = {(1, 3), (1, 4), (2, 1), (3, 2)}
on the set A = {1, 2, 3, 4}.
Let
R = {(1, 3), (1, 4), (2, 1), (3, 2)}
on the set A = {1, 2, 3, 4}.
Let
R = {(1, 3), (1, 4), (2, 1), (3, 2)}
on the set A = {1, 2, 3, 4}.
Let
R = {(1, 3), (1, 4), (2, 1), (3, 2)}
on the set A = {1, 2, 3, 4}.
These new pairs together with those of R may form new ones, meaning we
might need to add pairs of R 3 ,...
Let
R = {(1, 3), (1, 4), (2, 1), (3, 2)}
on the set A = {1, 2, 3, 4}.
These new pairs together with those of R may form new ones, meaning we
might need to add pairs of R 3 ,...
Let
R = {(1, 3), (1, 4), (2, 1), (3, 2)}
on the set A = {1, 2, 3, 4}.
These new pairs together with those of R may form new ones, meaning we
might need to add pairs of R 3 ,...
R∗ = R ∪ R2 ∪ R3 ∪ · · ·
Let
R = {(1, 3), (1, 4), (2, 1), (3, 2)}
on the set A = {1, 2, 3, 4}.
These new pairs together with those of R may form new ones, meaning we
might need to add pairs of R 3 ,...
R∗ = R ∪ R2 ∪ R3 ∪ · · ·
R ∗ = R ∪ R 2 ∪ R 3 ∪ · · · ∪ R n.
R ∗ = R ∪ R 2 ∪ R 3 ∪ · · · ∪ R n.
R ∗ = R ∪ R 2 ∪ R 3 ∪ · · · ∪ R n.
0 0 0 0
0 0 0 0
0 0 0 0 0 0 0 0
1 0 0 0 0 0 1 1
[3] 0 1 0 0 [4] 1 0 0 0
MR = 0 0 1 1
M R =
0 1 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
1 0 0 0 0 0 1 1
[3] 0 1 0 0 [4] 1 0 0 0
MR = 0 0 1 1
M R =
0 1 0 0
0 0 0 0 0 0 0 0
1 1 1 1
1 1 1 1
Then MR ∗ = 1 1 1 1
0 0 0 0
M0 := MR
M0 := MR
Mk := Mk−1 ∨ (Boolean product of kth column and kth row of Mk−1 )
M0 := MR
Mk := Mk−1 ∨ (Boolean product of kth column and kth row of Mk−1 )
M0 := MR
Mk := Mk−1 ∨ (Boolean product of kth column and kth row of Mk−1 )
(i) A1 ∪ A2 ∪ · · · ∪ An = A
(i) A1 ∪ A2 ∪ · · · ∪ An = A
(ii) Ai ∩ Aj = Ø for all i 6= j.
(i) A1 ∪ A2 ∪ · · · ∪ An = A
(ii) Ai ∩ Aj = Ø for all i 6= j.
Example.
Example.