Question
Consider the following recurrence:
Then, which of the following statements is/are TRUE?
Official answer and solution
- Official answer
- A, B and C
- From
- Official GATE 2022 answer key
Solution
Relate the recurrence to the binary representation of integers (the Josephus problem).
This recurrence is the classic Josephus recurrence with step size 2:
Writing any integer as where , the closed-form solution is .
Evaluating each option:
- (A) For : We have , so and .
(TRUE) - (B) For : Here .
(TRUE) - (C) For : Here and .
(TRUE) - (D) For : Here and .
for . (FALSE)
Therefore, (A), (B), and (C) are TRUE.
Options (A), (B), (C)
Assuming by extrapolating from where .
The answer is the one in the official GATE answer key. The solution is this site's own explanation.
Source
- Paper
- GATE 2022 Computer Science and Information Technology (CS)
- Question
- 51 of 65
- Section
- Computer Science and Information Technology
Report an error in this question
GATE questions are the work of the organising institutes. This site is independent and is not affiliated with them.