Sunteți pe pagina 1din 2

NATIONAL UNIVERSITY OF COMPUTER AND EMERGING SCIENCES

DISCRETE STRUCTURES (MT217 – F10)


ASSIGNMENT-1
Date of Submission: 20th September, 2010

Q#1 Determine whether each of the following relations are reflexive, irreflexive, symmetric,
anti-symmetric, or transitive or not:

a) For natural numbers a and b, a R b if a2 + b is even


b) “is married to” on the set of all people.
c) “x is an ancestor of y” on the set of all people
d) “x is located within 1 mile of y”
e) “x +1 =y” on the set of all real numbers
f) ‘has the same parity as’ (that is, both integers are odd or both are even)
g) “A ⊇ B” where A and B are subsets of S ( i.e. power set P(S) )
h) ‘is a multiple of’, on the set of positive integers

Q#2 Determine whether each of the following relations are reflexive, irreflexive, symmetric,
anti-symmetric, or transitive or not:

a) Let Z0 = Z - {0}. Let R be a relation in Z × Z0 defined by


R = {( (a,b),(c,d) ): ad = bc}
b) The relation “is a subexpression of” on the set of logical expressions (with a
given set of variables).
• E.g “a+b” is a subexpression of “(a+b)-(c*d)”

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#5 Let R be the relation on S = {a, b, c, d} defined by the following matrix:

a) Draw the graphical representation of R.


b) State, giving reasons, whether R is reflexive, symmetric, anti-symmetric or
transitive.
c) Express the relation as a subset R ⊆ S × S
d) Find transitive closure R of the R.

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

i. h: {1,2,3} → {1,2,3} ; h(n) = n + 1


ii. abs: R+→R ; abs(x) = |x|
o where R+ is all positive real numbers
iii. f: {1, 2, 3, 4, 5}→{0, 1, 2, 3, 4}; f(n) = remainder after 3n is divided by 5
iv. g: R→R ; g(x) = x / 3.

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

Let f : N→N, f(n) = digital root of n.


a) State, with reasons, whether f is ‘one-to-one’ and ‘onto’ or not.
b) Does f -1 exist? If so, describe it. If not, give a reason.
c) Does (f ο f) exist? If so, describe it. If not, give a reason.

S-ar putea să vă placă și