Chapter Four Functions. Section 4.1 A function from a set D to set R (f: D  R) is a relation from D to R such that each x in D is related to one and.

Slides:



Advertisements
Similar presentations
Form a Composite Functions and its Domain
Advertisements

6.7 Notes – Inverse Functions. Notice how the x-y values are reversed for the original function and the reflected functions.
1 Section 1.8 Functions. 2 Loose Definition Mapping of each element of one set onto some element of another set –each element of 1st set must map to something,
7.4 Inverse Functions p Review from chapter 2 Relation – a mapping of input values (x-values) onto output values (y-values). Here are 3 ways to.
Section 1.2 Basics of Functions
Functions.
Chapter 1 Functions and Graphs Copyright © 2014, 2010, 2007 Pearson Education, Inc Basics of Functions and Their Graphs.
Copyright © 2014, 2010, 2007 Pearson Education, Inc.
College Algebra Acosta/Karwowski. Chapter 5 Inverse functions and Applications.
Objectives Determine whether the inverse of a function is a function.
Chapter Relations & Functions 1.2 Composition of Functions
 Let A and B be any sets A binary relation R from A to B is a subset of AxB Given an ordered pair (x, y), x is related to y by R iff (x, y) is in R. This.
2.3 Functions A function is an assignment of each element of one set to a specific element of some other set. Synonymous terms: function, assignment, map.
Composite Functions Inverse Functions
Chapter 1 Functions and Their Graphs. 1.1 Rectangular Coordinates You will know how to plot points in the coordinate plane and use the Distance and Midpoint.
Representing Functions
ICS 253: Discrete Structures I
Relations, Functions, and Matrices Mathematical Structures for Computer Science Chapter 4 Copyright © 2006 W.H. Freeman & Co.MSCS SlidesFunctions.
Discrete Mathematics and Its Applications Sixth Edition By Kenneth Rosen Copyright  The McGraw-Hill Companies, Inc. Permission required for reproduction.
1 Discrete Structures – CNS 2300 Text Discrete Mathematics and Its Applications (5 th Edition) Kenneth H. Rosen Chapter 1 The Foundations: Logic, Sets,
1.4 Sets Definition 1. A set is a group of objects . The objects in a set are called the elements, or members, of the set. Example 2 The set of positive.
Example Prove that: “IF 3n + 2 is odd, then n is odd” Proof by Contradiction: -p = 3n + 2 is odd, q = n is odd. -Assume that ~(p  q) is true OR -(p 
Basic Structures: Functions Muhammad Arief download dari
Agenda Week 10 Lecture coverage: –Functions –Types of Function –Composite function –Inverse of a function.
Inverse Functions Given 2 functions, f(x) & g(x), if f(g(x))=x AND g(f(x))=x, then f(x) & g(x) are inverses of each other. Symbols: f -1(x) means “f.
5.2 Relations & Functions. 5.2 – Relations & Functions Evaluating functions Remember, the DOMAIN is the set of INPUT values and the RANGE is the set of.
11 DISCRETE STRUCTURES DISCRETE STRUCTURES UNIT 5 SSK3003 DR. ALI MAMAT 1.
MATH 224 – Discrete Mathematics
Basic Structures: Sets, Functions, Sequences, and Sums.
 Analyze and graph relations.  Find functional values. 1) ordered pair 2) Cartesian Coordinate 3) plane 4) quadrant 5) relation 6) domain 7) range 8)
7.5 Inverses of Functions 7.5 Inverses of Functions Objectives: Find the inverse of a relation or function Determine whether the inverse of a function.
Temperature Readings The equation to convert the temperature from degrees Fahrenheit to degrees Celsius is: c(x) = (x - 32) The equation to convert the.
Aim: How do we determine whether a function is one - to one, determine domain and range? Do Now: Determine whether the following function is onto (surjective)
1.4 Building Functions from Functions
1 Copyright © 2015, 2011, 2007 Pearson Education, Inc. Chapter 9-1 Exponential and Logarithmic Functions Chapter 9.
Chapter 7 – Radical Equations and Inequalities 7.2 – Inverse Functions and Relations.
FUNCTIONS COSC-1321 Discrete Structures 1. Function. Definition Let X and Y be sets. A function f from X to Y is a relation from X to Y with the property.
Relations and Functions ORDERED PAIRS AND CARTESIAN PRODUCT An ordered pair consists of two elements, say a and b, in which one of them, say a is designated.
Review Relation – a mapping of input values (x-values) onto output values (y-values). Here are 3 ways to show the same relation. y = x 2 x y
Section 2.6 Inverse Functions. Definition: Inverse The inverse of an invertible function f is the function f (read “f inverse”) where the ordered pairs.
Functions CSRU1400 Spring 2008Ellen Zhang 1 CISC1400, Fall 2010 Ellen Zhang.
7.4 Inverse Functions p. 422 What is an inverse relation? What do you switch to find an inverse relation? What notation is used for an inverse function?
Inverse Functions. Definition A function is a set of ordered pairs with no two first elements alike. f(x) = { (x,y) : (3, 2), (1, 4), (7, 6), (9,12) }
1 Lecture 5 Functions. 2 Functions in real applications Curve of a bridge can be described by a function Converting Celsius to Fahrenheit.
Chapter 2 1. Chapter Summary Sets The Language of Sets - Sec 2.1 – Lecture 8 Set Operations and Set Identities - Sec 2.2 – Lecture 9 Functions and sequences.
Review Chapter 1 Functions and Their Graphs. Lines in the Plane Section 1-1.
FUNCTIONS.
Objectives: 1)Students will be able to find the inverse of a function or relation. 2)Students will be able to determine whether two functions or relations.
Section 1.2 Functions and Graphs.
Copyright © 2014, 2010, 2007 Pearson Education, Inc.
MATH 224 – Discrete Mathematics
Relation and function.
6.1 One-to-One Functions; Inverse Function
Copyright © 2014, 2010, 2007 Pearson Education, Inc.
2-1 Relations and Functions
Copyright © 2014, 2010, 2007 Pearson Education, Inc.
One-to-One Functions and Inverse Functions
Copyright © 2014, 2010, 2007 Pearson Education, Inc.
Inverse Functions.
4.1 One-to-One Functions; Inverse Function
Copyright © 2014, 2010, 2007 Pearson Education, Inc.
Ch 5 Functions Chapter 5: Functions
6.1 One-to-One Functions; Inverse Function
6.4 Use Inverse Functions.
3 Inverse Functions.
Sec. 2.7 Inverse Functions.
7.4 Inverse Functions p. 422.
RELATIONS & FUNCTIONS CHAPTER 4.
Alegebra 2A Function Lesson 1 Objective: Relations, and Functions.
7.4 Inverse Functions.
Presentation transcript:

Chapter Four Functions

Section 4.1 A function from a set D to set R (f: D  R) is a relation from D to R such that each x in D is related to one and only one y in R. D is called the domain of the function and R is called the range of the function. Note: every function is a relation but not every relation is a function. Ex: The cost of gold is a function of its weight.

Functions Functions are represented by cloud diagrams. XtXt f(x) f(t)

Functions Ex1: If f(x)=x+2 is used as a formula that defines a function from {-1,0,1,2} to {1,2,3,4}, what relation defines f?? Solution: f = {(-1,1),(0,2),(1,3),(2,4)}

Functions Ex2: The relation R ={(a,2),(a,3),(b,4),(c,5)} is not a function from D={a,b,c} to R={2,3,4,5}, why?

Functions Ex3: The relation {(a,3),(c,2)} from the domain {a,b,c} to the range {2,3,4,5} is not a function. why?

Functions To determine if a relation is a function: 1- each element in the domain is related to an element in the range. 2- no element in the domain is related to more than one element in the range.

Functions A function can have 2 or 3 variables or more. f(x,y)= xy+x^2 G(x,y,z)= x+2y+z

One to one functions A function is one to one (or injection) if different elements of the domain are related to different elements of the range. Ex: c a 1 23 b 4 d

Is the following one-to-one? Why? a bcd

Onto functions A function is called onto (surjection) if each element of the range is related to at least one element in the domain. Ex: 1 23 a bcd

Bijection functions A function is one to one and onto (bijection) or one to one correspondence if each element in the range is related to one and only one element of the domain. Ex: a bcd 123 4

Functions Ex4: Determine whether each if the following is a function, if so is it onto? Is it one to one? 1- D= {a,b,c,d} R={1,2,3,4} F= { (a,1),(a,2),(b,1), (c,2), (d,3)} 2- D= {-2,-1,0,1,2} R= {0,1,4} F(x)=x^2 3- D= {-2,-1,0,1,2} R= {0,1,2,3,4} F(x)=x^2 4- D= {0,1,2} R= {0,1,4} F(x)=x^2

The image of a function The set of range values actually related to some domain elements is called the image of a function.

Sequences, n-tuples and sums A function whose domain is a set of consecutive integers is called a sequence. Ex: If s (i)=i for each i>=0, then s is a sequence. Si is the ith term of the sequence.

Sequences, n-tuples and sums Ex5: Write the third term of the sequence Si= i(i-1)+1 for i>=1 Solution: s3=3(2)+1=7

Sequences, n-tuples and sums Ex6: Write the first 5 terms for the sequence si=i^2+2, for i>=0 Solution: S0= 2 S1= 3 S2=6 S3=11 S4=18

Sequences, n-tuples and sums Ex7: Find a formula for the ith term of the sequence 1,4,9,16,25. For what values of i is your formula valid? Solution: s i =i^2, i>=1

Sequences, n-tuples and sums (1,2,4,9,16) is a 5-tuple. Order is important.

Summing Finite Sequences ∑ ai (i=m, n) = am + am+1 + am+2 +…..+an Ex8: Find ∑ i^2 (i=1, 3). Solution: 1+4+9=14 Ex9: Find ∑ 2j-1 (j=0, 4). Solution: =15

Gauss’s Formula ∑ i (i=1, n) = n(n+1)/2 Proof given in class.

Summing Finite Sequences Theorem: - ∑(ai+bi) (i=m,n) = ∑ ai (i=m,n) + ∑ bi (i=m,n) - ∑cai (i=m,n)= c ∑ai (i=m,n) - ∑c (i=m,n)= c(n-m+1) Theorem: The sum of the arithmetic series ∑(a*i+b) (i=1,n) = an(n+1)/2+nb *proof given in class

Summing Finite Sequences Ex: solve ∑(3i-1)(i=1,10)

Section 4.2 Cartesian graphs The Cartesian graph of a relation R consists of all points (x,y) in the plane such that x is related to y by R ( that is, (x,y) ε R or xRy). Ex: Graph of - X 2 +y 2 =1 - Y=X 2 - Y=X 3 - Y=x - Y=2 x Graphs drawn in class

Functions Vertical lines are used to determine whether a certain relation is a function Horizontal lines are used to determine whether a function is one to one or onto. If all vertical lines cross the graph exactly once over a certain domain then the graph is a function on that domain If the horizontal lines cross the function’s graph more than once it is not one to one. If there are horizontal lines that do not cross the function’s graph on a certain range, the function is not onto on that range.

Composition and Inverse The composition of function f with a function g is the relation f g (f composed with g) that contains the pair (x,y) if and only if y=f(g(x)) (f of g of x) The image of g must be a subset of the domain of f in order for f g to be defined

Composition and Inverse Find f(g(x)) 1- f = { (1,-1), (2,-2),(3,-3),(4,-4),(5,-5)} g= { (1,3), (2,4), (3,5)} 2- f(y) = y 3 +1 g(x)= x 1/3 3- f(x)= x 3 +1 g(x)= (x-1) 1/3

Composition and Inverse Ex: 454g in 1 lb 16 oz in 1lb P(x)= x/16 G(x)= 454x Find the equation that converts from ounces (oz) to pounds (lb)

Inverses Whenever f and g are two functions such that f(g(x))=x and g(f(y))=y for each x in the domain of g and each y in the domain of f, we say that f and g are inverses of each other, f is the inverse of g and g is the inverse of f Theorem: A function g from D to R has an inverse if and only if g is one to one. The domain of g -1 is the image of g.

Inverse Ex: G(x) = x 3 -1 Find the inverse and its domain

Inverse Theorem: If g is one to one, the points on the graph of g -1 may be obtained by interchanging the x and y coordinates of the points on the graph of g. Ex: Find the inverse of y=x 3 and its graph Ex: F(x) = 2 x is to one from R to R + Find the inverse and its graph

Section 4.3 ( Growth Rate of Functions) Algorithm smallest Input: a list of numbers in any order Output: a list of the same numbers with the smallest first Steps: For i from 2 to n do: If (the number in position i < the number in position 1) Then exchange both numbers Example: apply algorithm on 5,2,1,3 and on 5,4,3,2 for the worst case - Find the total time taken by the algorithm

Quadratic time algorithms Selection Sort For(i=0; i<=n-2; i++) { L= min-position(iteration,n-1); Exchange (list [iteration], list [L]); } - Apply on 8,2,4,0,1,3 - Find the total time taken by the algorithm

Growth Rate of Functions We say that f is a big O of g, or f(x) = O(g(x)), If there is a constant c>0 and a number N such that for all x>N, f(x) <= c.g(x) Ex: f(x)= x 2 g(x)= x 3 Show that f(x) = O(g(x))

Growth Rate of Functions Consider F(n) = 3n 2 +2n G(n)= n 2 Show that f(n)= O(g(n))

Growth Rate of Functions If lim x  ∞ g(x)/f(x) = ∞ Then g(x) is not O(f(x)) If lim x  ∞ g(x)/f(x) = 0 Then g(x)=O(f(x)), but not vise versa If lim x  ∞ g(x)/f(x) = c, where c is constant ≠ 0 Then f(x)=O(g(x)) and g(x)=O(f(x))

Growth Rate of Functions Ex: f(x)= 10x G(x)= x 2 H(x)=x 3 Is f(x) = O(g(x))? Is G(x)=O(h(x))? Is G(x)=O(f(x))?

Growth Rate of Functions Ex: F(x)=2x G(x)=4x

Growth Rate of Functions Theorem For any real number r, x= O(2 x ) and 1- 2 x is not O(x r ) 2- logx = O(x r ) 3- x r is not O(logx)

Growth Rate of Functions Ex: F(x)= x x G(x)= x 2x

Growth Rate of Functions 1- constants 2- log(log(x)) 3- log(x) 4- (log(x)) n 5- (x) 1/k 6- x 7- x 2 8- x n 9- 2 x 10- x!

Theorem F(x) is of order g(x) means that f(x)= O(g(x)) and g(x)= O(f(x)) Ex: Which of the following functions are O(x 2 ) and which of them are of order x 2 ? - f(x) = 2x(x) 1/2 - f(x)= x 2 +(x) 1/2 - F(x)=x 3 +(x) 1/2 - F(x)=(x 3 +1)/x