CS 336 PreTest_sets_4 - CS336PreTest4 FunctionsandInduction

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

View Full Document Right Arrow Icon
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)
Background image of page 1

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

View Full DocumentRight Arrow Icon
a(x, y) = x + y (addition) f(x) = a((d  °  v)(x), 10) a) What is  f(3) ? b)
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 4

CS 336 PreTest_sets_4 - CS336PreTest4 FunctionsandInduction

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

View Full Document Right Arrow Icon
Ask a homework question - tutors are online