1 Discrete Structures – CNS 2300 Text Discrete Mathematics and Its Applications (5 th Edition) Kenneth H. Rosen Chapter 1 The Foundations: Logic, Sets,

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 Rosen 1.8.
Functions Section 2.3 of Rosen Fall 2008
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.
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!
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.
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.
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,
Discrete Maths Objectives to show the connection between relations and functions, and to introduce some functions with useful, special properties ,
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.
Chapter 2: Basic Structures: Sets, Functions, Sequences, and Sums (2)
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.
MSU/CSE 260 Fall Functions Read Section 1.8.
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 1 SETS, FUNCTIONs, ELEMENTARY LOGIC & BOOLEAN ALGEBRAs BY: MISS FARAH ADIBAH ADNAN IMK.
321 Section, Week 3 Natalie Linnell. Functions A function from A to B is an assignment of exactly one element of B to each element of A. We write f(a)
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)
Sets and Functions Contents  Set language  Basic knowledge on sets  Intervals  Functions (Mappings)
Agenda Week 10 Lecture coverage: –Functions –Types of Function –Composite function –Inverse of a function.
11 DISCRETE STRUCTURES DISCRETE STRUCTURES UNIT 5 SSK3003 DR. ALI MAMAT 1.
11 DISCRETE STRUCTURES DISCRETE STRUCTURES UNIT 5 SSK3003 DR. ALI MAMAT 1.
Basic Structures: Sets, Functions, Sequences, and Sums.
CSC102 - Discrete Structures Functions
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.
1 Discrete Mathematical Functions Examples.
1 Discrete Structures – CNS2300 Text Discrete Mathematics and Its Applications Kenneth H. Rosen (5 th Edition) Chapter 1 The Foundations: Logic, Sets,
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.
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.
Functions.
CSE15 Discrete Mathematics 02/27/17
CS100: Discrete structures
… and the following mathematical appetizer is about…
Functions CS 202 Epp section 7.1.
Functions.
Ch 5 Functions Chapter 5: Functions
… and the following mathematical appetizer is about…
Functions Rosen 6th ed., §2.3.
Properties of Functions
Functions Section 2.3.
Presentation transcript:

1 Discrete Structures – CNS 2300 Text Discrete Mathematics and Its Applications (5 th Edition) Kenneth H. Rosen Chapter 1 The Foundations: Logic, Sets, and Functions

2 Section 1.8 Functions

3 What is a Function? Let A and B be sets. A function 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 unique element of B assigned by the function f to the element a of A. If f is a function from A to B, we write

4 Domain and Codomain If f is a function from A to B, we say that A is the domain of f and B is the codomain of f abcdabcd f =f(2) DomainCodomain

5 Domain and Codomain If f is a function from A to B, we say that A is the domain of f and B is the codomain of f abcdabcd f =f(2) Domain Codomain 2 is the pre- image of b b is the image of 2

6 Domain and Range DomainCodomain f(x) = 2x

7 Domain and Range DomainCodomain f(x) = 2x Range

8 Let f 1 and f 2 be functions from A to R. Then f 1 + f 2 and f 1 f 2 are also functions from A to R defined by (f 1 + f 2 )(x) = f 1 (x) + f 2 (x) (f 1 f 2 )(x) = f 1 (x) f 2 (x)

9 Let f be a function from the set A to the set B and let S be a subset of A. The image of S is the subset of B that consists of the images of the elements of S. We denote the image of S by f(s), so that

10 One-to-one Functions A function f is said to be one-to-one, or injective, if and only if f(x) = f(y) implies that x = y for all x and y in the domain of f. A function is said to be an injection if it is one- to-one.

11 One-to-One Functions a b c x y z

12 NOT One-to-one functions a b c x y z

13 One-to-one functions???? f(x) = 3x+5 f(x) = x f(x) = x 3 f(x) = |x-1|

14 Strictly Increasing Functions A function f whose domain and codomain are subsets of the set of real numbers is called strictly increasing if f (a) f (b) whenever a<b and a and b are in the domain of f.

15 Strictly Increasing Function

16 Strictly Decreasing Function

17 Neither

18 Onto Functions A function f from A to B is called onto, or surjective, if and only if for every element there is an element with f(a)=b. A function f is called a surjection if it is onto.

19 Onto Function a b c x y z d Every element in the co- domain has something mapped to it.

20 NOT an Onto Function a b c x y z d There exists an element in the co- domain that does not have anything mapped to it.

21 Onto functions???? f(x) = 3x+5 f(x) = x f(x) = x 3 f(x) = |x-1|

22 One-to-One Correspondence The function f is a one-to-one correspondence, or a bijection, if it is both one-to-one and onto.

23 Bijections???? f(x) = 3x+5 f(x) = x f(x) = x 3 f(x) = |x-1|

24 Inverse Functions Let f be a one-to-one correspondence (bijection) from the set A to the 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 of f is denoted by f -1. Hence f -1 (b) = a when f(a) = b.

25 Inverse Functions f(x) = 2x+1 f(1) f(2) f(3) f(4) f -1 (3) f -1 (5) f -1 (7) f -1 (9)

26 Invertible Functions A one-to-one correspondence is called invertible since an inverse function can be defined for the function. f(x) = 2x + 1 f(x) = x f(x) = x 3

27 Composition of Functions Let g be a function from the set A to the set B and let f be a function from the set B to the set C. The composition of the functions f and g, denoted by is defined by

28 Composition of functions 2 f(x)=2x+1 5 g(x)=x 2 25 g(f(x)) = g(2x+1) = (2x+1) 2

29 Some Important Functions Ceiling Function Floor Function

30 Problems from the text Page , 5, 9, 15, 17, 23, 29, 35, 50, 53, 59 Homework will not be collected. However, you should do enough problems to feel comfortable with the concepts. For these sections the following problems are suggested.

31 finished