MATH 1302 Assignment Unit 2
MATH 1302 Assignment Unit 2
For the function f: Z -> Z given by f(n) = {n+3 if n is odd, n-5 if n is even}, we can analyze its
Injectivity: To check if the function is injective, we need to see if different inputs map to
different outputs. Let's consider two distinct odd numbers m and n such that f(m) = f(n). This
implies that m+3 = n+3, which further implies m = n. Similarly, for even numbers p and q, f(p) =
Surjectivity: To prove surjectivity, we need to show that for every integer k in the co-domain of
Z, there exists an integer n in the domain Z such that f(n) = k. Notice that for any integer k, if k is
odd, k-3 will be even and for k even, k+5 will be odd. This implies that for every integer k, we
Inverse of the function: Now, to find the inverse of the function f, we need to interchange the
roles of input and output. Let g be the inverse function. g is such that g(k) = m if f(m) = k. Solving
the equations for odd and even numbers, we get g(k) = k-3 for odd k and g(k) = k+5 for even k.
2.Let A = {1, 2, 3}, B = {a, b, c}, and C = {x, y, z}. Define f: A -> B as f(1) = a, f(2) = b, f(3) = c and g:
The composition fog: (g o f)(1) = g(f(1)) = g(a) = x, (g o f)(2) = g(f(2)) = g(b) = y, (g o f)(3) = g(f(3))
= g(c) = z.
The composition gof: (f o g)(a) = f(g(a)) = f(x) is not defined, hence gof is not defined.
Since gof is not defined, they are not equal.
3. Let's define the mappings from students to marks and marks to grades explicitly:
Ani -> 75
Leon -> 60
Linh -> 85
Liam -> 95
Abdul -> 60
75 -> B
60 -> C
85 -> B+
95 -> A
Domain of the mapping from students to marks: {Ani, Leon, Linh, Liam, Abdul}
Range of the mapping from students to marks: {75, 60, 85, 95}
Domain of the mapping from marks to grades: {75, 60, 85, 95}
Range of the mapping from marks to grades: {B, C, B+, A}
Composite function:
We can create a composite function by combining the mappings from students to marks and
marks to grades.
For example, h(Ani) = (mapping from marks to grades) o (mapping from students to marks)(Ani)
Similarly, we can find the values of h(Leon), h(Linh), h(Liam), and h(Abdul).
The composition of functions is commutative if fog = gof for all elements in the domain. In this
case, the composition of functions is not commutative because fog and gof map elements from
4. Concepts:
ii. Recursive function: A recursive function is a function that calls itself in its definition.
iii. Closed formula for the sequence: A closed formula is an explicit formula that allows us to find
5.i. The sequence 5, 6, 6, 7, 8, 8, 9, 10, 10, 11, 12, 12... can be generated by a closed formula. To
find the formula, we observe that the sequence alternates between increasing by 1 and staying
The next four terms of the sequence are 13, 13, 14, 15.
ii. The series 6+36+216+... is a geometric sequence with a common ratio of 6. To find the next
To calculate the sum to the first n terms, we use the formula for the sum of a geometric series:
Sum = (first term * (1 - common ratio^n)) / (1 - common ratio)
For this series, the sum to the first n terms is (6 * (1 - 6^n)) / (1 - 6).
iii. The series 21+24+27+... is an arithmetic sequence with a common difference of 3. To find the
To calculate the sum to the first n terms, we use the formula for the sum of an arithmetic series:
For this series, the sum to the first n terms is (n/2) * (21 + (21 + (n-1) * 3)). (Studocu,n.d)
Reference
https://www.studocu.com/en-us/messages/question/2979155/learning-journal-unit-2-
assignment-learning-journal-unit-2-learning-journal-unit-2-make-a