MathLabs

Problem 4

Consider the function f:N0→N0f:\mathbb N_0\to\mathbb N_0, where N0\mathbb N_0 is the set of all non-negative integers, defined by f(0)=0f(0)=0, f(2n)=2f(n)f(2n)=2f(n) and f(2n+1)=n+2f(n)f(2n+1)=n+2f(n) for all n≥0n\ge0. (a) Determine the three sets L={n∣f(n)<f(n+1)}L=\{n\mid f(n)<f(n+1)\}, E={n∣f(n)=f(n+1)}E=\{n\mid f(n)=f(n+1)\}, and G={n∣f(n)>f(n+1)}G=\{n\mid f(n)>f(n+1)\}. (b) For each k≥0k\ge0, find a formula for ak=max⁡{f(n):0≤n≤2k}a_k=\max\{f(n):0\le n\le2^k\} in terms of kk.
Step 2 of 6: Bound the successive difference
f(n+1)−f(n)≤n(n≥0)f(n+1)-f(n)\le n\quad(n\ge0)
Detailed analysis

Prove by induction that f(n+1)−f(n)≤n. For even n=2t the difference equals t. For odd n=2t+1, the induction hypothesis at t gives 2(f(t+1)−f(t))−t≤t<n.