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

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

View Full Document Right Arrow Icon
1 Discrete Math CS 2800 Prof. Bart Selman selman@cs.cornell.edu Module Basic Structures: Functions and Sequences Rosen 2.3 and 2.4
Background image of page 1

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

View Full DocumentRight Arrow Icon
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)
Background image of page 2
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
Background image of page 3

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

View Full DocumentRight Arrow Icon
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
Background image of page 4
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
Background image of page 5

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

View Full DocumentRight Arrow Icon
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. (note: 5 ! for unique exists.) A B A B a point! a collection of points! Why not?
Background image of page 6
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
Background image of page 7

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

View Full DocumentRight Arrow Icon
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
Background image of page 8
9 Functions - surjection A function f: A B is onto ( surjective, a surjection ) if 2200 b B, 5 a A f(a) = b Not onto Every b B has at least 1 preimage. Michael Toby John Chris Brad Kathy Carol Mary
Background image of page 9

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

View Full DocumentRight Arrow Icon
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. John Paul Carol Jo Martha
Background image of page 10
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
Background image of page 11

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

View Full DocumentRight Arrow Icon
12 Functions - examples Suppose f: R + R + , f(x) = x 2 . Is f one-to-one? Is f onto? Is f bijective? yes This function is invertible. here
Background image of page 12
13 Functions - examples Suppose f: R R + , f(x) = x 2 . Is f one-to-one? Is f onto? Is f bijective? no yes This function is not invertible.
Background image of page 13

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

View Full DocumentRight Arrow Icon
14 Functions - examples Suppose f: R R, f(x) = x 2 . Is f one-to-one? Is f onto? Is f bijective? no
Background image of page 14
Background image of page 15

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

View Full DocumentRight Arrow Icon
16 Functions - composition Let f: A B, and g: B C be functions. Then the composition of f and g is: (f o g)(x) = f(g(x)) Note: (f o g) cannot be defined unless the range of g is a subset of the domain of f.
Background image of page 16
Image of page 17
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 01/16/2010 for the course CS 2800 at Cornell University (Engineering School).

Page1 / 56

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

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

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