Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Exam (elaborations)

exam solutions for relations

Rating
-
Sold
-
Pages
4
Grade
A
Uploaded on
02-11-2022
Written in
2020/2021

The modules introduce mathematical tools required in the study of computer science. Topics include: 1.Logic and proof techniques 2.Number theory 3.Sequences and Mathematical Induction 4.Set theory, Functions and Relations 5.Counting and Probability 6.Graphs and Trees It is the backbone of CS. Concepts and notations from DM are useful in studying the describing objects and problems in all branches of CS, such as algorithms, programming languages, theorem proving and software development.Modeling with DM is an extremely important problem solving skill.

Show more Read less
Institution
Course

Content preview

CS1231(S) Tutorial 8: Relations
Solutions
National University of Singapore

2019/20 Semester 1


The questions marked with an asterisk ∗ are more challenging ones intended for discussion
purposes during the tutorial class. The other questions are regular ones. Please attempt all
questions before the tutorial class.

1. Let A = {1, 2, . . . , 10} and B = {2, 4, 6, 8, 10, 12, 14}. We define a relation R from A to
B by: for all a ∈ A and b ∈ B, a R b if and only if a is a prime and divides b.
(a) Find the subset R of A × B. Your answer should list down all the elements of R.
(b) Find R−1 . You answer should list down all the elements of R−1 .
Solution.
(a) R = {(2, 2), (2, 4), (2, 6), (2, 8), (2, 10), (2, 12), (2, 14), (3, 6), (3, 12), (5, 10), (7, 14)}.
(b) R−1 = {(2, 2), (4, 2), (6, 2), (8, 2), (10, 2), (12, 2), (14, 2), (6, 3), (12, 3), (10, 5), (14, 7)}.

2. Let A be a non-empty set.
(a) Explain briefly why ∅ is a relation on A.
(b) Determine if ∅ is (as a relation on A) reflexive, symmetric, or transitive.
Solution.

(a) Every subset of A × A is a relation on A, and ∅ is a subset of A.
(b) Since A is non-empty, there exists a ∈ A. Since (a, a) ∈ / ∅, ∅ is not reflexive.
However ∅ is both symmetric and transitive since the following two statements
are true as their hypotheses are false:

∀x, y ∈ A (x, y) ∈ ∅ → (y, x) ∈ ∅

∀x, y, z ∈ A (x, y), (y, z) ∈ ∅ → (x, z) ∈ ∅

3. Let R be a relation on a set A. Show that R is symmetric if and only if R = R−1 .

Solution.

R is symmetric ⇔ ∀x, y ∈ A (x R y → y R x)
⇔ ∀x, y ∈ A (x R y ↔ y R x)

⇔ ∀x, y ∈ A (x, y) ∈ R ↔ (y, x) ∈ R
⇔ ∀x, y ∈ A (x, y) ∈ R ↔ (x, y) ∈ R−1


⇔ R = R−1 .




1

Written for

Course

Document information

Uploaded on
November 2, 2022
Number of pages
4
Written in
2020/2021
Type
Exam (elaborations)
Contains
Questions & answers

Subjects

$8.31
Get access to the full document:

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Get to know the seller
Seller avatar
chrisbarn

Get to know the seller

Seller avatar
chrisbarn universitas sumatera utara
Follow You need to be logged in order to follow users or courses
Sold
-
Member since
3 year
Number of followers
0
Documents
4
Last sold
-

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions