Assignment 4
Assignment 4
An injective function establishes a relationship between an element from a specific set and a
unique element from another set. It's commonly known as a one-to-one function because each
element in the domain corresponds to a distinct element in the codomain ((Injective Function -
To determine whether the function is injective (one-to-one), we must examine whether distinct
elements in the domain map to distinct elements in the codomain. To put it another way,
f ( a)=f (b)=a=b
1
The function is injective because distinct inputs map to distinct outputs.
A surjective function, operating between set A and set B, ensures that every element in set B has
a relationship with at least one element in set A. In a surjective function, the domain and range
are identical, ensuring that every element has a pre-image in the domain.
For a function to be surjective (onto), every element in the codomain must have at least one pre-
image in the domain. In other words, for every y in the codomain, there exists an x in the domain
such that (Surjective Function - Definition, Properties, Examples, n.d.).
f ( x )= y
2
The Inverse of the function:
reversing the action of another function. Put simply, if a function "f" maps x to y, the inverse of
"f" will map y back to x. In notation, if the function is represented as 'f', its inverse function is
To find the inverse of the function, we need to reverse the operations performed by f.
if y is even , then f −1 ( y ) = y+ 5
f
−1
{
(n) n−3 if n is odd
n+5 if n is even
3
Question 2
Consider three sets A, B, and C each with three elements, and define a function ‘f’ from set
A to B and a function ‘g’ from set B to C with the mapping of the elements you
specify. After defining ‘f’ and ‘g’, discuss the composition of functions f °g and g °f on the
sets A, B, and C that you have defined.
Can both f °g and g°f be defined for the sets you have considered? Are they equal? Provide
proof to support your answer.
f ° g (composition of f and g): This represents applying function 'g' first and then function 'f'.
( f ° g) (25)=f ( g (25) )=f (100 ) this is not defined by the function f because there is no mapping for
f ( 100 ) in set A.
( f ° g) (49)=f ( g (49 )) =f (121) this is not defined by the function f because there is no mapping for
f (121) in set A.
( f ° g) (81)=f ( g ( 81) )=f (144 ) this is not defined by the function f because there is no mapping for
f ( 144 ) in set A.
4
For:
g° f (composition of g of f ): This represent applying function ‘f” first and then function ‘g’.
( g ° f ) (5)=g ¿
( g ° f ) (7)=g ¿
( g ° f ) (9)=g ¿
( g ° f ) is defined and produces elements in set C for all elements in set A. While ( f ° g)
Based on this ( f ° g) is not defined, while ( g ° f ) is defined and produces elements in set
Question 3
There are 5 students: Ani, Leon, Linh, Liam, and Abdul with scores in computer science
as 75, 60, 85, 95, and 60 respectively. They are graded by the University as B, C, B+, A,
and C respectively. Define the mappings from students to marks and marks to grades
explicitly.
StudentName → Grades = {(Ani, 75), (Leon, 60), (Linh, 85), (Liam, 95), (Abdul, 60)}
5
Mapping Grade to GradeSymbol
Grades → GradeSymbol = {(74, B), (60, C), (85, B+), (95, A), (60, C)}
Domain:
Range:
Domain:
Range:
6
Can you make a composite function out of this? If yes, make the composite function
f and g, that combine to produce a new function, denoted as h, defined as h(x) = g(f(x)). This
signifies that function g is applied to the output of function f, implying that one function is
applied to the outcome of another function. Essentially, it involves the application of a function
to the result obtained from another function (Composition of Functions - Definition, Properties
7
Composite of functions = StudentName → Grades and Grades → GradeSymbol
So:
StudentName → Grades = {(Ani, 75), (Leon, 60), (Linh, 85), (Liam, 95), (Abdul, 60)}
Grades → GradeSymbol = {(74, B), (60, C), (85, B+), (95, A), (60, C)}
Therefore, the composite function for the students directly mapped to their grades is:
StudentName → GradeSymbol = {(Ani, B), (Leon, C), (Linh, B+), (Liam, A), (Abdul, C)}
We have:
StudentName → Grades = {(Ani, 75), (Leon, 60), (Linh, 85), (Liam, 95), (Abdul, 60)}
Grades → GradeSymbol = {(75, B), (60, C), (85, B+), (95, A), (60, C)}
Let's consider the function compositions in two different orders: StudentName → Grades St and
StudentName → Grades→ GradeSymbol = {(Ani,75, B), (Leon, 60, C). (Limh, 85, B+), (Liam,
So, in this sequence, we get the respective grades for each student based on their scores.
StudentName → GradeSymbol→ Grades = {(Ani, B, 75), (Leon, C, 60). (Linh, B+. 85), (Liam,
8
We can see from this comparison that the sequence in which the functions are applied has no
effect on the final result. Mapping from StudentName to Grades, then to GradeSymbol, produces
Question 4
certain defined principles or criteria. Each number within the sequence is referred to as a term,
and the count of these terms determines the length or size of the sequence (Mathematics |
5, 10, 15, 20, 25 is a finite sequence obtained by adding 5 to the previous number.
12, 10, 8, 6, 4, 2, -2.........is an infinite sequence obtained by subtracting 2 from the previous
number.
Recursive function:
utilizes its own preceding terms to determine its subsequent terms. In simpler terms, a
recursive function is defined by its ability to build upon its own previous terms to
define new terms within its sequence. (Recursive Functions – Definition, Expansion
9
Let’s explore this by looking at the recursive example below:
Y(n) = Y(n -1) + 3 → The rule or pattern where you need to add 3 to the last term to get the next
in the series.
So order to find the 6th term, we would need to find all the terms.
Y(1) = 3
Y(2) = (1) + 3 = 4 + 3 = 7
Y(3) = (2) + 3 = 7 + 3 = 10
Y(4) = (3) + 3 = 10 + 3 = 13
Y(5) = (4) + 3 = 13 + 3 = 16
Y(6) = (5) + 3 = 16 + 3 = 19
Closed formula for the sequence: A Closed formula for the sequence is a formula where each
term is described only by an expression that only involves its position. (PPT - Discrete
Example: 3,6,9,12,15,18…….3n
10
Arithmetic sequence: An arithmetic sequence can be described in two distinct manners. First,
it's defined as a sequence in which the intervals between every two consecutive terms remain
constant. Second, it's characterized by each term being generated by adding a consistent number
(whether positive, negative, or zero) to its preceding term. For instance, consider the sequence
below, which is an arithmetic sequence because each term is derived by adding a constant
Example: 5, 10,15, 20, 25 ……. Where the number is increased by adding 5 to the previous
number.
Geometric Sequence:
A geometric sequence stands out as a specific kind of sequence where the relationship between
any two consecutive terms remains constant. This consistent relationship is referred to as the
common ratio within the geometric sequence. Put differently, within a geometric sequence, each
11
Question 5
The sequence 5, 6, 6, 7, 8, 8, 9, 10, 10, 11, 12, 12......can be generated by a closed formula.
Find the formula and the next four terms of the sequence.
Given the initial term as "n," if we observe that when n equals 5, the subsequent four terms are as
follows: n, n+1, n+1, n+2, n+3, n+3, and then the sequence repeats starting from n+4 as the new
n.
Examining the sequence that concluded with 12, the following four terms are 13, 14, 14, 15, 16,
16.
Find the next three terms of the series, provide a closed formula, and calculate the sum to
Observing the sequence, the formula identified is f(x) = 6x, where x represents the position of the
Find the next three terms of the series, provide a closed formula, and calculate the sum to
Observing the sequence, the formula identified is f(x) = 21 + 3(x - 1), where x represents the
12
References:
Doerr, A., & Levasseur, K. (2023). ADS Definition and Notation. In discretemath.org.
https://discretemath.org/ads/s-function-def-notation.html
13
Surjective Function - Definition, Properties, Examples. (n.d.).
Cuemath. https://www.cuemath.com/algebra/surjective-function/