Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
8 views54 pages

W16L RevisionofRelationsFunctions

The document outlines the agenda for Week 16 of the Logic & Problem Solving course, including upcoming assessments and a revision of Relations and Functions. It details the structure of assessments, including class tests and group coursework, as well as key concepts related to relations, functions, and their properties. Additionally, it provides examples and exercises to reinforce understanding of the material.

Uploaded by

mechanic
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views54 pages

W16L RevisionofRelationsFunctions

The document outlines the agenda for Week 16 of the Logic & Problem Solving course, including upcoming assessments and a revision of Relations and Functions. It details the structure of assessments, including class tests and group coursework, as well as key concepts related to relations, functions, and their properties. Additionally, it provides examples and exercises to reinforce understanding of the material.

Uploaded by

mechanic
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 54

Logic & Problem Solving

MA4001NI

Lecture Week 16
Upcoming Assessments
&
Revision of Relations &
Functions
Agenda:

Week 16 lecture coverage

• Information about upcoming assessments

• Revision of Relations and Functions


Nick–Man with No arms and legs
Upcoming Assessments..
Assessments:

Two Class tests: (50% of total module marks)


Week 8(25%) and Week 22(25%)

 Group Coursework:(50% of total module marks)


Group work of selected exercises (week 25-28)
MUST “PASS” ALL THREE ASSESSMENTS TO PASS THE
MODULE AND ACHIEVE AT LEAST 40% OF MARKS IN
AGGREGATE.
Information for Class test 2 :
Class test 2 carries 25% of the module
marks. It will be held on Week 22 .The
topics for class test 2 are,

- Relations
- Functions
- Permutation & Combination
- Probability
- Probability Distribution
Information for Group Coursework
Students need to form a group of 3
people to do the group course work .
The group course work carries 50% of
the module marks as such
please be careful while choosing the group
members .
The Cartesian Product of Two Sets
Let A and B are two sets .The Cartesian product of sets A and B is
denoted by AB and is the set of ordered pairs given by ,
AB = { (a , b) : a A and b B}
Example:
If A ={a,b,c} and B = {d} then ,
AB = {(a , d), (b , d) , (c , d) }
BA = {(d , a) , (d , b), (d , c) }
AA = {(a , a) , (a , b), (a , c) ,(b , b) , (b , a), (b , c) , (c , c) , (c , a), (c , b) }
Definition of Relation:
Let A be a non-empty set. Any subset R of the
Cartesian product A x A is called a relation on the
set A.

Notation: If R is a relation on A (i.e., R  A x A)


and if ( x , y)  R then we say x is related to y by R and
we write x R y.
if (x , y) R we write x R y
Examples…
Example 1:
Let A = {1,2,3,4,5}. Then
R = {(1,2), (4,2), (3,5)}
S = {(1,1), (2,2), (3,3), (4,4), (5,5)) and
T = {(3,4)} are all relations on A.

We could write 1 R2, 4R2 and 3R5


Similarly, 1S1,2S2 etc.
Example (Contd.):
Example 2 :
Let A = {1, 2, 3, 4}
We can define a subset R of A x A; and hence a relation on A,
by R = { (a , b): a  A, b  A, a b}
This is called the "is less than equal to" relation on A.

Another way of describing this relation is simply by saying


a R b if a  b.

In set listing notation


R = { (1,1) ,(1,2) (1,3), (1,4), (2,2), (2,3), (2,4), (3,3), (3,4), (4,4)}
Pictorial representation of relations.
Often the best way of illustrating the structure and
properties of a relation is by means of a diagrammatic
representation of the relation.

1. Digraphs
2. Matrix Representation
Digraphs:
In discrete mathematics a Graph is a set of points
(called Vertices) some of which are connected by
lines (or Arcs) called Edges.
Here there are the four
For example:
vertices a, b, c and d with
edges as shown.

Note that there is an edge


joining b to itself. Such an
edge is called a Loop.
Digraphs (Contd.):
A graph in which every edge has a direction
(indicated by an arrow) is called a Directed graph or
Digraph.

Notice that there are


two directed edges
between a and d,
one in each direction
and that these really
are different edges.
Digraphs (Contd.):
For example:
Let A = {1, 2, 3, 4} and
R = {(1, 2), (1, 3), (1, 4), (2, 2), (3, 1), (4, 2)}
The digraph of R is then:
Matrix Representation:
If R is a relation on a finite set A, with l A l = n, we
construct an n x n matrix representation of R as
follows:
 Label the rows and columns of an n x n matrix M by
the elements of A.
 For all ordered pairs (x, y)  A x A locate the unique
position in M defined by row x and column y.
 Enter a 1 in this position if x R y and a 0 otherwise.
We call M the matrix of the relation R or the relation
matrix for R.
Matrix Representation (Contd.):
The two relations from above examples have the
following relation matrices:
Any Questions?
Some special relations:
1.Reflexive Relations

2.Symmetric Relations

3.Transitive Relations

4.Equivalence Relations

5.Anti-symmetric Relations

6.Asymmetric Relations

7.Irreflexive Relations
Exercises…
Question 1:
Let R be the relation on set A ={1,2,3,4} given by
R ={(1,1), (1,2), (2,1), (2,2), (3,3), (1,3), (3,1), (4,4)}

Draw matrix and Digraph representation and check


all the seven properties of relation for R.
Exercises…
Question 2 :
Let R be the relation on set A ={1,2,3,4} given by
R ={(1,1), (2,2), (3,3), (4,4)}

Draw matrix and Digraph representation and


check all the seven properties of relation for R.
Exercises…
Question 3 :
Let A = {1, 2, 3, 4} and let R be the relation on A defined by
R = { (a , b): a  A, b  A, a b}

List all the elements of R and draw matrix and


Digraph representation and check all the seven
properties of relation for R.
Functions
INTRODUCTION TO FUNCTIONS:
•A function is an association of exactly one object
from one set (the range) with each object from
another set (the domain).
• This means there must be at least one
arrow leaving each point in the domain.
• Also, that there can be no more than one
arrow leaving each point in the domain.
ELEMENTS OF A FUNCTION:
We write f : A  B to indicate that f is a function from A
to B.
• The set A is called the domain of f.
• The set B is called the co-domain of f.
The range of f denoted by f [A], is the set of all images;
that is, f [ A]  { f ( x) : x  A}

The pre-image or inverse image of a set B contained in


the range of f is denoted by f 1 ( B) and is the subset of
the domain whose members have images in B.
Examples (Contd.):
Example 2 : Neither of the diagrams
A B A B

provide proper function definitions since

(i) f(b) is not defined

(ii) f(c) is not uniquely defined.


Examples (Contd.):
Example 3: Let X = {0, 1, 2, 3}, Y = {4, 5, 6, 7}
The following are proper definitions of functions from X to Y:
i. { (0, 6), (1, 4), (2, 5), (3, 7) }
ii. { (2, 6), (3, 6), (1, 6), (0, 6) }
but the following are not:
iii. { (3, 7), (0, 4), (2, 5) }
iv. { (0, 6), (1, 4), (3, 4), (2, 7),(2,4) }
v. { (0, 4), (1, 7), (5, 5), (2, 6), (3, 6) }
vi. { (0, 4), (1, 8), (2, 6), (3, 5) }
Any Questions?
Domain (1):
• For a function f(x), x is the input and y = f(x) is the
output.
• The set of input values x is called the domain of
the function.
• The set of output values y is called the range of
the function.
• Some functions have restriction on values of x and
hence the domain does not contain all real numbers.
Domain (2):
Consider a polynomial equation such as
y = x3 + 2x2 – 5x + 3
There is no restriction on x because any real number can
be cubed, squared, multiplied and combined.
The domain is a set of all real numbers.
This means that the value of input can be chosen to be
any real number.
Domain (3):
Consider the case where input x is under the square
root such as
y  x 1
There is a restriction on x because the number placed
under the square root cannot be negative.
Therefore, x – 1 ≥ 0
x≥1
any
This means that the possible values of inputs are
real number that is greater than or
equal to 1.
Domain (4):
Consider when the input x is in the denominator such as
1
y 
x6
There is a restriction on x since the denominator cannot
be zero.

Hence, x-60
x6
The domain is any real number except 6.
Exercise:
Try this by yourself.
Find the domain of the function defined by each equation:

7x
(a) y  x 2 x  5 (b) y 
5x  3

a.There is no restriction on x outside square root.


2x + 5 ≥ 0  x ≥ -5/2

b.There is no restriction on x in numerator.


5x + 3  0  x  -3/5
Exercise:
Try this by yourself. 2

Let f ( x)  4 x
( x  3)( x  2)
(a) Find the domain of f(x) (b) Evaluate f(2)

a. The denominator is zero when x = 3, -2.


The domain is any real number except 3 and -2.
That is x  3, -2.

b. f(2)= 4(2)2/(2-3)(2+2) = - 4
Any Questions?
Composite Functions (1):

• Often one quantity is a function of a second quantity that


depends, in turn, on a third quantity.
• For example, the cost of car trip is a function of the gasoline
consumed. The amount of gasoline consumed, in turn, is a
function of the number of miles driven.
• The chains of dependence are known as composition of
functions.
Composite Functions (2):

• Suppose that y = f(x) and y = g(x) define two


functions.
• A value of x inserted in function g will produce
an output g(x).
• This output g(x) is then inserted in function f to
produce an output f(g(x))
• The outcome f(g(x)) is written as
( f  g )( x) Composite function
Composite Functions (4):
Note that the composition of functions is not commutative.
To illustrate this, let f(x) = 5x + 1 and g(x) = 4x – 3
By definition,
( f  g )( x)  f ( g ( x))

( f  g )( x)  f ( g ( x)) ( g  f )( x)  g ( f ( x))
 f ( 4 x  3)  g (5 x  1)
 5(4 x  3)  1  4(5 x  1)  3
 20 x  14  20 x  1

(f  g)(x)  (g  f)(x)
Composite Functions (5):
Example: If f(x) = 2x2 + 1 and g(x) = x + 1, then find
( f  g )( x) and ( f  g )(3)

By definition, ( f  g )( x)  f ( g ( x))
 f ( x  1)
 2( x  1) 2  1
 2( x 2  2 x  1)  1
 2x2  4x  3

Hence, ( f  g )(3)  2(3) 2  4(3)  3


 33
Types of function…
INJECTIONS:
• Let f : A  B be a function. The function f is called an
injective function, or an injection,
if  x, y  A, f(x)  f(y) implies x = y.
• Graphically this means that if two arrows arrive at the
same point in B, they must come from the same point
in A, and therefore they are the same.
• An injective function is also called a one-to-one
function, or a 1 1 function.
INJECTIONS (Contd.):
1 a
• Example :
Graph represent an
injective function 2 b

3 c

one-to-one function
SURJECTIONS:
• The function f is called a Surjective Function, or a
Surjection,
if for all y  B  x  A f ( x )  y

• Graphically this means there must be an arrow arriving


at each point of B.
• A surjective function is also called an onto
function.
• If the co-domain set is equal to range set,
then the function is surjective or on to .
SURJECTIONS (Contd.):
1
• Example :
Graph represent a a
surjective function

2 b

3
onto function
BIJECTIONS:
• A function can also be neither 1 - 1 nor onto, or it can
be both 1 - 1 and onto.
• If a function is both 1 - 1 and onto it is called a
Bijection or Bijective Function.
BIJECTIONS (Contd.):
• Example : Graph represent a Bijective Function

a x a x

b y or b y

c z c z
Any Questions?
Inverse Functions (1):
• Function f maps each number in x1 f
y1
the domain of f to the x2 y2
corresponding number in the x3 y3
Domain Range
range of f.
• Inverse function, symbol f-1, x1 f-1 y1
reverses the correspondence and x2 y2
maps each number in the range of x3 y3
f to the number in the domain. Domain Range
Inverse Functions (2):

• To find f-1, we follow these steps:


1. Replace f(x) with y
2. Interchange variables x and y
3. Solve the resulting equation for y
4. Replace y with f-1(x)
Inverse Functions (3):
Example: Find the inverse of f(x) = 3x + 2.
• Step 1: Replace f(x) with y.
y = 3x + 2
• Step 2: Interchange variables y and x.
x = 3y + 2
• Step 3: Solve the resulting equation for y.
y =(x – 2)/3
• Step 4: Replace y with f-1(x).
f-1(x) = (x – 2)/3
Inverse Functions (4):
• From the above example,
f(x) = 3x + 2 gives f-1(x) = (x – 2)/3
Consider,
( f  f 1 )( x)  f ( f 1 ( x))
( f 1  f )( x)  f 1 ( f ( x))
 x2 (3x  2)  2
 3 2 
 3  3
 x  x

( f  f 1 )( x)  ( f 1  f )( x)  x

Hence,
If the inverse of any function f (x) is again a function,
then f(x) is known as Invertible Function.
Any Questions?
Exercise:
Try this by yourself.
1. Find the inverse of:
• g(x) = x3 +1
• p(x) = x2 – 1
• h(x) = (2x – 3)/(5x-7) where x ≠ 7/5

2.The following functions are defined on the integers.


State whether they are one-to-one, onto, or bijective
functions, and explain your reasons in each case.
• g(x) = x3 – x
• f(x) = x2
What to Expect: Week 16 Tutorials
•Review and practice Relations & Functions
problems through in-class assignments to acquire
them.

• Practice problems to know how concept of


relations & functions can be useful in
solving various mathematical problems.
Thank you

You might also like