0% found this document useful (0 votes)
42 views3 pages

Tutorial 2 - Solutions PDF

This document contains solutions to tutorial questions for COMP107 in 2021. It includes solutions involving sets, relations, and properties of relations like reflexivity, symmetry, antisymmetry, and transitivity. Diagrams and figures are provided to illustrate example relations and equivalence classes.

Uploaded by

Darian Chetty
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)
42 views3 pages

Tutorial 2 - Solutions PDF

This document contains solutions to tutorial questions for COMP107 in 2021. It includes solutions involving sets, relations, and properties of relations like reflexivity, symmetry, antisymmetry, and transitivity. Diagrams and figures are provided to illustrate example relations and equivalence classes.

Uploaded by

Darian Chetty
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/ 3

COMP107 Tutorial Two Solutions 2021

1. a) (2, 4), (2, 8)


b) (2, 3), (2, 4), (5, 8)
c) (1, 1), (2, 4)

2. a) see Fig. 1 below.


b) rs = {(1, 3), (1, 5), (3, 5)}
c) sr = {(1, 3), (1, 5), (3, 5)}
d) Yes. rs is a subset of sr and sr is a subset of rs, therefore they are equal. They also contain the same elements.

3. a) r = {(1, 2), (2, 3), (3, 4), (4, 5)}


b) r 2 = {(1, 3), (2, 4), (3, 5)} = {(x, y) : y = x + 2, x, y ∈ A}
c) r3 = {(1, 4), (2, 5)} = {(x, y) : y = x + 3, x, y ∈ A}

4. see Figure 2

5. see Figure 3
6. a) i) reflexive; not symmetric; not antisymmetric; transitive
ii) reflexive; not symmetric; antisymmetric; transitive
iii) not reflexive; not symmetric; not antisymmetric; not transitive
iv) not reflexive; symmetric; antisymmetric; transitive
v) reflexive; symmetric; not antisymmetric; transitive
vi) reflexive; not symmetric; antisymmetric; transitive
vii) not reflexive; not symmetric; not antisymmetric; not transitive
b) Graphs ii and vi are partial orders relations. Graph v is of an equivalence relation.

7. a) No, since for example |1 − 1| = 0 ̸= 2


b) Yes,since |i − j| = |j − i|
c) No,since 2 − 4 = 2 and |4 − 6| = 2,but |2 − 6| = 4 ̸= 2.
d) see Figure 4

1
COMP107 Tutorial Two Solutions 2021

A r A s A

1 1 1
3 3 3

5 5 5

Composition (rs)

A s A r A
1 1 1

3 3 3

5 5 5

Composition (sr)

Figure 1: Diagram for Ex 2.a)

2
COMP107 Tutorial Two Solutions 2021

5 2 4

Figure 2: Diagram for Ex 4

00 01 10 11

000 001 010 011 100 110 101 111

0 1

Figure 3: Diagram for Ex 5

1 3 5

2 4 6

Figure 4: Diagram for Ex 7

You might also like