MATH 1302 - Unit 2 Written Assignment
MATH 1302 - Unit 2 Written Assignment
{
f ( n )= n+ 3if nis odd
n−5 if nis even
{
f ( n )= n−3if nis odd
n+5 if n is even
3. We have:
Students: S={ Ani , Leon , Linh , Liam , Abdul }
Scores: M ={75 ,60 , 85 , 95 }
Grades: G={B,C,B+,A}
Define two functions:
f:S→M mapping students to their scores
g:M→G mapping scores to grades
Now, define f as:
f ( Ani )=75 , f ( Leon )=60 , f ( Linh )=85 , f ( Liam )=95 , f ( Abdul )=60
Define g as:
g(75)=B , g(60)=C , g (85)=B+, g (95)= A
2.
2. Recursive Function:
A recursive function is a function that is defined in terms of
itself. To find a term in a sequence, we often use the value
of the previous terms to generate the next one. Recursive
formulas specify how to compute each term from its
predecessor.
Example: In the Fibonacci sequence,
F (n)=F (n−1)+ F (n−2) , where F (0)=0∧F (1)=1 .
Closed Formula
The closed formula for the ( n )-th term of a geometric
series is given by:
an=a1⋅r(n−1)
where:
( an ) is the ( n )-th term,
( a1 ) is the first term (6),
( r ) is the common ratio (6).
Thus, the formula for this series is:
an=6⋅6(n−1)
or simplified:
an=6n