Thanks in advance!

Printable View

- Apr 7th 2008, 03:06 PMshawnFunction Question
Thanks in advance!

- Apr 7th 2008, 03:36 PMPlato
How much of this have you done?

Have you done any of it?

If you have, what pattern do you see? - Apr 7th 2008, 03:49 PMshawn
- Apr 7th 2008, 04:24 PMtopsquark
Well,

$\displaystyle f(n) = \left \{ \begin{array}{rr}n + 3,\text{ if n is even} \\ n - 1,\text{ if n is odd} \end{array} \right .$

So to calculate $\displaystyle f(f(n))$,

If n is even this is $\displaystyle f(f(n)) = f(n + 3) = (n + 3) - 1 = n + 2$

since n + 3 is odd.

If n is odd then this is $\displaystyle f(f(n)) = f(n - 1) = (n - 1) + 3 = n + 2$

since n - 1 is even.

So $\displaystyle f^2(n) = n + 2$ for all n.

You do the rest.

-Dan - Apr 7th 2008, 04:35 PMshawn
Ah okay got it..thanks.

So, $\displaystyle f^2(n) = n + 2$ when n is odd

and $\displaystyle f^2(n) = n + 2$ when n is even

and $\displaystyle f^3(n) = n + 5$ when n is odd

and $\displaystyle f^3(n) = n + 1$ when n is even

and $\displaystyle f^4(n) = n + 6$ when n is odd

and $\displaystyle f^4(n) = n + 4$ when n is even

I don't see a pattern for a simple formula? - Apr 8th 2008, 08:23 PMshawnInductive Proof
I'm doing part c now,

Basis is easy when k = 3.

Inductive step

Let x >=3 be an integer.

Our IH is (from the formula's I found for part b)

f^x (n) = n + x when x is even, and

f^x (n) = n + x + 2(-1)^n when x is odd

We want to prove that

f^x+1(n)=n+x+1 when x+1 is even, and

f^x+1(n)=n+x+1+2(-1)^n when x+1 is odd

**Is the above correct?**

So we have two cases from here:

**Case 1**: when x+1 is even, x is odd

Now, f^x+1(n) = f(f^x(n)) = f(n +x + 2(-1)^n)

Now, I think we have two more sub cases but I'm not sure?

**Case 2**: when x+1 is odd, x is even

Now, f^x+1(n) = f(f^x(n)) = f(n + x)

Now, I think we have two more sub cases but I'm not sure?

Can someone help me finish the sub cases?

Thanks!