On a giant tape measure sits an N-frog: that is, a frog with a special preference for the number N. The frog's location at the beginning of each of its jumps is called M. The frog moves on the tape measure according to the following rules:
Whenever M>N, then the N-frog makes an N-jump to the left and lands on the number M-N.
Whenever M<N, then the N-frog makes an N-jump to the right and lands on number M+N; during landing it also changes its preference and becomes an M-frog.
Whenever M=N then the frog is happy and stays on that number.
Where will a 851-frog that sits on 1517 be happy?
Where will an N-frog that sits on M be happy?
1517 - 851 = 666
We have the behaviour of an N-frog, but when it becomes an M-frog, what is its behaviour?
My N-frog's jumps return it to its initial place on the tape.
It needs to be retrained.
|
Posted by brianjn
on 2005-07-09 07:22:47 |