Question 20

On a natural number $$n$$ you are allowed two operations: (1) multiply $$n$$ by $$2$$ or (2) subtract $$3$$ from $$n$$. For example starting with $$8$$ you can reach $$13$$ as follows: $$8\rightarrow 16\rightarrow 13$$. You need two steps and you cannot do in less than two steps. Starting from $$11$$, what is the least number of steps required to reach $$121$$?


Correct Answer: 10

Let us denote the two admissible moves on a number $$n$$ as
(1) $$n \rightarrow 2n$$   (multiply by $$2$$)
(2) $$n \rightarrow n-3$$   (subtract $$3$$).

The target $$121$$ is odd, therefore it cannot be obtained from the previous number by doubling (operation 1). Hence the last move must be operation 2, coming from $$124$$:

$$124 \;-\;3\;=\;121$$

To minimise the total number of steps we now work backwards. For any integer $$x$$ the possible predecessors are

• $$x+3$$   (because subtracting $$3$$ would take that predecessor to $$x$$),
• $$\dfrac{x}{2}$$ if $$x$$ is even (because doubling that predecessor would give $$x$$).

Starting from $$121$$ we repeatedly generate all predecessors that have not appeared before. Doing this level by level guarantees the first time we meet $$11$$ corresponds to the shortest route.

Backward search

$$\begin{array}{c|l} \text{Depth} & \text{Numbers obtained at this depth} \\\hline 0 & 121 \\ 1 & 124 \\ 2 & 62,\;127 \\ 3 & 31,\;65,\;130 \\ 4 & 34,\;68,\;133 \\ 5 & 17,\;37,\;71,\;136 \\ 6 & 20,\;40,\;74,\;139 \\ 7 & 10,\;23,\;43,\;77,\;142 \\ 8 & 5,\;13,\;26,\;46,\;80,\;145 \\ 9 & 8,\;16,\;29,\;49,\;83,\;148 \\ 10 & \boxed{11},\,4,\,\ldots \end{array}$$

The first appearance of $$11$$ is at depth $$10$$, so a minimum of 10 moves is necessary.

Constructing the forward path
Tracing predecessors from $$11$$ back to $$121$$ and reversing the order gives an explicit optimal sequence:

$$11 \xrightarrow{-3} 8 \xrightarrow{-3} 5 \xrightarrow{\times2} 10 \xrightarrow{\times2} 20 \xrightarrow{-3} 17 \xrightarrow{\times2} 34 \xrightarrow{-3} 31 \xrightarrow{\times2} 62 \xrightarrow{\times2} 124 \xrightarrow{-3} 121$$

The list of operations is
$$-3,\; -3,\; \times2,\; \times2,\; -3,\; \times2,\; -3,\; \times2,\; \times2,\; -3$$ - exactly $$10$$ steps.

Therefore, starting from $$11$$ the least number of steps required to reach $$121$$ is 10.

Get AI Help

Book Free CAT Mentorship

Get personalized CAT strategy from a 99%iler

500+ students mentored
CAT mentor
banner

banner

50,000+ JEE Students Trusted Our Score Calculator

Predict your JEE Main percentile, rank & performance in seconds

Ask AI