RMIT University; Taylor's College

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

Course Outline. Lecture 1 Learning Objectives  To use set notations  To apply operations (union, intersection) on sets  To define de Morgan’s Laws.
Week 7 - Wednesday.  What did we talk about last time?  Set proofs and disproofs  Russell’s paradox.
Functions Section 2.3 of Rosen Fall 2008
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.
1 Discrete Math CS 2800 Prof. Bart Selman Module Basic Structures: Functions and Sequences.
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.
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!
Functions, Sequences, and Sums
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.
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,
Chapter 3 Functions Functions provide a means of expressing relationships between variables, which can be numbers or non-numerical objects.
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.
Week 7 - Friday.  What did we talk about last time?  Set disproofs  Russell’s paradox  Function basics.
Relations, Functions, and Matrices Mathematical Structures for Computer Science Chapter 4 Copyright © 2006 W.H. Freeman & Co.MSCS SlidesFunctions.
Fall 2002CMSC Discrete Structures1 … and the following mathematical appetizer is about… Functions.
10/26/20151 … and the following mathematical appetizer is about… Functions.
FUNCTIONS.
Functions Section 2.3 of Rosen Spring 2012 CSCE 235 Introduction to Discrete Structures Course web-page: cse.unl.edu/~cse235 Questions: Use Piazza.
MSU/CSE 260 Fall Functions Read Section 1.8.
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.
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)
Chapter 5 – Relations and Functions. 5.1Cartesian Products and Relations Definition 5.1: For sets A, B  U, the Cartesian product, or cross product, of.
CONTENT 1.ORDERED PAIRS 2.CARTESIAN PRODUCT OF SETS 3.RELATIONS 4.FUNCTIONS 5.ILLUSTRATIONS 6.REAL FUNCTIONS AND THEIR GRAPHS.
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.
MATH 224 – Discrete Mathematics
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
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 Functions CS 202 Epp section ??? Aaron Bloomfield.
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 3. MATRICES, RELATIONS, AND FUNCTIONS Lecture 6 Dr.-Ing. Erwin Sitompul
Week 7 - Wednesday.  What did we talk about last time?  Proving the subset relationship  Proving set equality  Set counterexamples  Laws of set algebra.
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.
“It is impossible to define every concept.” For example a “set” can not be defined. But Here are a list of things we shall simply assume about sets. A.
Discrete Mathematics Functions
Functions Goals Introduce the concept of function
Functions Section 2.3.
Relations, Functions, and Matrices
MATH 224 – Discrete Mathematics
Relation and function.
Functions Section 2.3.
Functions Section 2.3.
Copyright © Zeph Grunschlag,
Presentation transcript:

RMIT University; Taylor's College Lecture 2 Learning Objectives: To describe functions To define a “one-to-one” and “onto” function To apply and distinguish special kinds of functions (i.e. absolute value, floor and ceiling, logarithmic, exponential and polynomial) RMIT University; Taylor's College

RMIT University; Taylor's College Functions Let X and Y be sets. A function from X to Y is a relation that associates an element of Y to every element of X. f : X  Y f is a function from X to Y. 1 2 3 4 5 6 Y X a b c d f Notice that every element of X has exactly one arrow leaving it. RMIT University; Taylor's College

RMIT University; Taylor's College Functions X 1 2 3 4 5 6 Y a b c d f The set X is called the domain of the function f. The set Y is called the codomain of f. Each arrow takes an element of X to its image in Y. This image is denoted by f(x). f(a) = 3, f(b) = 1, f(c)= 3, and f(d) = 5 RMIT University; Taylor's College

RMIT University; Taylor's College Functions 1 2 3 4 5 6 Y X a b c d f The subset of Y consisting of all the images of the elements in X is called the range of f. It’s denoted by f(X). NOTE Some texts use “range” to mean “codomain”, and “image” instead of “range”. f(X) = {f(a), f(b), f(c), f(d)} = {3, 1, 3, 5} = {1, 3, 5} RMIT University; Taylor's College

Relations that are not functions Y X Y 1 2 3 4 5 1 2 3 4 5 6 X a b c d σ a b c d ρ Here ρ is not a function because some elements from X have no image. A function can be many-to-one, but not one-to-many. Here σ is not a function because some elements have more than one image. RMIT University; Taylor's College

RMIT University; Taylor's College Functions Note that functions is a subset of relations. A function can be regarded as a relation where every element of the first set occurs exactly once as the first coordinate of an ordered pair. The set {(x, f(x)): x є X} completely characterizes the function f (provided that we know the codomain Y) For that reason, sometimes we identify the two concepts and write f = {(x, f(x)): x є X} Explain this slide using the first example, connecting the idea of relation and function. RMIT University; Taylor's College

RMIT University; Taylor's College Functions 1 2 3 4 5 6 Y X a b c d f f(X) = {f(a), f(b), f(c), f(d)} = {3, 1, 3, 5} = {1, 3, 5} f = {(a, 3), (b,1), (c, 3), (d, 5)} RMIT University; Taylor's College

Special Kinds of Functions Functions may be: One-to-one Onto Both one-to-one and onto Neither one-to-one nor onto RMIT University; Taylor's College

RMIT University; Taylor's College One-to-one Function 1 2 3 4 5 Y f X a b c d A function f : XY is one-to-one (or injective, or an injection) if distinct elements of X have distinct images in Y. For RMIT University; Taylor's College

RMIT University; Taylor's College One-to-one Function v w x y z B A g m n s t Here, g is NOT one-to-one. We see that g(m) = g(n) = v. That is, m and n have the same image. RMIT University; Taylor's College

RMIT University; Taylor's College Onto Function 1 2 3 Z h X a b c d Is h one-to-one? The function h is an example of an “onto” function. Every element of Z receives at least one arrow. RMIT University; Taylor's College

Onto Function A function f : X  Y is onto (or surjective, or a surjection) if f(X) = Y The range is the whole of the codomain For every element y є Y, there exists x є X such that f(x) = y If f(x) = y, so that y is the image of x (under the action of f), we also say that x is a object of y So a function is onto if every element of the codomain has a object. Y X 1 2 3 4 f a b c Not onto. Note that 4 is not in the range. RMIT University; Taylor's College

One-to-one and Onto Function A function which is both injective (one-to-one) and surjective (onto) is said to be bijective or a bijection A bijection is also called a “one-to-one correspondence” For finite sets X and Y, there exists an injection from X to Y if and only if | X | ≤ | Y | There exists a surjection from X onto Y if and only if | X | ≥ | Y | Therefore, there exists a bijection if and only if | X | = | Y | Explanations: Injection: What happens if | X | > | Y |? Surjection: What happens if | X | < | Y |? RMIT University; Taylor's College

RMIT University; Taylor's College Examples | X | < | Y | | X | < | Y | X Y 1 2 3 4 X Y a b c f 1 2 3 4 a b c f One-to-one? No One-to-one? Yes Onto? No Onto? No RMIT University; Taylor's College

RMIT University; Taylor's College Examples | X | > | Y | | X | = | Y | Y X f a b c d 1 2 3 Y X 1 2 3 4 a b c d f One-to-one? No One-to-one? Yes Onto? Yes Onto? Yes RMIT University; Taylor's College

Some Special Functions Absolute value Floor and ceiling Factorial Exponential Logarithmic Polynomial RMIT University; Taylor's College

Absolute Value Floor and Ceiling Example: | -3 | = 3 Floor and ceiling = first integer ≤ x The absolute value, floor and ceiling functions can be applied to any real number. So their domain is R. = first integer ≥ x RMIT University; Taylor's College

Factorial Function n! = n(n – 1)! for n ≥ 1 This exists for every integer ≥ 0 (the nonnegative integers) If n ≥ 1, n! = n(n – 1)…3 ∙ 2 ∙ 1 When n = 0, 0! = 1 (special definition) n n! 1 2 3 4 5 … 6 24 120 ... n! = n(n – 1)! for n ≥ 1 This is an example of a recurrence relation A partial table RMIT University; Taylor's College

Exponential Functions An exponential function has the form y = ax for some constant 𝑎>0, 𝑎≠1 We call a the base and x the exponent. Then y = ax is a power of a RMIT University; Taylor's College

Exponential Functions For a > 1, an exponential function grows very rapidly So algorithms or programs that take exponential time or space can’t practically be implemented except for small values of the parameters On the other hand, if 0 < a < 1 we have a function that models radioactive decay. As x  ∞, y  0 and as x  - ∞, y  ∞. As x  ∞, y  ∞ (rapidly) and as x  - ∞, y  0. RMIT University; Taylor's College

RMIT University; Taylor's College Laws of Exponents Example Example Example Example RMIT University; Taylor's College

Logarithmic Functions We write y = loga x to mean that ay = x Here, y is the “log of x, to the base a” Example 1: Find the following a. log 5 25 = 𝑙𝑒𝑡 log 5 25 =𝑥 5 𝑥 =25 5 𝑥 = 5 2 𝑥=2 log 𝑎 𝑥=𝑦⇔ 𝑎 𝑦 =𝑥 RMIT University; Taylor's College

Logarithmic Functions b. log3 81 = ? Let log 3 81=𝑥 3 𝑥 =81 3 𝑥 = 3 4 𝑥=4 c. log2 128 = ? Let log 2 128=𝑥 2 𝑥 =128 2 𝑥 = 2 7 𝑥=7 RMIT University; Taylor's College

Logarithmic Functions d. log3 1 = ? Let log 3 1=𝑥 3 𝑥 =1 3 𝑥 = 3 0 𝑥=0 RMIT University; Taylor's College

RMIT University; Taylor's College Laws of Logarithms special cases RMIT University; Taylor's College

RMIT University; Taylor's College Example RMIT University; Taylor's College

RMIT University; Taylor's College Useful Bases log x = log10 x (many calculators) ln x = loge x (e ≈ 2.71828) lg x = log2 x (some texts) RMIT University; Taylor's College

RMIT University; Taylor's College Polynomial Functions A function of the form is called a polynomial function. The expression on the right of the “equals” sign is a polynomial. a general polynomial If an ≠ 0, this has degree n. RMIT University; Taylor's College

RMIT University; Taylor's College Examples of Polynomial Functions 𝑛=1, 𝑓 𝑥 is a Linear Functions Degree 1 𝑛=0, 𝑓 𝑥 is a Constant Functions y = a Degree 0 (except a = 0) y x a y = a y x y = ax + b b (slope a) RMIT University; Taylor's College

Examples of Polynomial Functions n=2, f(x) is a Quadratic Functions Degree 2 y x RMIT University; Taylor's College

The End