For any integer n >= 2, we compute the integer h(n) by applying the following procedure to its
decimal representation. Let r be the rightmost digit of n.
(1) If r = 0, then the decimal representation of h(n) results from the decimal representation
of n by removing this rightmost digit 0.
(2) If 1 <= r <= 9 we split the decimal representation of n into a maximal right part R that
solely consists of digits not less than r and into a left part L that either is empty or ends
with a digit strictly smaller than r. Then the decimal representation of h(n) consists of the
decimal representation of L, followed by two copies of the decimal representation of R-1.
For instance, for the number n = 17,151,345,543, we will have L = 17,151, R = 345,543
and h(n) = 17,151,345,542,345,542.
Prove that, starting with an arbitrary integer n >= 2, iterated application of h produces the
integer 1 after finitely many steps.We identify integers n > = 2 with the digit-strings of their decimal representations and extend the definition of h to all non-empty strings with digits from 0 to 9. We recursively define ten functions f0 to f9 that map some strings into integers for k = 9,8, ...1,0. The function f9 is only defined on string x that entirely consists of nines. If x consists of m nines , then f9(x) = m + 1, m = 0, 1, ...
For k<=8 the domain of fk(x) is the set of all strings containing only of digits that are >= k. We write x in the form of x0 kx1 kx2 k ... xm-1 kxm where the strings xs only consists of digits >= k+ 1. String can be empty or m = 0 which means that digits need not appear. We define
fk(x) = Sum s = 0 to m of ( 4 ^ fk+1(xs))
We now use the following facts:
Fact 1 If x does not contain digits smaller than k, then fi(x) = 4 fi+1(xs) for all i = 0, .. k - 1.
In particular, fi(empty string) = 4 ^ (9-i) for all i = 0,1, ...9
We establish the same for k = 9, 8, ... 0 by induction
Fact 2 If the non-empty strings does not contain digits smaller than k, then f1(x) > f1(empty string) for all i = 0, ..., k
Now the fact 3 that will reduce the given problem to one of mere transformations:
Fact 3: f0(n) > f0(h(n))
Then the empty string will be reached after a finite number of applications of h. But starting from a string without leading zeros, empty string can only be reached via the strings 1->00->0->empty string. By that transformation sequence, the number 1 will appear after a finite number of applications of h.
The intuition behind the solution is that if we reduce the given problem to transformations where we can take use the criteria in the question which is to use the numbers smaller than r.
No comments:
Post a Comment