Consider the following recurrence:
Then, which of the following statements is/are
GATE CSE 2022Combinatory › Recurrence Relations & Generating FunctionsVerified
(A, B, C) f ( 2 n – 1 ) = 2 n – 1 f(2^{n} – 1) = 2^{n} – 1 f ( 2 n –1 ) = 2 n –1; f ( 2 n ) = 1 f(2^{n}) = 1 f ( 2 n ) = 1; f ( 5 ⋅ 2 n ) = 2 n + 1 + 1 f(5 \cdot 2^{n}) = 2^{n+1} + 1 f ( 5 ⋅ 2 n ) = 2 n + 1 + 1
The recurrence is the standard Josephus recurrence. For any integer $n$ with $2^m \le n \< 2^{m+1}$, the closed form is $f(n)=2(n-2^m)+1$. Evaluate each option using this closed form.
The closed form $f(n)=2(n-2^m)+1$ where $2^m \le n \< 2^{m+1}$ confirms options A, B, and C. Option D gives the constant 3, not $2^n+1$, so it is not universally true.
Reviewed by GateIQ Editorial Team: IIT & IISc Alumni.