Discrete Mathematics for Computer Science

(Romina) #1
Exercises 239

Proof. This proof is left as an exercise for the reader. U

Of course, the definitions of the terms strictly increasing and strictly decreasing do
not involve anything special about R, just that it has the relations < and <. Consequently,
a similar definition could be made for any linearly ordered, or even any partially ordered,
domain and codomain.

Exercises



  1. Which of the following are functions? If not, why not?
    (a) X is the set of students in the discrete mathematics class. For x E X, define g(x)
    to be the youngest cousin of x.
    (b) X is the set of senators serving in 1998. For x E X, define g(x) to be the number
    of terms a senator has held.
    (c) Forx E R, define g(x) = Ix/lxl1.

  2. Let X={0,1 ... 6, 7} and Y ={8,10,12,..., 20, 22). Define F:X -*Y as
    F(x) = 2x + 8. List the ordered pairs of the relation that define this function.

  3. What are the domain and range of the addition function on the real numbers? On
    Multiplication? Subtraction? Division?


4. Find the first six terms of the sequence with the elements defined as F(O) = 5, F(1) =

10, and F(n) = F(n - 1) - 2F(n - 2) for n > 2.

5. Find the first six terms of the sequence with the elements defined as F (0) = 1, F (1) =

3, F(2) = 5, and F(n) = 3F(n - 1) + 2F(n - 2) - 3F(n - 3) for n > 3.


  1. Find both a function defined by a formula and a recursively defined function for the
    following sequences:
    (a) 1, 3,5, 7,9, 11, 13,.
    (b) 1, 1, 3, 3, 5,5, 7, 7,...
    (c) 0, 2, 4, 6,8 .8
    (d) 1, 2,4, 8, 16,...

  2. Which of the following represent a partial function? A (total) function?


2 1 a b 2 I? aea b 2 b 2 1 7 .oba

3 3 3 9c^3 -oc

4 od 4 --- d 4 d 4 9---- d

8. Let X = {a, b}.

(a) There are nine partial functions F : X -* X. List them.
(b) There are four functions F : X - X. List them.

(c) List all 1-1 functions F : X - X.

(d) List all onto functions F : X - X.


  1. Let X = {-1, 0, 1, 21 and Y = {-4, -2, 0, 2}. Define the function F: X - Y as
    F(x) = x2 - x. Prove that F is neither 1-1 nor onto.

Free download pdf