CS2800-Functions-Seqs_v.5

# CS2800-Functions-Seqs_v.5 - Discrete Math CS 2800 Prof Bart...

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

1 Discrete Math CS 2800 Prof. Bart Selman [email protected] Module Basic Structures: Functions and Sequences

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

View Full Document
Functions Suppose we have: How do you describe the yellow function ? What’s a function ? f(x) = -(1/2)x – 1/2 x f(x)
Functions More generally: Definition: Given A and B, nonempty sets, a function f from A to B is an assignment of exactly one element of B to each element of A. We write f(a)=b if b is the element of B assigned by function f to the element a of A. If f is a function from A to B, we write f : A B. Note: Functions are also called mappings or transformations. B

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

View Full Document
4 Functions A = {Michael, Toby , John , Chris , Brad } B = { Kathy,  Carla,  Mary} Let f: A   B be defined as f(a) = mother(a). Michael  Toby John  Chris  Brad Kathy Carol Mary A B
5 Functions More generally:    f: R R, f(x) = -(1/2)x – 1/2 domain co-domain A - Domain of f B- Co-Domain of f B

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

View Full Document
6 Functions More formally: a function f : A   B is a subset of AxB where  2200  a   A,  5 ! b   B  and <a,b>   f. A B A B a point! a collection of  points! Why not?
Functions - image & preimage For any set S A, image(S) = {b : 5 a S, f(a) = b} So, image({Michael, Toby}) = {Kathy} image(A) = B - {Carol} image(S)   image(John) = {Kathy} pre-image(Kathy) = {John, Toby, Michael} range of f   image(A) Michael  Toby John  Chris  Brad Kathy Carol Mary A B

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

View Full Document
8 Functions - injection A function f: A   B is  one-to-one  ( injective, an injection ) if  2200 a,b,c, (f(a) = b   f(c)  = b)   a = c Not one-to-one Every b   B has at  most 1 preimage. Michael  Toby John  Chris  Brad Kathy Carol Mary
9 Functions - surjection A function f: A   B is  onto  ( surjective, a surjection ) if  2200  B,  5  A f(a) = b Not onto Every b   B has at  least 1 preimage. Michael  Toby John  Chris  Brad Kathy Carol Mary

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

View Full Document
Functions – one-to-one-correspondence or bijection A function f: A   B is  bijective  if it is  one-to-one and onto . Anna  Mark  John Paul  Sarah Carol  Jo Martha Dawn Eve Every b   B has  exactly 1 preimage. An important implication  of this characteristic: The preimage (f -1 ) is a  function! They are  invertible. Anna  Mark  John  Paul  Sarah Carol Jo    Martha  Dawn Eve
11 Functions: inverse function Definition: Given f, a one-to-one correspondence from set A to set B, the inverse function of f is the function that assigns to an element b belonging to B the unique element a in A such that f(a)=b. The inverse function is denoted f -1 . f -1 (b)=a, when f(a)=b. B

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

View Full Document
12 Functions - examples Suppose f: R +    R + , f(x) = x 2 . Is f one-to-one? Is f onto?
This is the end of the preview. Sign up to access the rest of the document.

## This note was uploaded on 10/25/2009 for the course CS 2800 at Cornell.

### Page1 / 56

CS2800-Functions-Seqs_v.5 - Discrete Math CS 2800 Prof Bart...

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

View Full Document
Ask a homework question - tutors are online