# An explicit statement of the assignment for instance

This preview shows page 1. Sign up to view the full content.

This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: under f, ༉  a is called the preimage of b. ༉  “f (a)” is also known as the range. ༉  Two functions are equal when they have the same domain, the same codomain and map each element of the domain to the same element of the codomain. Represen\$ng Func\$ons ༉  Functions may be speciﬁed in diﬀerent ways: 1.  An explicit statement of the assignment. ༉  For instance, students and grades example. 2.  A formula: ༉  f(x) = x + 1 3.  A computer program: ༉  A Java program that when given an integer n, produces the nth Fibonacci Number (covered in the next section and also in Chapter 5). Ques\$ons f (a) = ? z The image of d is ? z The domain of f is ? A The codomain of f is ? B b The preimage of y is ? The preimage(s) of z is (are) ? {a, c, d} A B a x b y c d z Ques\$on on Func\$ons and Sets ༉  If and S is a subset of A, then A B a x f ({a, b, c}) is ? {y, z} b y c f ({c, d}) is ? {z} d z Injec\$ons Deﬁnition: a function f is said to be one- to- one if and only if for all a and b in the domain, f (a) = f (b) implies that a = b. ༉  A function is said to be an injection if it is one- to- one. YES! YES! NO! Surjec\$ons Deﬁnition: a function f from A to B is called onto, if and only if for every element b ! Y, there is an element a ! X with f (a) = b. ༉ ...
View Full Document

## This document was uploaded on 02/27/2014 for the course CS 215 at SIU Carbondale.

Ask a homework question - tutors are online