Define this recursively : $f(n) = 3n - 4$
I thought this is how you recursively define a function?
$f^{-1}(n): y = 3n-4$
$y+4 = 3n$
$f^{-1}(n) = (y+4/3)$
But the answer is $f(n) = f(n-1) + B$
What've I done and what should I've done?
Define this recursively : $f(n) = 3n - 4$
I thought this is how you recursively define a function?
$f^{-1}(n): y = 3n-4$
$y+4 = 3n$
$f^{-1}(n) = (y+4/3)$
But the answer is $f(n) = f(n-1) + B$
What've I done and what should I've done?
You have found the inverse of the function, $f^{-1}(n)$, this is a function which has the property:
$$f^{-1}(f(n))=f(f^{-1}(n))=n \qquad \forall n\in D$$
Where $D$ is the domain of $f$. What the question is asking is for an equivalent definition of $f(n)$ using values of $f(m)$ where $m<n$. In this case we can examine what happens for small values of $n$:
\begin{array}{|c|c|c|c|c|c|} \hline n & 1 & 2 & 3 & 4 & 5 & 6\\ \hline f(n) &-1 & 2 & 5 & 8 & 11 & 14 \\ \hline \end{array}
This suggests that we can write our recurrence relationship as: $f(1)=-1$ and:
$$f(n)=f(n-1)+3$$