Lecture # 18 Types of Functions

Slides:



Advertisements
Similar presentations
Functions Reading: Epp Chp 7.1, 7.2, 7.4
Advertisements

1.6 Functions. Chapter 1, section 6 Functions notation: f: A B x in A, y in B, f(x) = y. concepts: –domain of f, –codomain of f, –range of f, –f maps.
Discrete Structures Chapter 5 Relations and Functions Nurul Amelina Nasharuddin Multimedia Department.
Lecture 3 Set Operations & Set Functions. Recap Set: unordered collection of objects Equal sets have the same elements Subset: elements in A are also.
CSE115/ENGR160 Discrete Mathematics 02/16/12 Ming-Hsuan Yang UC Merced 1.
Functions Goals Introduce the concept of function Introduce injective, surjective, & bijective 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,
Functions.
Chapter 7 Functions Dr. Curry Guinn. Outline of Today Section 7.1: Functions Defined on General Sets Section 7.2: One-to-One and Onto Section 7.3: The.
Functions. Let A and B be sets A function is a mapping from elements of A to elements of B and is a subset of AxB i.e. can be defined by a set of tuples!
1 CMSC 250 Chapter 7, Functions. 2 CMSC 250 Function terminology l A relationship between elements of two sets such that no element of the first set is.
Section 1.8: Functions A function is a mapping from one set to another that satisfies certain properties. We will first introduce the notion of a mapping.
Sets Set Operations Functions. 1. Sets 1.1 Introduction and Notation 1.2 Cardinality 1.3 Power Set 1.4 Cartesian Products.
2.1 Sets 2.2 Set Operations 2.3 Functions ‒Functions ‒ Injections, Surjections and Bijections ‒ Inverse Functions ‒Composition 2.4 Sequences and Summations.
FUNCTION Discrete Mathematics Asst. Prof. Dr. Choopan Rattanapoka.
Mathematics. Session Set, Relation & Function Session - 3.
February 12, 2015Applied Discrete Mathematics Week 2: Functions and Sequences 1Exercises Question 1: Given a set A = {x, y, z} and a set B = {1, 2, 3,
Functions. Copyright © Peter Cappello2 Definition Let D and C be nonempty sets. A function f from D to C, for each element d  D, assigns exactly 1 element.
Discrete Mathematics and Its Applications Sixth Edition By Kenneth Rosen Copyright  The McGraw-Hill Companies, Inc. Permission required for reproduction.
Fall 2002CMSC Discrete Structures1 … and the following mathematical appetizer is about… Functions.
10/26/20151 … and the following mathematical appetizer is about… Functions.
1 Annoucement n Skills you need: (1) (In Thinking) You think and move by Logic Definitions Mathematical properties (Basic algebra etc.) (2) (In Exploration)
Discrete Mathematics CS 2610 September 12, Agenda Last class Functions  Vertical line rule  Ordered pairs  Graphical representation  Predicates.
Dr. Eng. Farag Elnagahy Office Phone: King ABDUL AZIZ University Faculty Of Computing and Information Technology CPCS 222.
Functions1 Elementary Discrete Mathematics Jim Skon.
Chapter 9 Functions Let A and B be nonempty sets. A function f from A to B, written f: A  B is a relation from A to B with the property that every element.
Functions Reading: Chapter 6 (94 – 107) from the text book 1.
Basic Structures: Functions Muhammad Arief download dari
CSE 2353 – October 1 st 2003 Functions. For Real Numbers F: R->R –f(x) = 7x + 5 –f(x) = sin(x)
Agenda Week 10 Lecture coverage: –Functions –Types of Function –Composite function –Inverse of a function.
What is a set? A set is a collection of objects.
Discrete Mathematics Lecture # 15 Types of Relations (contd.)
Basic Structures: Sets, Functions, Sequences, and Sums.
Sets Definition: A set is an unordered collection of objects, called elements or members of the set. A set is said to contain its elements. We write a.
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)
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.
Discrete Mathematics Lecture # 19 Inverse of Functions.
1 Lecture 5 Functions. 2 Functions in real applications Curve of a bridge can be described by a function Converting Celsius to Fahrenheit.
Section 2.3. Section Summary  Definition of a Function. o Domain, Cdomain o Image, Preimage  One-to-one (Injection), onto (Surjection), Bijection 
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.
FUNCTIONS.
Discrete Mathematics Lecture # 17 Function. Relations and Functions  A function F from a set X to a set Y is a relation from X to Y that satisfies the.
Functions 7/7/2016COCS - Discrete Structures1. Functions A function f from a set A to a set B is an assignment of exactly one element of B to each element.
Functions Goals Introduce the concept of function
Function Hubert Chan (Chapter 2.1, 2.2) [O1 Abstract Concepts]
Functions Section 2.3.
Applied Discrete Mathematics Week 2: Functions and Sequences
Properties of Functions
Chapter 2 Sets and Functions.
Relation and function.
Function Hubert Chan (Chapter 2.1, 2.2) [O1 Abstract Concepts]
Chapter 3 Relation and Function Homework 4 For each of the following relations on set A = { 1,2,3,4 }, check each of them whether they are reflexive, irreflexive,
CALCULUS AND ANALYTIC GEOMETRY CS 001 LECTURE 02.
… and the following mathematical appetizer is about…
Functions Section 2.3.
CSE15 Discrete Mathematics 02/27/17
CS100: Discrete structures
… and the following mathematical appetizer is about…
Functions CS 202 Epp section 7.1.
Functions.
Copyright © Cengage Learning. All rights reserved.
Introduction to Relations and Functions
Ch 5 Functions Chapter 5: Functions
Chapter 5: Exponential and Logarithmic Functions
Functions Rosen 2.3, 2.5 f( ) = A B Lecture 5: Oct 1, 2.
Functions.
Functions Section 2.3.
REVISION Relation. REVISION Relation Introduction to Relations and Functions.
Copyright © Zeph Grunschlag,
Presentation transcript:

Lecture # 18 Types of Functions Discrete Mathematics Lecture # 18 Types of Functions

INJECTIVE FUNCTION or ONE-TO-ONE FUNCTION Let f: X Y be a function. f is injective or one-to-one if, and only if,  x1, x2 X, if x1  x2 then f(x1)  f(x2) That is, f is one-to-one if it maps distinct points of the domain into the distinct points of the co-domain.

INJECTIVE FUNCTION or ONE-TO-ONE FUNCTION A one-to-one function separates points.

FUNCTION NOT ONE-TO-ONE A function f: X Y is not one-to-one iff there exist elements x1 and x2 such that x1  x2 but f(x1) = f(x2). That is, if distinct elements x1 and x2 can found in domain of f then they have the same function value.

FUNCTION NOT ONE-TO-ONE A function that is not one-to-one collapses points together.

Example Which of the arrow diagrams define one-to-one functions?

ALTERNATIVE DEFINITION FOR ONE-TO-ONE FUNCTION: A function f: X Y is one-to-one (1-1) iff  x 1, x2 X, if x1  x2 then f(x1)  f(x2 ) The equivalent contra-positive statement for this implication is x1, x2 X, if f(x1 ) = f(x2), then x1 = x2

Example Define f: R R by the rule f(x) = 4x - 1 for all x R Is f one-to-one? Prove or give a counter example.

Solution Let x1, x2 R such that f(x1) = f(x2)  4x1 - 1 = 4 x2 – 1 (by definition of f)  4 x1 = 4 x2 (adding 1 to both sides)  x1 = x2 (dividing both sides by 4) Thus we have shown that if f(x1) = f(x2) then x1=x2 Therefore, f is one-to-one

Example Define g : Z  Z by the rule g(n)=n2 for all n Z Is g one-to-one? Prove or give a counter example.

Solution Let n1, n2 Z and suppose g(n1) = g(n2)  n12 = n22 (by definition of g)  either n1 = + n2 or n1 = - n2 Thus g(n1) = g(n2) does not imply n1 = n2 always. As a counter example, let n1 = 2 and n2 = -2. Then g(n1) = g(2) = 22 = 4 and also g(n2) = g(-2) = (-2) 2 = 4 Hence g(2) = g(-2) where as 2 -2 and so g is not one-to-one.

Exercise Find all one-to-one functions from X = {a,b} to Y = {u,v} There are two one-to-one functions from X to Y defined by the arrow diagrams.

Exercise How many one-to-one functions are there from a set with three elements to a set with four elements. Let X = { x 1,x 2, x 3} and Y = {y 1,y 2,y 3,y 4} x1 may be mapped to any of the 4 elements of Y. Then x2 may be mapped to any of the remaining 3 elements of Y & finally x3 may be mapped to any of the remaining 2 elements of Y. Hence, total no. of one-to-one functions from X to Y are 4 × 3 × 2 = 24

Exercise How many one-to-one functions are there from a set with three elements to a set with two elements Let X = {x 1, x 2, x 3} and Y = {y 1, y 2}

GRAPH OF ONE-TO-ONE FUNCTION: A graph of a function f is one-to-one iff every horizontal line intersects the graph in at most one point.

SURJECTIVE FUNCTION or ONTO FUNCTION: Let f: XY be a function. f is surjective or onto if, and only if, y  Y,  x  X such that f(x) = y. That is, f is onto if every element of its co-domain is the image of some element(s) of its domain .i.e., co-domain of f = range of f

Example Which of the arrow diagrams define onto functions?

Example Define f: R R by the rule f(x) = 4x-1 for all x R Is f onto? Prove or give a counter example.

Solution

Example Define h: Z Z by the rule h(n) = 4n - 1 for all n  Z Is h onto? Prove or give a counter example.

GRAPH OF ONTO FUNCTION: A graph of a function f is onto iff every horizontal line intersects the graph in at least one point.

Solution

Exercise Let X = {1,5,9} and Y = {3,4,7}. Define g: X Y by specifying that g(1) = 7, g(5) = 3, g(9) = 4 Is g one-to-one? Is g onto?

Solution g is one-to-one because each of the three elements of X are mapped to a different elements of Y by g. g(1)  g(5), g(1)  g(a), g(5)  g(a) g is onto as well, because each of the three elements of co-domain Y of g is the image of some element of the domain of g. 3 = g(5), 4 = g(9), 7 = g(1)

Exercise Define f: P({a,b,c})Z as follows: for all AP ({a,b,c}), f(A)= the number of elements in A. Is f one-to-one? Justify. Is f onto? Justify.

Solution f is not one-to-one because f({a}) = 1 and f({b}) = 1 but {a} {b} f is not onto because, there is no element of P({a,b,c}) that is mapped to 4 Z.

Exercise Determine if each of the functions is injective or surjective. a. f: Z Z+ define as f(x) = |x| b. g: Z+  Z+  Z+ defined as g(x) = (x , x+1)

Solution

BIJECTIVE FUNCTION or ONE-TO-ONE CORRESPONDENCE A function f: XY that is both one-to-one (injective) and onto (surjective) is called a bijective function or a one-to-one correspondence.

Example The function f: XY defined by the arrow diagram is both one-to-one and onto; hence a bijective function.

Example Let f: R R be defined by the rule f(x) = x3. Show that f is a bijective. Solution

Solution

GRAPH OF BIJECTIVE FUNCTION: A graph of a function f is bijective iff every horizontal line intersects the graph at exactly one point.

IDENTITY FUNCTION ON A SET: Given a set X, define a function ix from X to X by ix(x) = x from all x X. The function ix is called the identity function on X because it sends each element of X to itself.

Example Let X = {1,2,3,4}. The identity function ix on X is represented by the arrow diagram

Exercise Let X be a non-empty set. Prove that the identity function on X is bijective. Solution Let ix: X X be the identity function defined as ix(x) = x X 1. ix is injective (one-to-one) Let ix(x1) = ix(x2) for x1, x2 X  x1 = x2 (by definition of ix) Hence ix is one-to-one.

Solution 2. ix is surjective (onto) Let y X (co-domain of ix) Then there exists y X (domain of ix) such that ix (y) = y Hence ix is onto. Thus, ix being injective and surjective is bijective.

Constant Function A function f:XY is a constant function if it maps (sends) all elements of X to one element of Y i.e.  x X, f(x) = c, for some c  Y REMARK: 1. A constant function is one-to-one iff its domain is a singleton. 2. A constant function is onto iff its co-domain is a singleton.

Example The function f defined by the arrow diagram is constant.