Professional Documents
Culture Documents
Sets and functions are basic building blocks of cryptographic systems. There is no way to learn cryptography and computer security without the knowledge of sets and functions. Sets and functions are covered in school math., and also in any university course on discrete math. Every student should read this material as you may have forgotten sets and functions even if you learnt them as people do forget.
Lecture Topics
l l l l l l l l l
Sets and Members, Equality of Sets Set Notation The Empty Set and Sets of Numbers Subsets and Power Sets Equality of Sets by Mutual Inclusion Universal Sets, Venn Diagrams Set Operations Set Identities Proving Set Identities
Discrete Math. Reading Materials 3
Sets
l l
1 a b 2 3
Members, Elements
l
The objects that make up a set are called members or elements of the set. An object can be anything that is meaningful. For example, n a number n an equation n a person n another set
Discrete Math. Reading Materials 5
Equality of Sets
l
Two sets are equal iff they have the same members.
n
Does the statement a set is a collection of objects define what a set is? Let
n
the members of set A be -1 and 1, the members of set B be the roots of the equation x2 - 1 = 0. Are sets A and B equal?
Lecture Topics
l l l l l l l l l
Sets and Members, Equality of Sets Set Notation The Empty Set and Sets of Numbers Subsets and Power Sets Equality of Sets by Mutual Inclusion Universal Sets, Venn Diagrams Set Operations Set Identities Proving Set Identities
Discrete Math. Reading Materials 8
A set can be described by listing the comma separated members of the set within a pair of curly braces.
By the principle of extension, a set is determined by its members. For example, the following expressions are equivalent
n n n n
The fact that x is a member of S can be expressed as n x S The membership symbol can be read as n is in, is a member of, belongs to An Example n S = { 7, 13, 21, 47 }
n
7 S, 13 S, 21 S, 47 S
Notation n S = { x T | P(x) } n The members of S are members of a already known set T that satisfy property P. An example
n n n
Let Z be the set of integers. Let Z+ be the set of positive integers. Z+ = { x Z | x > 0 }
Discrete Math. Reading Materials 12
X={X}
13
Lecture Topics
l l l l l l l l l
Sets and Members, Equality of Sets Set Notation The Empty Set and Sets of Numbers Subsets and Power Sets Equality of Sets by Mutual Inclusion Universal Sets, Venn Diagrams Set Operations Set Identities Proving Set Identities
Discrete Math. Reading Materials 14
The empty set is also called the null set. It is the set that has no members. It is denoted as . Clearly, = { }. For any object x, x .
Discrete Math. Reading Materials 15
Z = { . . . , -2, -1, 0, 1, 2, . . . }
Z+ = The set of (all) positive integers n Z+ = { 1, 2, 3, } n Z+ = { x Z | x > 0 } Z- = The set of (all) negative integers n Z- = { . . . , -3, -2, -1 } = { -1, -2, -3, } n Z- = { x Z | x < 0 }
Discrete Math. Reading Materials 16
17
18
19
Lecture Topics
l l l l l l l l l
Sets and Members, Equality of Sets Set Notation The Empty Set and Sets of Numbers Subsets and Power Sets Equality of Sets by Mutual Inclusion Universal Sets, Venn Diagrams Set Operations Set Identities Proving Set Identities
Discrete Math. Reading Materials 20
Subsets
l
A is a subset of B, or B is a superset of A iff every member of A is a member of B. Notationally, n A B iff x, if x A, then x B. An example
n
Negation of
l
A is not a subset of B, or B is not a superset of A iff there is a member of A that is not a member of B. Notationally n A B iff x, x A and x B. Example n { 2, 4 } { 2, 3 }
22
Obvious Subsets
l l l
SS S Vacuously true
n
By contradiction,
n
Proper Subsets
l
A is a proper subset of B, or B is a proper superset of A iff A is a subset of B and A is not equal to B. Notationally n A B iff A B and A B Examples
n n
If S , then S. Z+ Z Q R
Discrete Math. Reading Materials 24
Power Sets
l
The set of all subsets of a set is called the power set of the set. The power set of S is P(S). Examples
n n n
P( ) = { } P( { 1, 2 } ) = { , { 1 }, { 2 }, { 1, 2 } } P( S ) = { , , S }
Discrete Math. Reading Materials 25
Examples
n n n
26
27
Lecture Topics
l l l l l l l l l
Sets and Members, Equality of Sets Set Notation The Empty Set and Sets of Numbers Subsets and Power Sets Equality of Sets by Mutual Inclusion Universal Sets, Venn Diagrams Set Operations Set Identities Proving Set Identities
Discrete Math. Reading Materials 28
Mutual Inclusion
Sets A and B have the same members iff they mutually include n A B and B A That is, A = B iff A B and B A.
29
30
Recall that Z = The set of (all) integers. Let A = { x Z | x = 2 m for some m Z } Let B = { y Z | y = 2 n - 2 for some n Z } To show A B, note that n 2m = 2(m+1) - 2 = 2n-2 To show B A, note that n 2n-2 = 2(n-1) = 2m That is, A = B. In fact, A, B both denote the set of even integers.
Discrete Math. Reading Materials 31
l l
32
Lecture Topics
l l l l l l l l l
Sets and Members, Equality of Sets Set Notation The Empty Set and Sets of Numbers Subsets and Power Sets Equality of Sets by Mutual Inclusion Universal Sets, Venn Diagrams Set Operations Set Identities Proving Set Identities
Discrete Math. Reading Materials 33
Universal Sets
l
Depending on the context of discussion, n define a set U such that all sets of interest are subsets of U. n The set U is known as a universal set. For example, n when dealing with integers, U may be Z n when dealing with plane geometry, U may be the set of all points in the plane
34
Venn Diagrams
l l
To visualise relationships among some sets Each subset (of U) is represented by a circle inside the rectangle
35
36
Lecture Topics
l l l l l l l l l
Sets and Members, Equality of Sets Set Notation The Empty Set and Sets of Numbers Subsets and Power Sets Equality of Sets by Mutual Inclusion Universal Sets, Venn Diagrams Set Operations Set Identities Proving Set Identities
Discrete Math. Reading Materials 37
Set Operations
l l
Let A, B be subsets of some universal set U. The following set operations create new sets from A and B. Union n A B = { x U | x A or x B } Intersection n A B = { x U | x A and x B } Difference n A - B = A \ B = { x U | x A and x B } Complement c n A = U - A = { x U | x A }
Discrete Math. Reading Materials
38
Set Union
l
An example
n
{ 1, 2, 3 } { 2, 3, 4, 5 } = { 1, 2, 3, 4, 5 }
4 2 1 3 5
39
Set Intersection
l
An example
n
{ 1, 2, 3 } { 2, 3, 4, 5 } = { 2, 3 }
4 2 1 3 5
40
Set Difference
l
An example
n
{ 1, 2, 3 } - { 2, 3, 4, 5 } = { 1 }
4 2 5 1 3
41
Set Complement
l
42
Let A B. n What is A - B? n What is B - A? If A, B C, what can you say about A B and C? If C A, B, what can you say about C and A B?
l l
43
Lecture Topics
l l l l l l l l l
Sets and Members, Equality of Sets Set Notation The Empty Set and Sets of Numbers Subsets and Power Sets Equality of Sets by Mutual Inclusion Universal Sets, Venn Diagrams Set Operations Set Identities Proving Set Identities
Discrete Math. Reading Materials 44
is the identity for union n A = A = A U is the identity for intersection n AU=UA=A Double complement law c c n (A ) = A Idempotent laws n A A = A n A A = A
Discrete Math. Reading Materials 46
De Morgans laws c c c n (A B) = A B c c c n (A B) = A B
47
48
Lecture Topics
l l l l l l l l l
Sets and Members, Equality of Sets Set Notation The Empty Set and Sets of Numbers Subsets and Power Sets Equality of Sets by Mutual Inclusion Universal Sets, Venn Diagrams Set Operations Set Identities Proving Set Identities
Discrete Math. Reading Materials 49
Proof Methods
l
There are many ways to prove set identities. The methods include
n
To prove that A Ac = U by mutual inclusion, do you have to prove the inclusion A U Ac U? To prove that A Ac = by mutual inclusion, do you have to prove the inclusion A Ac?
52
Lecture Topics
l l l l l l l l l l
From High School Functions to General Functions Function Notation Values, images, inverse images, pre-images Codomains, Domains, Ranges Sets of Images and Pre-Images Equality of Functions Some Special Functions Unary and Binary Operations as Functions The Composition of Two Functions is a Function The Values of Function Composition
Discrete Math. Reading Materials 53
Functions are usually given by formulas. Examples n f(x) = sin(x) x n f(x) = e n n f(x) = x n f(x) = log x A function is a computation rule that changes one value to another value. Effectively, a function associates, or relates, one value to another value.
Discrete Math. Reading Materials 54
General Functions
l
Since a function relates one value to another, we can think of a function as relating one object to another object. Objects need not be numbers. In the previous examples, the function f relates the object x to the object f(x). Usually we want to be able to relate each object of interest to only one object. That is, a function is a single-valued and exhaustive relation.
55
Functions
l
56
Example 1
l l
1 2
a b
3
Discrete Math. Reading Materials 57
Example 2
l l
1 2
a b
3
Discrete Math. Reading Materials 58
Example 3
l l
1 2
a b
3
Discrete Math. Reading Materials 59
60
Lecture Topics
l l l l l l l l l l
From High School Functions to General Functions Function Notation Values, images, inverse images, pre-images Codomains, Domains, Ranges Sets of Images and Pre-Images Equality of Functions Some Special Functions Unary and Binary Operations as Functions The Composition of Two Functions is a Function The Values of Function Composition
Discrete Math. Reading Materials 61
Function Notation
l
Let f be a relation from A to B. That is, f AxB. If the relation f is a function, n we write f : A B. n If (x,y) f, we write y = f(x). Usually we use f, g, h, to denote relations that are functions.
62
Notational Convention
l
Sometimes functions are given by stating the rule of transformation, for example, f(x) = x+1. This should be taken to mean
n
63
Let f A x B be a relation and (x,y) f. Does the expression f(x) = y make sense?
64
Lecture Topics
l l l l l l l l l l
From High School Functions to General Functions Function Notation Values, images, inverse images, pre-images Codomains, Domains, Ranges Sets of Images and Pre-Images Equality of Functions Some Special Functions Unary and Binary Operations as Functions The Composition of Two Functions is a Function The Values of Function Composition
Discrete Math. Reading Materials 65
Values, Images
l
Let f : A B. Let y = f(x). n That is, x f y, equivalently, (x,y) f. The object y is called n the image of x under the function f, or n the value of f at x.
66
Let f : A B and y B. Define -1(y) = { x A | f(x) = y } n f The set f -1(y) is called the inverse image, or preimage of y under f.
67
68
Examples
l
l l
f( {1,3} ) = { c, d } f -1( { a, d } ) = { 3 }
Discrete Math. Reading Materials 69
Some Properties
l
70
Let f : A B and X A and Y B. If there are n elements in X, how many elements are there in f(X)? If there are n elements in Y, how many elements are there in f -1 (Y)?
71
Lecture Topics
l l l l l l l l l l
From High School Functions to General Functions Function Notation Values, images, inverse images, pre-images Codomains, Domains, Ranges Sets of Images and Pre-Images Equality of Functions Some Special Functions Unary and Binary Operations as Functions The Composition of Two Functions is a Function The Values of Function Composition
Discrete Math. Reading Materials 72
Domains
l
73
Let f : A B. The codomain of function f is the set B. The range of function f is the set of images of f.
n
74
Example 1
f 1 2 3 p q r s
l l l
The domain is { 1, 2, 3 }. The codomain is { p, q, r, s }. The range is { p, Discrete Math. Reading Materials r }.
75
Example 2
l
Consider exp : R R. That is, exp(x) = ex. The domain and codomain of exp are both R. The range of exp is R+, the set of positive real numbers.
76
Consider cos : R R. What are the domain, codomain, and range of cos?
77
Lecture Topics
l l l l l l l l l l
From High School Functions to General Functions Function Notation Values, images, inverse images, pre-images Codomains, Domains, Ranges Sets of Images and Pre-Images Equality of Functions Some Special Functions Unary and Binary Operations as Functions The Composition of Two Functions is a Function The Values of Function Composition
Discrete Math. Reading Materials 78
Let f : A B. Let X, X A and Y, Y B. We shall call f(X) the image of X instead of the set of images of members of X. Similarly, we shall simply call f -1(Y) the preimage of Y. We have -1 (Y)) Y and X f -1 (f(X)) n f( f n f(X X) = f(X) f(X), f(X X) f(X) f(X) -1 (Y Y) = f -1 (Y) f -1 (Y) n f -1 (Y Y) = f -1 (Y) f -1 (Y) n f
Discrete Math. Reading Materials 79
f( f -1 (Y)) Y
l
It is possible to have strict inclusion. n When the range of f is a proper subset of its codomain, we may take Y = B to obtain -1 (B)) = f( A ) B n f( f To show inclusion, -1 (Y)). n let y f( f -1 (Y) such that f(x) = y. n x f n We have f(x) Y. n That is, y Y
Discrete Math. Reading Materials 80
We can easily show that n f(X X) f(X) f(X). This is because X X X, so n f(X X) f(X). Similarly, we have f(X X) f(X). Consequently, f(X X) f(X) f(X).
Discrete Math. Reading Materials 81
To show f(X X) f(X) f(X), n let y f(X X). x X X such that f(x) = y. If x X, then y f(X); otherwise, y f(X). This means y f(X) f(X). That is, f(X X) f(X) f(X).
Discrete Math. Reading Materials 82
What do the given set expressions become when f is the identity function?
83
Lecture Topics
l l l l l l l l l l
From High School Functions to General Functions Function Notation Values, images, inverse images, pre-images Codomains, Domains, Ranges Sets of Images and Pre-Images Equality of Functions Some Special Functions Unary and Binary Operations as Functions The Composition of Two Functions is a Function The Values of Function Composition
Discrete Math. Reading Materials 84
Equality of Functions
l
Let f : A B and g : C D. We define function f = function g iff n set f = set g Note that this forces A = C but allows B D.
n
85
l l
Let f : A B and g : C D and set f = set g. Let x A. n (x,f(x)) f n But f = g as sets n (x,f(x)) g n That is x C. n Consequently, A C. Similarly, we have C A. That is, A = C.
Discrete Math. Reading Materials 86
Let f, g : A B and set f = set g. Let x A. n (x,f(x)) f n But f = g as sets n (x,f(x)) g n That is (x,f(x)), (x,g(x)) g. n Since g is a function, so f(x) = g(x).
87
Example
l
We consider n exp : R R and n exp : [0,1] R n as two different functions though the computation rule is the same --- exp(x) = ex.
88
Let f and g be functions such that f(x) = g(x) on some set A. Can we conclude that function f = function g?
89
Lecture Topics
l l l l l l l l l l
From High School Functions to General Functions Function Notation Values, images, inverse images, pre-images Codomains, Domains, Ranges Sets of Images and Pre-Images Equality of Functions Some Special Functions Unary and Binary Operations as Functions The Composition of Two Functions is a Function The Values of Function Composition
Discrete Math. Reading Materials 90
Identity Functions
l
Consider the identity relation I A on the set A. Clearly, for every x A, IA relates x to an unique element of A that is itself. Consequently, we have I A : A A . IA is also called the identity function on A.
91
Constant Functions
l l
. . . y . . .
92
Characteristics Functions
l
Consider some universal set U. Let A U. The function A : U { 0, 1 } defined by n A(x) = 1, if x A, c n A(x) = 0, if x A ; n is called the characteristic function of A.
93
Let f : R R.
n
If f is a constant function, what does its graph on the Cartesian X-Y plane look like? If f is the identity function, what does its graph on the Cartesian X-Y plane look like?
94
Lecture Topics
l l l l l l l l l l
From High School Functions to General Functions Function Notation Values, images, inverse images, pre-images Codomains, Domains, Ranges Sets of Images and Pre-Images Equality of Functions Some Special Functions Unary and Binary Operations as Functions The Composition of Two Functions is a Function The Values of Function Composition
Discrete Math. Reading Materials 95
Unary Operations
l
A unary operation on a set A acts on an element of A and produces another element of A. Clearly, a unary operation uop can be thought of as a function f : A A with f(x) = uop( x ). Conversely, a function from A to A can be regarded as a unary operation on A.
96
Example 1
l
Let U be some universal set. The complement operation on P(U) can be represented as a function c n f: P(U) P(U) with f(A) = A .
97
Binary Operations
l
A binary operation on a set A acts on two elements of A and produces another element of A. Clearly, a binary operation bop can be represented as a function n f : AxA A with f((a,b)) = a bop b. n We write f(a,b) instead of f((a,b)). Conversely, a function from AxA to A can be regarded as a binary operation on A.
Discrete Math. Reading Materials 98
Example 1
l
Let U be some universal set. The union operation on P(U) can be represented as a function f: P(U)xP(U) P(U) with f(A,B) = AB.
99
Let U = { 0, 1 }. Give the set representations of the functions for unary complement operation and the binary intersection operation.
100
Lecture Topics
l l l l l l l l l l
From High School Functions to General Functions Function Notation Values, images, inverse images, pre-images Codomains, Domains, Ranges Sets of Images and Pre-Images Equality of Functions Some Special Functions Unary and Binary Operations as Functions The Composition of Two Functions is a Function The Values of Function Composition
Discrete Math. Reading Materials 101
Function Composition
l l
l l
Let f : A B and g : B C. Since relations can be composed and functions are relations, so functions can be composed like relation composition. So relations f and g can be composed and their composition is gf. Clearly gf is a relation from A to C. But is gf a function?
102
Let f : A B and g : B C. We want to show that gf : A C. n That is, the composition of two functions is again a function. We have to show for any x A, there is a unique z C, such that (x,z) gf.
103
Existency Proof
l
Let x A. Since f is a function from A to B, there is a unique y B such that (x,y) f. For this y B, there is a unique z C such that (y,z) g because g is a function from B to C. That is, (x,z) gf.
Discrete Math. Reading Materials 104
Uniqueness Proof
l l
Let (x,z), (x,z) gf. There exist y, y B such that n (x,y) f, (y,z) g n (x,y) f, (y,z) g
l l l
Can you compose cos and log to obtain the composition (log cos)? Can you compose log and exp to obtain the composition (exp log)?
106
Lecture Topics
l l l l l l l l l l
From High School Functions to General Functions Function Notation Values, images, inverse images, pre-images Codomains, Domains, Ranges Sets of Images and Pre-Images Equality of Functions Some Special Functions Unary and Binary Operations as Functions The Composition of Two Functions is a Function The Values of Function Composition
Discrete Math. Reading Materials 107
l l
l l
Let f : A B and g : B C. Since gf : A C, for any x A, there is a z C, such that (gf)(x) = z. That is, (x,z) gf. By the definition of function composition, there is a y B, such that (x,y) f and (y,z) g. Since f and g are function, we can write f(x) = y and g(y) = z. Substituting y = f(x) in g(y) = z, we have g(f(x))=z. That is, n (gf)(x) = g(f(x)).
Discrete Math. Reading Materials 108
Let f : A B, g : B C, h : C D. Since relation composition are associative and functions are relations, we have n h(gf) = (hg)f Furthermore, we have n (h(gf))(x) = h( (gf)(x) ) = h( g ( f(x) ) ) n and n ((hg)f)(x) = (hg)(f(x)) = h( g ( f(x) ) ) That is, n (h(gf))(x) = ((hg)f)(x) = h(g(f(x)))
Discrete Math. Reading Materials 109
Let f(x) = x+1, g(x) = x2, and h(x) = 1/(1+x2) be functions R from to R.
n
110
Lecture Topics
l l l l l l l l l l
One-To-One (1-1) Functions, Injections Composition of Injections Onto Functions, Surjections Composition of Surjections One-To-One Correspondences, Bijections Composition of Bijections f is a Bijection Implies f Inverse is a Function. f Inverse is a Function Implies f is a Bijection Properties of Inverse Functions Some Function Composition Properties
Discrete Math. Reading Materials 111
l l
Let f : A B. The function f is one-to-one iff n for any x, x A, n if f(x) = f(x) then x = x n Equivalently, n if x x then f(x) f(x). In words, a function is one-to-one iff it maps distinct elements to distinct images. A one-to-one function is also called an injection. We abbreviate one-to-one as 1-1.
Discrete Math. Reading Materials 112
Example 1
l l l l
Let A = { 1, 2, 3 }. Let B = { a, b, c, d, e } Let f = { (1,a), (2,b), (3,a) } The function f is not 1-1 because n f(1) = f(3) = a but1 3 1 2 3
Discrete Math. Reading Materials
a b c d e
113
Example 2
l l l l
Let A = { 1, 2, 3 }. Let B = { a, b, c, d, e } Let f = { (1,e), (2,b), (3,c) } The function f is 1-1 because n if x y, then f(x) f(y) 1 2 3
Discrete Math. Reading Materials
a b c d e
114
Example 3
l l
Let f : Z Z with f(x) = x2. The function f is not 1-1 because f(x) = f(-x).
l l
115
116
Lecture Topics
l l l l l l l l l l
One-To-One (1-1) Functions, Injections Composition of Injections Onto Functions, Surjections Composition of Surjections One-To-One Correspondences, Bijections Composition of Bijections f is a Bijection Implies f Inverse is a Function f Inverse is a Function Implies f is a Bijection Properties of Inverse Functions Some Function Composition Properties
Discrete Math. Reading Materials 117
Theorem
n
118
Proof
l
Let (gf)(x) = (gf)(y) g(f(x)) = g(f(y)) Since g is 1-1, f(x) = f(y) Since f is 1-1, x = y That is, gf is a 1-1 function.
Discrete Math. Reading Materials 119
Let f : A B, g : B C. Let gf : A C be 1-1. Then f is 1-1 but g need not be 1-1. Proof n Let f(x) = f(y) n Then g(f(x)) = g(f(y)) n (gf)(x) = (gf)(y) n x = y n That is, f is 1-1.
Discrete Math. Reading Materials 120
l l
f a 1 b A B
g 2
C
121
122
Lecture Topics
l l l l l l l l l l
One-To-One (1-1) Functions, Injections Composition of Injections Onto Functions, Surjections Composition of Surjections One-To-One Correspondences, Bijections Composition of Bijections f is a Bijection Implies f Inverse is a Function f Inverse is a Function Implies f is a Bijection Properties of Inverse Functions Some Function Composition Properties
Discrete Math. Reading Materials 123
Let f : A B. The function f is onto iff n for any y B, n there exists some x A, n such that f(x) = y. In words, a function is onto iff every element in the codomain has a non-empty pre-image. A onto function is also called a surjection.
Discrete Math. Reading Materials 124
l l
Let f : A B be onto. Onto implies B f(A). Proof n Let y B. n There exists x A such that f(x) = y. n y f(A) n That is, B f(A). But f(A) B. That is, B = f(A).
Discrete Math. Reading Materials 125
Example 1
l l l
Let A = { 1, 2, 3 } and B = { a, b, c, d, e } Let f = { (1,a), (2,a), (3,a) } The function f is not onto because there is a b B without any x A such that f(x) = b.
1 2 3
Discrete Math. Reading Materials
a b c d e
126
Example 2
l l l
Let A = { 1, 2, 3 } and B = { a, b } Let f = { (1,b), (2,b), (3,a) } The function f is onto because for any y B there is a x A such that f(x) = y.
1 2 3
Discrete Math. Reading Materials
a b
127
Example 3
l
The function f is not onto because there is no integer x such that f(x) = -1.
129
Lecture Topics
l l l l l l l l l l
One-To-One (1-1) Functions, Injections Composition of Injections Onto Functions, Surjections Composition of Surjections One-To-One Correspondences, Bijections Composition of Bijections f is a Bijection Implies f Inverse is a Function f Inverse is a Function Implies f is a Bijection Properties of Inverse Functions Some Function Composition Properties
Discrete Math. Reading Materials 130
Theorem
n
131
Proof
l l
Let z C. Since g : B C is onto, there is a y B such that n g(y) = z. Since f : A B is onto, there is a x A such that n f(x) = y. Combining, we have n (gf)(x) = g(f(x)) = g(y) = z That is, the composition gf is onto.
Discrete Math. Reading Materials 132
Let f : A B, g : B C. Let gf : A C be onto. Then g is onto but f need not be onto. Proof n Since gf is onto, for any z C, there is a x A such that (gf)(x) = z. n That is g(f(x)) = z. n But f(x) B. n So for any z C, there is a y = f(x) B such that g(y) = x. n That is, g is onto.
Discrete Math. Reading Materials 133
135
Lecture Topics
l l l l l l l l l l
One-To-One (1-1) Functions, Injections Composition of Injections Onto Functions, Surjections Composition of Surjections One-To-One Correspondences, Bijections Composition of Bijections f is a Bijection Implies f Inverse is a Function f Inverse is a Function Implies f is a Bijection Properties of Inverse Functions Some Function Composition Properties
Discrete Math. Reading Materials 136
Let f : A B.
137
Example 1
l l l
Let A = { 1, 2, 3 } and B = { a, b, c }. Let f = { (1,b), (2,a), (3,c) }. The function f is a 1-1 correspondence because it is 1-1 and onto.
1 2 3
Discrete Math. Reading Materials
a b c
138
Example 2
l
Since x-1 = y-1 implies x = y, so f is 1-1. Since f(y+1) = y, so f is onto. The function f is a 1-1 correspondence.
139
Example 3
l
Let f : Z Z+ and f(x) = |x| + 1. Since f(-x) = f(x) but -x x for non-zero x, f is not 1-1. When y > 0, we have f(y-1) = y. This shows that f is onto. Since f is onto but not 1-1, so f is not a 1-1 correspondence.
Discrete Math. Reading Materials 140
141
Lecture Topics
l l l l l l l l l l
One-To-One (1-1) Functions, Injections Composition of Injections Onto Functions, Surjections Composition of Surjections One-To-One Correspondences, Bijections Composition of Bijections f is a Bijection Implies f Inverse is a Function f Inverse is a Function Implies f is a Bijection Properties of Inverse Functions Some Function Composition Properties
Discrete Math. Reading Materials 142
Theorem
n
Let f : A B, g : B C. If both f and g are 1-1 correspondences, then g f is also a 1-1 correspondence.
Proof
l
Since f and g are 1-1, so is gf. Since f and g are onto, so is gf. Since gf is 1-1 and onto, gf is a 1-1 correspondence.
144
Since gf is 1-1, n we have shown that f is 1-1, n but g need not be 1-1. Since gf is onto, n we have shown that g is onto, n but f need not be onto. That is, f and g need not be 1-1 correspondences.
Discrete Math. Reading Materials 145
The following example shows that gf is a 1-1 correspondence from A to C, but neither f nor g is a 1-1 correspondence. f a 1 b A B C
146
Let f : A B be 1-1. Let C = f(B). Clearly, f : A C is a bijection. n Proof: n f remains 1-1 n f has become onto.
147
148
Lecture Topics
l l l l l l l l l l
One-To-One (1-1) Functions, Injections Composition of Injections Onto Functions, Surjections Composition of Surjections One-To-One Correspondences, Bijections Composition of Bijections f is a Bijection Implies f Inverse is a Function f Inverse is a Function Implies f is a Bijection Properties of Inverse Functions Some Function Composition Properties
Discrete Math. Reading Materials 149
Inverse Functions
l
Let A = { 0, 1 }, B = { p, q }, f = { (0,p), (1,p) }. Clearly f is a function from A to B. Clearly f -1 = { (p,0), (p,1) } is a relation from B to A but it is not a function from B to A. A function is invertible iff its inverse is also a function.
150
Theorem
l
151
Proof
l
Let f : A B be 1-1 and onto. We want to show f -1 B x A is a function. We need to show n For any y B, there is a x A such that (y,x) f -1.
n
Let y B. Since f is onto, there is a x A such that f(x) = y. That is, for any y B, there is a x A, such that n (x,y) f. But (x,y) f implies (y,x) f -1.
153
Let y B. Let (y,x), (y,x) f -1 . n We have (x,y), (x,y) f. n This gives f(x) = y = f(x). n But f is 1-1 gives x = x.
154
155
Lecture Topics
l l l l l l l l l l
One-To-One (1-1) Functions, Injections Composition of Injections Onto Functions, Surjections Composition of Surjections One-To-One Correspondences, Bijections Composition of Bijections f is a Bijection Implies f Inverse is a Function f Inverse is a Function Implies f is a Bijection Properties of Inverse Functions Some Function Composition Properties
Discrete Math. Reading Materials 156
Inverse Functions
l
Let f : A B. Since f is a function, it is a relation. We know f -1 is a relation from B to A. If f -1 is a function, what can we say about f ?
157
Theorem
l
158
Proof
l
Let f(x) = f(x) = y. We have (x,y), (x,y) f. (y,x), (y,x) f -1 -1 is a function, so the image of y under it is n But f unique, that is, x = x. Since x=x whenever f(x) = f(x), f is 1-1.
Discrete Math. Reading Materials 160
161
162
Lecture Topics
l l l l l l l l l l
One-To-One (1-1) Functions, Injections Composition of Injections Onto Functions, Surjections Composition of Surjections One-To-One Correspondences, Bijections Composition of Bijections f is a Bijection Implies f Inverse is a Function f Inverse is a Function Implies f is a Bijection Properties of Inverse Functions Some Function Composition Properties
Discrete Math. Reading Materials 163
Let f : A B and f -1 : B A. We have (x,y) f iff (y,x) f -1 . Since both f and f -1 are functions, the above can be written as -1(y) = x. n f(x) = y iff f
164
Theorem
l
If the inverse of a function is a function, the inverse function is a 1-1 correspondence. Proof -1 be a function. n Let the function be f and f -1 ) -1 = f is a function. n We have (f -1 is a function, by a previous n Since the inverse of f theorem, f -1 is a 1-1 correspondence.
165
166
Lecture Topics
l l l l l l l l l l
One-To-One (1-1) Functions, Injections Composition of Injections Onto Functions, Surjections Composition of Surjections One-To-One Correspondences, Bijections Composition of Bijections f is a Bijection Implies f Inverse is a Function f Inverse is a Function Implies f is a Bijection Properties of Inverse Functions Some Function Composition Properties
Discrete Math. Reading Materials 167
Function Composition
l
Let f : A B be 1-1 and onto. We have f -1 : B A is also 1-1 and onto. We want to find -1 n f f -1 f n f n f I A , IB f -1 -1 I n IA f , f B
Discrete Math. Reading Materials 168
f f -1
l l
We have f -1 : B A, f : A B. Let (f f -1)(x) = y. -1(x)) = y n f( f -1(x) = f -1 (y) n f -1 is a 1-1 correspondence, n But f n so x = y -1(x) = x. n and f f That is, f f -1 = IB.
169
f -1 f
l l
We have f : A B, f -1 : B A. Let (f -1 f )(x) = y. -1( f (x)) = y n f n f (x) = f (y) n But f is a 1-1 correspondence, n so x = y -1 f(x) = x. n and f That is, f -1 f = IA.
170
f IA
l
We have IA: A A, f : A B. Let (f IA)(x) = y. n f (IA (x)) = y n f (x) = y n (f IA)(x) = f(x) That is, f IA = f.
171
IB f
l
We have f : A B, IB: B B. Let (IB f)(x) = y. n IB ( f (x)) = y n f (x) = y n (IB f)(x) = f(x) That is, IB f = f.
172
What are IA f
-1
and f
-1
IB?
173