# Change $102 \to 201$

Suppose you start with the number $102$ and, at each step, you are allowed to double the number, add the number's digits, multiply its digits, or add 1. Your goal is to go from $102$ to $201$ in as few steps as possible. Of course, you could add $1$ $99$ times, but... where's the fun in that? Here is my best attempt:

$102 \to 3 \to 6 \to 12 \to 24 \to 25 \to 50 \to 100 \to 200 \to 201$

• Your attempt is indeed the least amount of steps possible. – Pjotr5 May 21 '17 at 20:02
• @Frpzzd Yes, The other two paths result in the same answer of 9, with the beginning being multiply by two, then add the digits, being 102 -> 204 -> 6... or once again multiply to make 102 -> 204 -> 408 -> 12 ... – ben-Nabiy Derush May 21 '17 at 20:12
• ‮ ‮Just add a right to left character in front of the 102 and it'll become 201 in a jiffy. D: – Simply Beautiful Art May 21 '17 at 22:06
• Just don't use excessively or you will get in trouble. (gives the serious look) – Simply Beautiful Art May 21 '17 at 22:40
• I can do it in zero mathematical steps by turning my calculator upside-down.... – Hellion May 22 '17 at 18:31

No - there is not a shorter path

but

there are alternate paths. You can start the sequence with 102 doubled is 204 summed is 6...

or

Start with 102 doubled is 204 doubled is 408 summed is 12...

Your attempt uses the least amount of steps possible. I have written a computer program that calculates the shortest possible paths between $102$ and $201$ and it has found four with nine steps. I believe that these are all of them:

\begin{align*}102 \to 3 \to 6 \to 12 \to 24 \to 25 \to 50 \to 100 \to 200 \to 201\end{align*} \begin{align*} 102 \to 204 \to 6 \to 12 \to 24 \to 25 \to 50 \to 100 \to 200 \to 201 \end{align*} \begin{align*} 102 \to 204 \to 408 \to 12 \to 24 \to 25 \to 50 \to 100 \to 200 \to 201 \end{align*} \begin{align*} 102 \to 204 \to 408 \to 816 \to 48 \to 49 \to 50 \to 100 \to 200 \to 201 \end{align*}

I find the last one the most interesting.

• That last one is interesting... the only one that uses the product of the digits. – Franklin Pezzuti Dyer May 21 '17 at 20:31
• @Pjotr5 can you share the logic of the computer program you made? It interests me. – prog_SAHIL May 22 '17 at 14:22
• Glad you posted your answer as well. I missed that last one. – ben-Nabiy Derush May 23 '17 at 3:25
• @prog_SAHIL The program was nothing clever, just naive brute-force. It took a list of all paths of length $n$ and outputted all paths of length $n+1$. So for $\{\{102\}\}$ it would output $$\{\{102, 204\}, \{102, 3\}, \{102, 0\}, \{102, 103\}\}.$$ Then at each step it would check if $201$ was already reached. Because I knew it would terminate after at most $9$ iterations, I knew brute-force would be plenty fast enough. – Pjotr5 May 23 '17 at 14:03
• @Pjotr5 Thanks for the explanation :) – prog_SAHIL May 23 '17 at 14:38