You have a simple (base-ten, whole number) calculator which can perform only two operations: visually reversing a number, and adding seven.
Prove that you can use this calcluator to convert any number to 1.
Notation: use ~ to denote reversal, as in
~53 = 35
(In reply to Straightforward Solution
Both your procedure and mine work - no doubt, but the number of operations needed is totally different .
In your case this number is proportional to the initial number and in mine- to the number of digits.
Consider a one digit number 5 . You really want to press
"add 7" (and all you have is a simple calculator) 14000 times to get 10^5- which is 5 mod7 -and then to inverse it???. Please compare it with 5==>40==> 4 ==> 60==> 6 ==>20 ==>2 ==>30==> 3 ==>10==> 1 about 25 operations!!
I agree that this consideration was not part of the question but still let us give preference to "executable" solutions.
Edited on February 24, 2004, 11:37 am