Subscribe to Computing Intelligence

Tuesday, February 24, 2009

Puzzle Number One

While I have received some helpful suggestions by email for puzzles which I will likely use in the future, I am going to start the puzzles off with a simple exercise in mental mathematics (I actually invented it one night when I was having a hard timing falling asleep... as a kid I never understood what people were talking about with counting sheep, but I did find doing arithmetic in my head helped. My default exercise was to simply multiply numbers continuously by two and see how large I could get them, but every so often I would try something else too). The exercise goes like so:
Let x and y be two integers from 0 to 9. Iterate x and y in the following manner: Let z = x*y. Then the tens digit of z becomes the new x and the ones digit becomes the new y (note, if the numbers multiply to equal a single digit number, the new x becomes 0). What starting values of x and y allow one to achieve the highest number of iterations before both x and y become 0?
Just to clarify, I will do an example: x = 2, y = 6. 2*6 = 12, so the new x = 1 and y = 2. 1*2 = 2, so the new x = 0 and the new y = 2. 0*2 = 0, so you are finished after 3 iterations.

Note: Please remember to jot a few notes about your reasoning or methods along with any solution you send me, as I am curious what people will come up with. Seeing as how I completely made this exercise up as an aid to fall asleep, I have no idea what the optimal approach would be.

1 comments:

Anonymous said...

Haven't tried this to go to sleep but trying just a few simple examples (0*9; 1*9; 2*9 for example) and finding they come out to "0" fairly quickly, I wondered how many combinations are available with the digits "0 to 9" and then wondered how one would be able to remember which of the combinations had been previously tried and, finally, how many itertions each combination produced before falling asleep.
G