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.

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

COUNTING AND PROBABILITY
Week 7 - Wednesday.  What did we talk about last time?  Set proofs and disproofs  Russell’s paradox.
Functions, Pigeonhole Principle Lecture 14: Nov 4 A B f( ) =
Discrete Structures Chapter 5 Pigeonhole Principle Nurul Amelina Nasharuddin Multimedia Department.
Discrete Structures Chapter 5 Relations and Functions Nurul Amelina Nasharuddin Multimedia Department.
Discrete Mathematics Lecture 2 Logic of Quantified Statements,
Terminology Domain: set which holds the values to which we apply the function Co-domain: set which holds the possible values (results) of the function.
Discrete Mathematics Lecture 7 Alexander Bukharovich New York University.
Discrete Structures Chapter 5 Relations and Functions
Terminology Domain: set which holds the values to which we apply the function Co-domain: set which holds the possible values (results) of the function.
Functions f( ) = A B Lecture 15: Nov 4.
1 Discrete Math CS 2800 Prof. Bart Selman Module Basic Structures: Functions and Sequences.
Pigeonhole.
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,
Discrete Mathematics Lecture 7 Harper Langston New York University.
CS 2210 (22C:019) Discrete Structures Sets and Functions Spring 2015 Sukumar Ghosh.
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.
Functions A B f( ) =. This Lecture We will define a function formally, and then in the next lecture we will use this concept in counting. We will also.
Cardinality of Sets Section 2.5.
2.1 Sets 2.2 Set Operations 2.3 Functions ‒Functions ‒ Injections, Surjections and Bijections ‒ Inverse Functions ‒Composition 2.4 Sequences and Summations.
Foundations of Discrete Mathematics Chapter 3 By Dr. Dalia M. Gil, Ph.D.
Week 15 - Wednesday.  What did we talk about last time?  Review first third of course.
ICS 253: Discrete Structures I
1 Lecture 3 (part 3) Functions – Cardinality Reading: Epp Chp 7.6.
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.
Discrete Mathematics and Its Applications Sixth Edition By Kenneth Rosen Copyright  The McGraw-Hill Companies, Inc. Permission required for reproduction.
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.
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: Sets, Functions, Sequences, and Sums CSC-2259 Discrete Structures Konstantin Busch - LSU1.
1 Melikyan/DM/Fall09 Discrete Mathematics Ch. 7 Functions Instructor: Hayk Melikyan Today we will review sections 7.1 and 7.2.
Agenda Week 10 Lecture coverage: –Functions –Types of Function –Composite function –Inverse of a function.
Functions Section 2.3. Section Summary Definition of a Function. – Domain, Cdomain – Image, Preimage Injection, Surjection, Bijection Inverse Function.
Relations, Functions, and Countability
Discrete Mathematics R. Johnsonbaugh
11 DISCRETE STRUCTURES DISCRETE STRUCTURES UNIT 5 SSK3003 DR. ALI MAMAT 1.
Mathematical Preliminaries
Fall 2015 COMP 2300 Discrete Structures for Computation Donghyun (David) Kim Department of Mathematics and Physics North Carolina Central University 1.
Introduction to Real Analysis Dr. Weihu Hong Clayton State University 8/27/2009.
Basic Structures: Sets, Functions, Sequences, and Sums.
Temperature Readings The equation to convert the temperature from degrees Fahrenheit to degrees Celsius is: c(x) = (x - 32) The equation to convert the.
1 Melikyan/DM/Fall09 Discrete Mathematics Ch. 7 Functions Instructor: Hayk Melikyan Today we will review sections 7.3, 7.4 and 7.5.
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.
Pigeonhole Principle. If n pigeons fly into m pigeonholes and n > m, then at least one hole must contain two or more pigeons A function from one finite.
Week 7 - Wednesday.  What did we talk about last time?  Proving the subset relationship  Proving set equality  Set counterexamples  Laws of set algebra.
Section 2.5. Cardinality Definition: A set that is either finite or has the same cardinality as the set of positive integers (Z + ) is called countable.
1 Lecture 5 Functions. 2 Functions in real applications Curve of a bridge can be described by a function Converting Celsius to Fahrenheit.
FUNCTIONS.
Week 8 - Monday.  What did we talk about last time?  Properties of functions  One-to-one  Onto  Inverses  Cardinality.
Week 8 - Wednesday.  What did we talk about last time?  Relations  Properties of relations  Reflexive  Symmetric  Transitive.
“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.
Function Hubert Chan (Chapter 2.1, 2.2) [O1 Abstract Concepts]
Discrete Mathematics Lecture 6
Discrete Mathematics Lecture 3 (and 4)
Discrete Mathematics CS 2610
Relations, Functions, and Matrices
Functions 1.
CS 2210:0001 Discrete Structures Sets and Functions
Discrete Mathematics Lecture 7
Relation and function.
Function Hubert Chan (Chapter 2.1, 2.2) [O1 Abstract Concepts]
Cardinality of Sets Section 2.5.
CSE15 Discrete Mathematics 02/27/17
Functions Rosen 2.3, 2.5 f( ) = A B Lecture 5: Oct 1, 2.
Functions Section 2.3.
Presentation transcript:

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 Pigeonhole Principle Section 7.4: Composition of functions Section 7.5: Cardinality

What is a function? A function f f : X → Y –Maps a set X to a set Y –is a relation between the elements of X (called the inputs) and the elements of Y (called the outputs) –with the property that each input is related to one and only one output. X is the domain. Y is the co-domain. The set of all values f(x) is called the range.

How do we represent functions Arrow diagrams f : X → Y What is the domain? –{a,b,c,d} What is the co-domain? –{x, y, z, p, q, r, s} What is the range? –{x, y, p} What is the inverse image of y? –{a, c}

How do we represent functions? As Ordered Pairs f = { (a,y), (b,p), (c,y), (d,x) }

How do we represent functions? As machines

How do we represent functions? By Formula f(x) = 2x 2 + 3

Equality of functions Two functions, f and g, are equal if –Both map from set X to set Y –And –f(x) = g(x) for all x  X. If f(x) = SQRT(x^2) and g(x) = x, is f = g? Identity function, i is such that –i(x) = x for all x  X

The Logarithmic Function Log b x = y  b y = x Log 2 8 Log Log 3 3 n Log 5 1/25 Log a 1 for a > 0

“Well defined” function Remember: a function must map an input to a single, unique value F: R → R such that –f(x) = SQRT(-x 2 ) for all real numbers X. Why is this not well defined?

7.2: One-to-one and onto A function is f : X → Y is one-to-one when If f(x1) = f(x2), then x1 must be equal to x2. To show a function is one-to-one, assume f(a) = f(b) for arbitrary a and b. Show a = b.

One-to-one and finite sets See board

One-to-one example, infinite sets f(n) = 2n + 1 f(n) = n^2

Onto functions A function f : X → Y is onto if for every y in the co-domain, that is, every y  Y, there exist some x  X, such that f(x) = y. To prove something is onto, pick an arbitrary element in Y and find an x in X that maps to the y.

Onto functions and finite sets See board

Onto examples, infinite sets Show the following are or are not onto: f: Z → Z by f(n) = 2n + 1. f: Z → Z by f(n) = n + 5.

One-to-one correspondences If a function f : X → Y is both one-to-one and onto, there is a one-to-one correspondence (or bijection) from the set X to set Y. Show f: Z → Z by f(n) = n + 5 has a one- to-one correspondence.

Inverse functions If a function f : X → Y is has as one-to-one correspondence, the there is an inverse function f -1 : Y → X such that if f(x) = y, then f -1 (y) = x. f(x) = n + 5 What’s the inverse?

Exponential and Logarithmic functions Exp b (x) = b x for any x  R and b > 0. Log b (x) = y, for any x  R+ if x = b y Show log b (x/y) = log b (x) – log b (y) Hint: Let u = log b (x) and v = log b (y)

7.3: The Pigeonhole Principle Suppose X and Y are finite sets and N(X) > N(Y). Then a function f : X → Y cannot be one-to-one. Proof by contradiction.

Using the Pigeonhole Principle Prove there must be at least 2 people in New York city with the same number of hairs on their head. How many integers must you pick in order for them to have at least one pair with the same remainder when divided by 3.

The Generalized Pigeon Hole Principle For any function f from a finite set X to a finite set Y and for any positive integer k, if N(X) > k*N(Y), then there is some y  Y such that the inverse image of y has at least k+1 distinct elements of X. If you have 85 people, and there are 26 possible initials of their last name, at least one initial must be used at least ___ times.

Pigeonhole In a group of 1,500 people, must at least five people have the same birthday?

7.4 Composition of Functions

Composition of functions The composition of two functions occurs when the output of one function is the input to another. Let f: X → Y’ and g: Y → Z where the range of f is a subset of the domain of g. Define a new function g  f(x) = g(f(x)).

Composition Examples F(n) = n + 1 and g(n) = n 2 What is f  g? What is g  f?

Composition of one-to-one functions If both f and g are one-to-one, is f  g one- to-one? Proof: See board If both f and g are onto, is f  g onto?

7.5 Cardinality The cardinality of a set is how many members it has. Let X and Y be sets. X has the same cardinality as Y iff there exists a one-to-one correspondence from X to Y. –X has the same cardinality as X (Reflexive) –If X has the same cardinality as Y, Y has the same cardinality as X (Symmetric) –If X has the same cardinality as Y, and Y has the same cardinality as Z, then x has the same cardinality as Z (Transitive).

Countable Sets A set X is countably infinite iff has the same cardinality as the set of positive integers. Is the set of all integers countable? F(n) = { 0 if n = 1 -n/2 if n is even (n-1)/2 if n is odd } Is this one-to-one? Onto?

Rational numbers are countable

The set of real numbers between 0 and 1 is uncountable. Uses Cantor’s Diagnolization Argument Proof by contradiction See board!! Any set with an uncountable subset is uncountable.

Some interesting results The set of all computer programs in a given computer language is countable. –How? –Each program is a finite set of strings. –Convert to binary. –Now each program is a unique number in the set of integers. –The set of all programs is a subset of the set of all integers. Therefore countable.