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.

Slides:



Advertisements
Similar presentations
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.
Advertisements

Functions Section 2.3 of Rosen Fall 2008
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,
CS 2210 (22C:019) Discrete Structures Sets and Functions Spring 2015 Sukumar Ghosh.
RMIT University; Taylor's College
Functions.
Functions, Sequences, and Sums
Discrete Structures Functions Dr. Muhammad Humayoun Assistant Professor COMSATS Institute of Computer Science, Lahore.
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.
Foundations of Discrete Mathematics Chapter 3 By Dr. Dalia M. Gil, Ph.D.
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.
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.
Fall 2002CMSC Discrete Structures1 … and the following mathematical appetizer is about… Functions.
10/26/20151 … and the following mathematical appetizer is about… Functions.
FUNCTIONS.
Discrete Mathematics CS 2610 September 12, Agenda Last class Functions  Vertical line rule  Ordered pairs  Graphical representation  Predicates.
Functions Section 2.3 of Rosen Spring 2012 CSCE 235 Introduction to Discrete Structures Course web-page: cse.unl.edu/~cse235 Questions: Use Piazza.
Dr. Eng. Farag Elnagahy Office Phone: King ABDUL AZIZ University Faculty Of Computing and Information Technology CPCS 222.
1 Discrete Structures – CNS 2300 Text Discrete Mathematics and Its Applications (5 th Edition) Kenneth H. Rosen Chapter 1 The Foundations: Logic, Sets,
Functions1 Elementary Discrete Mathematics Jim Skon.
Chapter 1 SETS, FUNCTIONs, ELEMENTARY LOGIC & BOOLEAN ALGEBRAs BY: MISS FARAH ADIBAH ADNAN IMK.
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 
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.
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.
CompSci 102 Discrete Math for Computer Science January 31, 2012 Prof. Rodger Slides modified from Rosen AB a b c d x y z.
Functions Section 2.3. Section Summary Definition of a Function. – Domain, Cdomain – Image, Preimage Injection, Surjection, Bijection Inverse Function.
Functions. L62 Agenda Section 1.8: Functions Domain, co-domain, range Image, pre-image One-to-one, onto, bijective, inverse Functional composition and.
11 DISCRETE STRUCTURES DISCRETE STRUCTURES UNIT 5 SSK3003 DR. ALI MAMAT 1.
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.
CSC102 - Discrete Structures Functions
Functions (Mappings). Definitions A function (or mapping)  from a set A to a set B is a rule that assigns to each element a of A exactly one element.
1 Functions CS 202 Epp section ??? Aaron Bloomfield.
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.
A function is a rule f that associates with each element in a set A one and only one element in a set B. If f associates the element b with the element.
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 Functions
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
Functions Section 2.3.
Relations, Functions, and Matrices
Applied Discrete Mathematics Week 2: Functions and Sequences
Functions.
Chapter 2 Sets and Functions.
… and the following mathematical appetizer is about…
Functions.
Functions Section 2.3.
Discrete Math (2) Haiming Chen Associate Professor, PhD
Functions.
CSE15 Discrete Mathematics 02/27/17
CS100: Discrete structures
… and the following mathematical appetizer is about…
Functions.
Ch 5 Functions Chapter 5: Functions
… and the following mathematical appetizer is about…
Functions Section 2.3.
Presentation transcript:

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 that, for each element, there is exactly one element such that x f y : Since any relation from X to Y is a subset of X x Y, a function is a subset S of X x Y such that for each there is a unique with 2

Functions Functions are also called mappings or transformations. We say that f maps X to Y 3 X Y f

Functions If f is a function from X to Y the sets X and Y are called the domain and codomain of the function, respectively. The unique element is called the image of and is a preimage of under f. The range of f is the set of all images of elements of X in Y. 4

Range If f is a function from X to Y and is a subset of the codomain such that (thus contains all the elements from Y that are paired with elements of the domain X), then is called the range of the function. 5

Function f : X →Y, X is the domain, Y is the codomain, is the range 6 X Y f is the range

Not a Function This relation is not a function because there is an element in X, which is not a preimage of any element in Y 7 X Y

Functions To define a function, it is necessary to specify its domain, its codomain and the mapping of elements of the domain to elements in the codomain Two functions are equal when they have the same domain, have the same codomain, and map elements of their common domain to the elements of their common codomain If we change either the domain or the codomain of a function, then we obtain a different function 8

Image Let f be a function from the set X to the set Y and. The image of S under the function f is a subset of Y that consists of the images of the elements of S 9

Image 10 X Y f F(S) is the image of S

One-to-one Function If f is a function from X to Y and no two distinct elements of the domain are assigned the same element in the codomain, then the function is called one-to-one (or injective). To show that a function f is one-to-one, it is necessary to show that 11

One-to-one Function 12 X Y f

Onto Function If the range and codomain of a function are equal, the function is called onto (or surjective) To show that a function f is onto, it is necessary to show that 13

Onto Function 14 YX f

One-to-one Correspondence A function, which is both one-to-one and onto is called a one-to-one correspondence (or bijection) To show that a function f is a one-to-one correspondence, it is necessary to show that thus, for each there is exactly one such that means “there exists exactly one” 15

One-to-one Correspondence 16 YX f

Useful properties Any one-to-one correspondence is onto and one-to-one Onto and one-to-one are not necessary one- to-one correspondences If onto is a one-to-one correspondence, it is also one-to-one If one-to-one is a one-to-one correspondence, it is also onto 17

Identity Function For any set X, the function is one-to-one correspondence. This function is called the identity function on X. 18

Inverse Function Let be a one-to-one correspondence, then for each there is exactly one such that. Hence we may define a function with domain Y and codomain X by associating to each the unique such that. This function is denoted by and is called the inverse of function f. 19

Inverse Function 20 YX f f -1

Inverse Function Theorem. Let is one-to-one correspondence. Then: is one-to-one correspondence The inverse function of is f., that is 21

Composition of Functions Let g be a function from X to Y and f be a function from Y to Z. Then it is possible to combine these two functions in a function f ○ g from X to Z. The function f ○ g is called the composition of f and g and is defined by taking the image of x under f ○ g to be f(g(x)): 22

Composition of Functions Composition f○g cannot be defined unless the range of g is a subset of the domain of f 23 XY Z

Exponential Function with base 2 The equation defines a function with the set of real numbers as its domain and the set of positive real numbers as its codomain. This function is called the exponential function with base 2. 24

Exponential Function with base n In general, the equation defines a function with the set of real numbers as its domain and the set of positive real numbers as its codomain. This function is called the exponential function with base n. 25

Logarithmic Function with base n Evidently, the exponential function with base n is a one-to-one correspondence because each element of the codomain is associated with exactly one element of the domain. This means that the exponential function with base n has and inverse g called the logarithmic function with base n: 26

Logarithmic Function with base n Particularly, the logarithmic function with base 2 is the inverse of the exponential function with base 2. The definition of an inverse function implies that if and only if : 27

Some other useful functions The floor function assigns to the real number x the largest integer that is ≤ x. The floor function at x is denoted The ceiling function assigns to the real number x the smallest integer that is ≥x. The ceiling function at x is denoted Examples: 28