CS 336 PreTest_sets_4

# CS 336 PreTest_sets_4 - CS336PreTest4 5.Functions(continued...

This preview shows pages 1–3. Sign up to view the full content.

CS 336 Pre-Test 4  Functions and Induction  5. Functions (continued) 1) * Let D be the set of people.  For each of the following relations answer these questions: (i)  Is it reflexive?  (ii) Is it symmetric?  (iii) Is it transitive?  (iv) Is it a function?  (v) If it is a  function, is it one-to-one?  (vi) If it is a function, is it onto? a) 2200 x,y   D xCy  iff  y  is a child of  x b) 2200 x,y   D xMy  iff  y  is the mother of  x c) 2200 x,y   D xPy  iff  y  is a parent of  x d) 2200 x,y   D xRy  iff  y  is a blood relative of  x 2) Define  (f  °  g)(x)   f(g(x)) .  Define the following functions mapping from the integers into the  integers: d(x) = 2x    (double) v(x) = -x           (invert)

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
a(x, y) = x + y (addition) f(x) = a((d  °  v)(x), 10) a) What is  f(3) ? b)
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### Page1 / 4

CS 336 PreTest_sets_4 - CS336PreTest4 5.Functions(continued...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online