A mathematical frog jumps along the number line. The frog starts at , and jumps according to the following rule: if the frog is at integer , then it can jump either to or to where is the largest power of that is a factor of . Show that if is a positive integer and is a nonnegative integer, then the minimum number of jumps needed to reach is greater than the minimum number of jumps needed to reach .
Solutions — 3
Solution 1
For and , let denote the minimum number of jumps needed to reach the integer . We must prove that
for all and . We prove this using the method of descent.
First note that holds for and all , because it takes jumps to reach the starting value , and at least one jump to reach . Now assume that is not true for all choices of and . Let be the minimal value of for which fails for some , let be the minimal value of for which . Then it must be the case that and .
Let be a shortest sequence of integers that the frog occupies in jumping from to . The length of each jump, that is, the difference between consecutive integers in , is either or a positive integer power of . The sequence cannot contain because it takes more jumps to reach than it does to reach . Let , be the length of the longest jump made in generating . Such a jump can only be made from a number that is divisible by (and by no higher power of ). Thus we must have , since otherwise a number divisible by is visited before is reached, contradicting the definition of .
Let be the length of the jump when the frog jumps over . If this jump starts at for some positive integer , then it will end at . Since it goes over we see or . Thus and the jump over is from to .
Considering the jumps that generate , let be the number of jumps from to , and let be the number of jumps from to . By definition of , it follows that can be reached from in less than jumps. On the other hand, because , the number can be reached from in exactly jumps by using the same jump length sequence as in jumping from to . The key point here is that the shift by does not affect any of divisibility conditions needed to make jumps of the same length. In particular, with the exception of the last entry, , all of the elements of are of the form with , again because of the definition of . Because and the number is odd, a jump of size can be made from just as it can be made from .
Thus the frog can reach from in less than jumps, and can then reach from in jumps. Hence the frog can reach from in less than jumps, that is, in fewer jumps than needed to get to and hence in fewer jumps than required to get to . This contradicts the definition of .
Solution 2
Suppose are the integers visited by the frog on his trip from to , . Let be the jump sizes. Define a reduced path inductively by
Say a jump is deleted in the second case. We will show that the distinct integers among the give a shorter path from to . Clearly for all . Suppose for some . Then every deleted jump before must have length greater than , hence must be a multiple of . Thus . If , then either (in which case this is a valid jump) or is the exact power of dividing . In the second case, since , the congruence says is also the exact power of dividing , thus again this is a valid jump. Thus the distinct form a valid path for the frog. If the congruence gives , but this is impossible for . Hence we see , that is, the reduced path ends at . Finally since the reduced path ends at at least one jump must have been deleted and it is strictly shorter than the original path.
Solution 3
(By Brian Lawrence) Suppose can be reached in jumps.
Our approach will be to consider the frog's life as a sequence of leaps of certain lengths. We will prove that by removing the longest leaps from the sequence, we generate a valid sequence of leaps that ends at . Clearly this sequence will be shorter, since it was obtained by removing leaps. The result will follow.
Lemma If we remove the longest leap in the frog's life (or one of the longest, in case of a tie) the sequence of leaps will still be legitimate.
Proof: By definition, a leap from to is legitimate if and only if either (a) , or (b) . If all leaps are of length , then clearly removing one leap does not make any others illegitimate; suppose the longest leap has length .
Then we remove this leap and consider the effect on all the other leaps. Take an arbitrary leap starting (originally) at , with length . Then . If the new leap is legitimate no matter where it starts. Say . Then . Now if the leap is before the removed leap, its position is not changed, so and it remains legitimate. If it is after the removed leap, its starting point is moved back to . Now since , we have ; that is, does not divide . Therefore, is the highest power of dividing , so and the leap is still legitimate. This proves the Lemma. ■
We now remove leaps from the frog's sequence of leaps in decreasing order of length. The frog's path has initial length ; we claim that at some point its length is .
Let the frog's leaps have lengths
Define a function by
Clearly is the frog's final position if we remove the longest leaps. Note that – if we remove all leaps, the frog ends up at . Let be the last value of that is at least . That is, suppose , . Now we have for all since is a decreasing sequence of powers of . If , we have for , so . But , contradiction. Thus , so, since is a power of two, . Since and , we know that , and . So , are two consecutive multiples of , and (another such multiple) satisfies . Thus we have , so by removing leaps we make a path for the frog that is legitimate by the Lemma, and ends on .
Now let be the minimum number of leaps needed to reach . Applying the Lemma and the argument above the frog can reach in only leaps. Since trivially ( implies ) we have as desired.