Question: please answer question 9. 6 Functions s Let S be the set of all finite non-null strings of characters. Let upr:S S be the function
6 Functions s Let S be the set of all finite non-null strings of characters. Let upr:S S be the function that converts all lower-case letters to upper-case (and leaves all other characters unchanged). Similarly, let Iwr:S S be the function that converts all upper. case letters to lower-case. (a) Evaluate upr(Barbara Hill) and (lwrupreBarbara Hill). (b) Are upr and lwr inverses of each other? Explain. 9 Let X (1, 2, 3,.., 20), and let Y be the set of non-null strings of up to 20 characters. Let fbe defined as follows: f: X Y, f(x)-English word for x (in lower-case letters) For example, f(1)- 'one' (a) State, giving reasons, whether: (i) f is one-to-one; (ii) fis onto; (ii) fl exists. I fg: Y X, g(s)-number of characters in s, evaluate the following expressions, where possible (i) (go f)(7) (ii) (g f)(' seven') (iii) (f o g)(7) (iv) (fog)( seven') (b) Let f: N N, f(n) = digital root of n. (Digital roots were defined in Chapter 1, Exercise 8.) (al State with reasons, whether fis one-to-one and whether fis 10
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
