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

Tutorial_5_solution

The document is a tutorial on relations in discrete mathematics and linear programming, covering matrix representations of relations, properties such as reflexivity and symmetry, and operations like union and intersection. It includes exercises on representing relations with matrices, determining their properties, and finding closures. Additionally, it discusses directed graphs and equivalence relations, providing examples and solutions throughout.

Uploaded by

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

Tutorial_5_solution

The document is a tutorial on relations in discrete mathematics and linear programming, covering matrix representations of relations, properties such as reflexivity and symmetry, and operations like union and intersection. It includes exercises on representing relations with matrices, determining their properties, and finding closures. Additionally, it discusses directed graphs and equivalence relations, providing examples and solutions throughout.

Uploaded by

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

Discrete Math.

& Linear Programming BES 114


Tutorial #5
”Relations”

1. Represent each of these relations on {1, 2, 3} with a matrix (with the elements of this set listed in
increasing order).

(a) {(1, 1), (1, 2), (1, 3)} (c) {(1, 1), (1, 2), (1, 3), (2, 2), (2, 3), (3, 3)}
   
1 1 1 1 1 1
0 0 0 0 1 1
0 0 0 0 0 1

(b) {(1, 2), (2, 1), (2, 2), (3, 3)} (d) {(1, 3), (3, 1)}
   
0 1 0 0 0 1
1 1 0 0 0 0
0 0 1 1 0 0

2. List the ordered pairs in the relations on {1, 2, 3} corresponding to these matrices (where the rows
and columns correspond to the integers listed in increasing order).

(a)  
1 0 1
0 1 0
1 0 1
The ordered pairs are:
{(1, 1), (1, 3), (2, 2), (3, 1), (3, 3)}
(b)  
0 1 0
0 1 0
0 1 0
The ordered pairs are:
{(1, 2), (2, 2), (3, 2)}
(c)  
1 1 1
1 0 1
1 1 1
The ordered pairs are:

{(1, 1), (1, 2), (1, 3), (2, 1), (2, 3), (3, 1), (3, 2), (3, 3)}

3. How can the matrix representing a relation R on a set A be used to determine whether the relation is
irreflexive? Give an example.
Solution:
A relation R on a set A is irreflexive if no element is related to itself, i.e., (a, a) →
/ R for all a → A.
Using the matrix representation of R:
• Check the main diagonal (entries where the row index equals the column index).
• If all diagonal entries are 0, the relation is irreflexive.
• If any diagonal entry is 1, the relation is not irreflexive.
Example:  
0 1 1
0 0 1
0 0 0
This relation is irreflexive because all diagonal entries ((1, 1), (2, 2), (3, 3)) are 0.
4. Determine whether the relations represented by the matrices in Exercise 2 are reflexive, irreflexive,
symmetric, antisymmetric, and/or transitive.
Solution: Relations on {1, 2, 3}

(a)  
1 0 1
0 1 0
1 0 1
Properties:
• Reflexive: Yes (all diagonal elements are 1).
• Irreflexive: No (since it is reflexive).
• Symmetric: Yes ((1, 3) is present and (3, 1) is also present).
• Antisymmetric: No ((1, 3) and (3, 1) both exist, but 1 ↑= 3).
• Transitive: Yes (check all possible pairs).
(b)  
0 1 0
0 1 0
0 1 0
Properties:
• Reflexive: No (missing (1, 1) and (3, 3)).
• Irreflexive: No ((2, 2) exists).
• Symmetric: No ((1, 2) exists but (2, 1) does not).
• Antisymmetric: Yes (Because there are no distinct pairs (a, b) and (b, a) in R).
• Transitive: Yes (all possible pairs satisfy transitivity).
(c)  
1 1 1
1 0 1
1 1 1
Properties:
• Reflexive: No (missing (2, 2)).
• Irreflexive: No ((1, 1), (3, 3) exist).
• Symmetric: Yes (for every (a, b), (b, a) exists).
• Antisymmetric: No (since it is symmetric and not diagonal).
• Transitive: No (Because (2, 1) → R and (1, 2) → R, but (2, 2) →
/ R).

5. Let R be the relation represented by the matrix


 
0 1 1
MR =  1 1 0 .
1 0 1

Find the matrix representing:


(a) R→1 The inverse relation R→1 is represented by the transpose of MR :
 T  
0 1 1 0 1 1
MR→1 = MRT = 1 1 0 =  1 1 0 .
1 0 1 1 0 1

(b) R The complement relation R is represented by the matrix of all 1’s minus MR :
   
1 1 1 1 0 0
MR = 1 1 1 ↓ MR = 0 0 1 .
1 1 1 0 1 0

(c) R2 The composition R2 = R ↔ R is represented by the Boolean product of MR with itself:


 
(0 ↘ 0) ≃ (1 ↘ 1) ≃ (1 ↘ 1) (0 ↘ 1) ≃ (1 ↘ 1) ≃ (1 ↘ 0) (0 ↘ 1) ≃ (1 ↘ 0) ≃ (1 ↘ 1)
MR2 = MR ↗MR = (1 ↘ 0) ≃ (1 ↘ 1) ≃ (0 ↘ 1) (1 ↘ 1) ≃ (1 ↘ 1) ≃ (0 ↘ 0) (1 ↘ 1) ≃ (1 ↘ 0) ≃ (0 ↘ 1)
(1 ↘ 0) ≃ (0 ↘ 1) ≃ (1 ↘ 1) (1 ↘ 1) ≃ (0 ↘ 1) ≃ (1 ↘ 0) (1 ↘ 1) ≃ (0 ↘ 0) ≃ (1 ↘ 1)
 
1 1 1
=  1 1 1 .
1 1 1

6. Let R1 and R2 be relations on a set A represented by the matrices

   
0 1 0 0 1 0
MR 1 = 1 1 1 MR 2 = 0 1 1 .
1 0 0 1 1 1

Find the matrices that represent:

(a) R1 ⇐ R2 The union is represented by the element-wise logical OR:


   
0≃0 1≃1 0≃0 0 1 0
MR1 ↑R2 = MR1 ≃ MR2 = 1 ≃ 0 1 ≃ 1 1 ≃ 1 = 1 1 1 .
1≃1 0≃1 0≃1 1 1 1

(b) R1 ⇒ R2 The intersection is represented by the element-wise logical AND:


   
0↘0 1↘1 0↘0 0 1 0
MR1 ↓R2 = MR1 ↘ MR2 = 1 ↘ 0 1 ↘ 1 1 ↘ 1 = 0 1 1 .
1↘1 0↘1 0↘1 1 0 0

7. Draw the directed graphs representing each of the relations from Exercise 1 and Exercise 2.
8. Draw the directed graph that represents the relation (a, a), (a, b), (b, c), (c, b), (c, d), (d, a), (d, b).
9. List the ordered pairs in the relations rep- resented by the directed graphs. Then, Determine whether
the relations represented by the directed graphs shown are reflexive, irreflexive, symmetric, antisym-
metric, asymmetric, and/or transitive.
10. Let R be the relation on the set {0, 1, 2, 3} containing the ordered pairs (0, 1), (1, 1), (1, 2), (2, 0), (2, 2),
and (3, 0). Find the:

(a) Reflexive closure of R


The reflexive closure is obtained by adding all missing pairs of the form (a, a):

R ⇐ {(0, 0), (3, 3)} = {(0, 0), (0, 1), (1, 1), (1, 2), (2, 0), (2, 2), (3, 0), (3, 3)}
Figure 1: Example 9.

(b) Symmetric closure of R


The symmetric closure is obtained by adding the inverse of each existing pair:

R ⇐ {(1, 0), (2, 1), (0, 2), (0, 3)} = {(0, 1), (1, 0), (1, 1), (1, 2), (2, 1), (2, 0), (0, 2), (2, 2), (3, 0), (0, 3)}

11. Let R be the relation {(a, b) | a ↑= b} on the set of integers. What is the reflexive closure of R?
Solution:
The reflexive closure is obtained by adding all pairs (a, a):

R ⇐ {(a, a) | a → Z} = {(a, b) | a, b → Z} = Z ⇑ Z

The reflexive closure is the complete relation containing all possible ordered pairs of integers.

12. Let R be the relation {(a, b) | a divides b} on the set of integers. What is the symmetric closure of R?
Solution:
The symmetric closure is obtained by adding all pairs (b, a) where (a, b) → R:

R ⇐ {(b, a) | a divides b} = {(a, b) | a divides b or b divides a}

This gives us all pairs where either a divides b or b divides a.

13. Draw the directed graph of the reflexive closure, symmetric closure, transitive closure of the relations
with the directed graph shown.

Figure 2: Example 13. Figure 3: Example 14. Figure 4: Example 15.

14. Determine whether the relation with the directed graph shown is an equivalence relation and find the
equivalence classes for the equivalence relations.

15. Determine whether the relations represented by these zero–one matrices are equivalence relations and
find the equivalence classes for the equivalence relations.

16. Which of these collections of subsets are partitions of {1, 2, 3, 4, 5, 6}?


(a) {1, 2}, {2, 3, 4}, {4, 5, 6}
(b) {1}, {2, 3, 6}, {4}, {5}
(c) {2, 4, 6}, {1, 3, 5}
(d) {1, 4, 5}, {2, 6}

You might also like