Discrete Mathematics CS 2610 September 12, 2006. 2 Agenda Last class Functions  Vertical line rule  Ordered pairs  Graphical representation  Predicates.

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
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.
modified from UCI ICS/Math 6D, Fall Sets+Functions-1 Sets “Set”=Unordered collection of Objects “Set Elements”
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!
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.
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.
Functions.
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.
Relations and Functions Another Foundational Concept Copyright © 2014 – Curt Hill.
Mathematics. Session Set, Relation & Function Session - 3.
Foundations of Discrete Mathematics Chapter 3 By Dr. Dalia M. Gil, Ph.D.
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)
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.
Based on Rosen, Discrete Mathematics & Its Applications, 5e Prepared by (c) Michael P. Frank Modified by (c) Haluk Bingöl Module #4.
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 
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.
Functions. L62 Agenda Section 1.8: Functions Domain, co-domain, range Image, pre-image One-to-one, onto, bijective, inverse Functional composition and.
Basic Structures: Sets, Functions, Sequences, and Sums.
Discrete Mathematics CS 2610 February 10, Agenda Previously Functions And now Finish functions Start Boolean algebras (Sec. 11.1)
Discrete Mathematics CS 2610 January 27, part 2.
CSC102 - Discrete Structures Functions
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.
Functions CSRU1400 Spring 2008Ellen Zhang 1 CISC1400, Fall 2010 Ellen Zhang.
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 
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.
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.
Relation and function.
… and the following mathematical appetizer is about…
Functions Section 2.3.
CSE15 Discrete Mathematics 02/27/17
… and the following mathematical appetizer is about…
Functions CS 202 Epp section 7.1.
Functions.
Ch 5 Functions Chapter 5: Functions
ICS 253: Discrete Structures I
… and the following mathematical appetizer is about…
Functions Rosen 6th ed., §2.3.
Functions Rosen 2.3, 2.5 f( ) = A B Lecture 5: Oct 1, 2.
Lecture # 18 Types of Functions
Functions Section 2.3.
Copyright © Zeph Grunschlag,
Presentation transcript:

Discrete Mathematics CS 2610 September 12, 2006

2 Agenda Last class Functions  Vertical line rule  Ordered pairs  Graphical representation  Predicates as functions This class More on functions!

3 Function Terminology Given a function f:A  B A is the domain of f. B is the codomain of f. If f(a)=b, b is the image of a under f. a is a pre-image of b under f.  In general, b may have more than 1 pre-image. The range R of f (or image of f) is : R={b |  a f(a)=b } -- the set of all images For any set S  A, the image of S,  f(S) = { b  B |  a  S, b = f(a)} For any set T  B, the inverse image of T  f −1 (T) = { a  A | f(a)  T }

4 Example Mike Mario Kim Joe Jill John Smith Edward Jones Richard Boone f AB DomainCodomain The image of Mike under f is John Smith Mike is a pre-image of John Smith under f R (f) = {John Smith, Richard Boone} f(Mike,Mario,Jill) = {John Smith, Richard Boone} f -1 (Richard Boone) = {Joe, Jill}

5 Example Given a function f: Z  Z where f(x) = x 2 -- the domain of f is the set of all integers -- the codomain of f is the set of all integers -- the range of f is the set of all integers that are perfect squares {0, 1, 4, 9, 16, 25, …}

6 Function Composition Given the functions g:A  B and f:B  C, the composition of f and g, f ○ g: A  C defined as f ○ g (a) = f ( g (a) ) h b d o  f g A BC f ○ g (h) ?

7 Function Composition Properties Associative: Given the functions g:A  B and f:B  C and h:C  D then h ○ (f ○ g)  (h ○ f ) ○ g

8 Function Self-Composition A function f: A  A (the domain and codomain are the same) can be composed with itself f: People  People where f(x) is the father of x f ○ f (Mike) is the father of the father of Mike f ○ f ○ f (Mike) ? f ○ f ○ f ○ f(Mike) ?

9 Injective Functions (one-to-one) A function f: A  B is one-to-one (injective, an injection) iff f(x) = f(y)  x = y for all x and y in the domain of f (  x  y(f(x) = f(y)  x = y)) Equivalently:  x  y(x  y  f(x)  f(y)) Every b  B has at most 1 pre-image f AB

10 Surjective Functions (onto) A function f: A  B is onto (surjective, an surjection) iff  y  x( f(x) = y) where y  B, x  A Every b  B has at least one pre-image f AB

11 Bijective Functions A function f: A  B is bijective iff it is one-to-one and onto (a one-to-one correspondence) f The domain cardinality equals the codomain cardinality A B

12 Inverse Functions Let f : A  B be a bijection, the inverse of f, f -1 :B  A such that for any b  B, f -1 (b) = a when f (a) = b AB f f -1

13 Inverse Functions Let f: A  B be a bijection, and f -1 :B  A be the inverse of f: f -1 ○ f = I A = (f -1 ○ f)(a) = f -1 (f(a)) = f -1 (b) = a f ○ f -1 = I B = (f ○ f -1 )(b) = f(f -1 (b)) = f(a) = b AB f f -1

14 Functions: Real Functions Given f :R  R and g :R  R then (f  g): R  R, is defined as (f  g)(x) = f(x)  g(x) (f. g): R  R is defined as (f g)(x) = f(x) × g(x) Example: Let f :R  R be f(x) = 2x and g :R  R be g(x) = x 3 (f+g)(x) = x 3 +2x (f. g)(x) = 2x 4