Download presentation
Presentation is loading. Please wait.
Published byCynthia White Modified over 9 years ago
1
Chapter 7 Functions Dr. Curry Guinn
2
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
3
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.
4
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}
5
How do we represent functions? As Ordered Pairs f = { (a,y), (b,p), (c,y), (d,x) }
6
How do we represent functions? As machines
7
How do we represent functions? By Formula f(x) = 2x 2 + 3
8
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
9
The Logarithmic Function Log b x = y b y = x Log 2 8 Log 10 1000 Log 3 3 n Log 5 1/25 Log a 1 for a > 0
10
“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?
11
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.
12
One-to-one and finite sets See board
13
One-to-one example, infinite sets f(n) = 2n + 1 f(n) = n^2
14
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.
15
Onto functions and finite sets See board
16
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.
17
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.
18
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?
19
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)
20
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.
21
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.
22
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.
23
Pigeonhole In a group of 1,500 people, must at least five people have the same birthday?
24
7.4 Composition of Functions
25
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)).
26
Composition Examples F(n) = n + 1 and g(n) = n 2 What is f g? What is g f?
27
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?
28
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).
29
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?
30
Rational numbers are countable
31
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.
32
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.
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.