Documente Academic
Documente Profesional
Documente Cultură
Q#1 Determine whether each of the following relations are reflexive, irreflexive, symmetric,
anti-symmetric, or transitive or not:
Q#2 Determine whether each of the following relations are reflexive, irreflexive, symmetric,
anti-symmetric, or transitive or not:
Q#3 Determine which of the relations in Q#1 & Q#2 are equivalence relations
Q#4 Let P be the parent-child relation on the set of people that is, P = {(a,b) : a is a parent of
b}. Let S be the sibling relation on the set of people that is, S = { (x,y) : x and y are
siblings (brothers or sisters) }. What are PoS and SoP
Q#6 a) Determine whether the following relations are functions or not. If any relation is not
a function then give reason that why it’s not a function.
NATIONAL UNIVERSITY OF COMPUTER AND EMERGING SCIENCES
DISCRETE STRUCTURES (MT217 – F10)
ASSIGNMENT-1
b) Determine which of the above functions are one-to-one and which are onto (give
reason).
c) Determine which of the above functions are invertible (give reason). Also find the
inverse function (if possible)
d) Draw arrow diagrams for the functions
e) Also find all possible composite functions. (i.e. x ο y where x and y are any of the
above functions)
Q#7 The following algorithm calculates a number known as the ‘digital root’ of a positive
integer.
1. Input a positive integer n
2. d = number of digits in n
3. While d > 1 do
3.1. n = sum of the digits of n
3.2. d = number of digits in n
4. Output n
Example
n = 8678 (any positive integer) d=4 (number of digits in n)
since (d > 1) so
n = 8+6+7+8 = 29 (sum of digits in n)
d=2 (number of digits in n)
since (d >1) so
n = 2+9 = 11 (sum of digits in n)
d=2 (number of digits in n)
since (d > 1) so
n = 1+1 = 2 (sum of digits in n)
d=1 (number of digits in n)
now d is not greater then 1
output n i.e 2