You are on page 1of 14

Question 1

We have a function f: Z → Z defined as f(n) = f(n) = \begin{cases} n + 3 & \text{if } n \text{ is


odd} \\ n - 5 & \text{if } n \text{ is even} \end{cases} . Find whether the function is injective
and surjective. What would be the inverse of this function?

n+3 if nis odd


Let’s have a look at the function f ( n )=
{
n−5 if n is even
The Injective function (One-to-One):

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 -

Definition, Formula, Examples, n.d.)

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

((Injective Function - Definition, Formula, Examples, n.d.)

if both a𝖠b are odd : a+3=b +3 ⟹ a=b if

both a𝖠b are even : a−5=b−5 ⟹ a=b

1
The function is injective because distinct inputs map to distinct outputs.

The Surjective function (Onto):

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

(Surjective Function - Definition, Properties, Examples, n.d.).

Let’s consider y is just a normal integer.


if y is odd , then x= y −3 since f (x )= x+3=
y if y is odd , then x= y +5 since f ( x
)=x−5= y
For every integer y in the codomain, there exists at least one integer x in the domain such
that f(x) = y. Therefore, the function is surjective.

2
The Inverse of the function:

An inverse function, also known as an anti-function, is characterized as a function capable of

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

denoted by f −1 (Inverse Function (Definition and Examples), n.d.)

If f and g are inverse functions, then f(x) = y if and only if g(y) = x

To find the inverse of the function, we need to reverse the operations performed by f.

if y is odd, then f −1 ( y )= y−3

if y is even , then f −1 ( y ) = y+ 5

So the inverse of the function f is:

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.

Compositions of function: Let f : A→B𝖠g: B→C. Then the composition of f followed by g° f is a


function from A into C defined by ( g ° f ) ( x)=g ( f ( x ) ), which is read as “ g of f of x” (Doerr &
Levasseur, 2023, Chapter 7.3.2)

Let A={ 5 ,7 ,9 } , B=(25 , 49 , 81 } and

f: A → B={ (5, 25), (7, 49), (9,81 ) }

Let C={100, 121,144 } and

g ; B → C ={( 25, 100 ) , ( 49 ,121 ) ,( 81, 144) }

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)

Is not defined for any element in set B

Based on this ( f ° g) is not defined, while ( g ° f ) is defined and produces elements in set

C, demonstrating that they are not equal in this context.

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.

Set: StudentsName = {Ani, Leon, Linh, Liam, Abdul}

Set: Grades = {75, 60, 85, 95, 60}

Set: GradeSymbol = {B, C, B+, A, C}

Mapping StudentName to Grades:

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)}

What are the domains and ranges of the functions?

Mapping the StudentName to Grades

Domain:

Set: StudentsName = {Ani, Leon, Linh, Liam, Abdul}

Range:

Set: Grades = {75, 60, 85, 95, 60}

Mapping Grade to GradeSymbol

Domain:

Set: Grades = {75, 60, 85, 95, 60}

Range:

Set: GradeSymbol = {B, C, B+, A, C}

6
Can you make a composite function out of this? If yes, make the composite function

and find if the composition of functions is commutative. Explain the reason.

In mathematics, function composition refers to an operation involving two functions, denoted as

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

and Examples, n.d.)

(Composition of Functions - Definition, Properties and Examples, n.d.)

(Composition of Functions - Definition, Properties and Examples, n.d.)

7
Composite of functions = StudentName → Grades and Grades → GradeSymbol

The Composite function = 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)}

Let's check if the composition of functions is commutative, i.e., if f ° g=g° f :

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

Grades →Grade and vice versa.

StudentName → Grades→ GradeSymbol = {(Ani,75, B), (Leon, 60, C). (Limh, 85, B+), (Liam,

95, A), (Abdul, 60, C)}

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,

A, 95), (Abdul, C, 60)}

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

the same effect as mapping from StudentName to GradeSymbol, then to Grades.

Question 4

Explain the following concepts using relevant examples:

Sequence: A sequence refers to a collection of numbers arranged in a specific order based on

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 |

Sequence, Series and Summations, 2018).

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:

A recursive function is characterized by a process where it refers back to itself and

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

and Visualization, n.d.).

9
Let’s explore this by looking at the recursive example below:

We are given a sequence of numbers 4, 7, 10, 13, 16….

Y(1) = 7 → the first term of the series.

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

Structure: Sequence PowerPoint Presentation, Free Download - ID:3149628, 2014)

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

number, 5, to its preceding term (Arithmetic Sequence - Formula, Definition, Examples,

Applications | Arithmetic Series, n.d.)

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

term is produced by multiplying a constant, which yields the subsequent term.

Example 5, 15, 45, 135…. where the number is multiplied by 3.

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

the first n terms for the following series: 6+36+216+……………….

Observing the sequence, the formula identified is f(x) = 6x, where x represents the position of the

term in the sequence, beginning from 1.

To calculate the sum sum(n) = ∑ (6x) for (x from 1 to n)

Find the next three terms of the series, provide a closed formula, and calculate the sum to

the first n terms for the following series: 21+24+27+……………….

Observing the sequence, the formula identified is f(x) = 21 + 3(x - 1), where x represents the

position of the term in the sequence, beginning from 1.

To calculate the sum sum(n) = ∑ (21 + 3(x -1)) for (x from 1 to n)

(Doerr & Levasseur, 2023)

12
References:

Arithmetic Sequence - Formula, Definition, Examples, Applications | Arithmetic Series. (n.d.).


Cuemath. https://www.cuemath.com/algebra/arithmetic-sequence/

Composition of Functions - Definition, Properties and Examples. (n.d.). BYJUS.


https://byjus.com/maths/composition-of-functions/

Doerr, A., & Levasseur, K. (2023). ADS Definition and Notation. In discretemath.org.
https://discretemath.org/ads/s-function-def-notation.html

Geometric Sequence - Formula, Definition, Examples. (n.d.). Cuemath.


https://www.cuemath.com/algebra/geometric-sequence/

Injective Function - Definition, Formula, Examples. (n.d.). Cuemath.


https://www.cuemath.com/algebra/injective-function/

Inverse Function (Definition and Examples). (n.d.). BYJUS. https://byjus.com/maths/inverse-


functions/
Levin, O. (n.d.). Functions. In discrete.openmathbooks.org.
https://discrete.openmathbooks.org/dmoi3/sec_intro-functions.html

Mathematics | Sequence, Series and Summations. (2018, June 27). GeeksforGeeks.


https://www.geeksforgeeks.org/mathematics-sequence-series-and-summations/

PPT - Discrete Structure: Sequence PowerPoint Presentation, free download - ID:3149628.


(2014, August 13). SlideServe. https://www.slideserve.com/trent/discrete-structure-
sequence

Recursive Functions – Definition, Expansion and Visualization. (n.d.). VEDANTU. Retrieved


November 29, 2023, from https://www.vedantu.com/maths/recursive-functions

13
Surjective Function - Definition, Properties, Examples. (n.d.).
Cuemath. https://www.cuemath.com/algebra/surjective-function/

You might also like