Prove that $f(n) = 1 - n$ is the only integer valued function defined on integers such that $f\bigl(f(n)\bigr) = n$ and $f\bigl(f(n + 2) + 2\bigr) = n$ for all $n \in \mathbb{Z}$ with $f(0) = 1$.
$\begingroup$
$\endgroup$
2
-
1$\begingroup$ I tried applying f again to the second condition and obtained f(n + 2) + 2 = f(n), then tried generalizing it using induction but I am unable to proceed $\endgroup$– saisanjeevCommented Jul 12, 2017 at 8:36
-
$\begingroup$ What you've found is a concrete link between $f(n)$ and $f(n+2)$, for any $n$. That means if you know what $f(0)$ is, then you can tell what $f(2)$ is. But then you know what $f(2)$ is, and can therefore tell what $f(4)$ is. Do you see how induction follows naturally from here? The cases for odd or negative $n$ follow similiarily. $\endgroup$– ArthurCommented Jul 12, 2017 at 8:46
Add a comment
|
1 Answer
$\begingroup$
$\endgroup$
2
Let's prove by induction that for all $n \ge 0$ you have $f(n)=1-n$.
Basic step: for $n=0$ $$f(0)=1=1-0$$ and for $n=1$ $$f(1)=f(f(0))=0=1-1$$
Inductive step: for $n \ge 2$ $$f(n)= [f((n-2)+2)+2]-2 = f(n-2)-2 = 1-(n-2)-2=1-n$$ And the proof is concluded.
A similar argument can be used to prove the equality for $n <0$.