generalized cantor expansions - Rose

advertisement
Generalized Cantor Expansions
By, Joseph Galante
Abstract:
There are many ways to represent a number, commonly known as base
expansions. The most common expansions express numbers as sums of factors of a
number raised to powers. The most frequently used base is ten, which is the basis for our
decimal number system. Also common is the binary number system which is
implemented on virtually all computers in use today. However a more uncommon way to
represent a number is the so called cantor expansion of the number. This system uses
factorials rather than numbers to powers as the basis for the system, and it can be shown
that this produces a unique expansion for every natural number. However, if you view
factorials as products, then it becomes natural to ask what happens if you use other types
of products as bases. It can be shown that there is an uncountably infinite number of
bases which can be used to represent the natural, and real numbers uniquely.
Motivation:
Definition: The cantor expansion of the natural number n is
n  ak * k! a ( k  1) * (k  1)!....  a 2 * 2! a1 *1!
where i  [1, k ] 0  ai  i
n 1
The identity n!  1   i (i! ) is crucial since it allows “carries” to occur. When adding
i 0
numbers, it provides a meaning to advance to the next term in the base.
Example:
23 = 3*3!+2*2!+1*1!
24 = 23 + 1 = 3*3!+2*2!+1*1! + 1 = 4!
It is reasonably easy to show via induction that all natural numbers have a unique cantor
expansion, and the bulk of the proof consists of using instances of the identity.
Generalization:
Knowing that the identity is the key, it is conceivable that a more general identity will
yield a more general result. By recognizing that the original expansion relied upon
factorials and their properties, if a more general product is considered, this should
provide the necessary generalization.
Lemma:
Let S  {1, x1, x 2,... | where xi  1, xi  N }
Let p(n) = the nth element in the set S, starting the counting at n=0
n
Let P ( n )   p(i )
i 0
Our generalized identity then becomes:
n
P(n  1)  1   ( p(i  1)  1) P(i )
i 0
Pf/ By Induction:
Basis: n=0
P(0+1) = 1 + (p(0+1)-1)*P(0)
P(1) = 1 + (p(1)-1)*1 since P(0)=p(0)=1
p(1)*1=p(1)-1 +1 since P(1)=1*p(1)
p(1)=p(1)
true
Assume that this works for the first n natural numbers. Then show it works for n+1:
P(n+2) = p(n+2)*P(n+1)
from definition of P(n)
= (p(n+2)-1)*P(n+1) + P(n+1)
n
= (p(n+2)-1)*P(n+1) + ( 1   ( p(i  1)  1) P(i ) )
By the Inductive Hypothesis
i 0
n 1
P(n  2)  1   ( p(i  1)  1) P(i )
i 0
 By the principle of induction,
n
P(n  1)  1   ( p(i  1)  1) P(i )
n  0, n  N
i 0
QED
Thus we have shown that there is a more generalized identity which can be used to
extend the concept of a cantor expansion. Now we need a new definition to make it
rigorous.
Definition: The generalized cantor expansion (GCE) of the natural number n with
respect to set S is:
n  ak * P( k )  a ( k  1) * P(k  1)  ....  a1 * P(1)  a 0 * P(0)
where S, p, and P are as defined above.
0  ai  p(i  1), 0  i  k
Note the additional term a0*P(0) is not present in normal cantor expansion since it would
be the equivalent of adding the term 0*0! which does not effect the value of the
expansion. With this definition we are ready to prove that each natural can be written
uniquely in the generalized cantor expansion.
Theorem: All natural numbers n can be written in generalized cantor expansions, as
defined above.
Pf/ By Induction
Basis:
0=0*P(0) = 0*1
true
1=1*P(0) = 1*1
true
Assume the first n natural numbers can be written in generalized cantor expansion.
We now want to show that (n+1) can be written this way as well.
For convenience, lets assume that ak  0 , so that n  P(k ) . If the first term was zero, all
that would be required would be to consider a smaller number of terms and re-labeling
subscripts accordingly. We can break the inductive step up into three cases.
Case I: i  k st ai  p(i  1)  1
(This case covers the addition of one without any carries)
n  ai * P(i )  ....  a 0 * P(0)
n  ai * P(i )  ....  a 0 * P(0)  1
By the inductive hypothesis, we see that there exists a valid generalized cantor expansion
for this number, so we can rewrite it as such:
ai * P(i )  ....  a 0 * P(0)  1  (ai ' ) * P(i )  ....  (a 0' ) * P(0)
Then:
n  1  ak * P(k )  ....  (ai * P(i )  ....  a 0 * P(0)  1)
n  1  ak * P(k )  ....  (ai ' ) * P(i )  ....  (a 0' ) * P(0)
which is a valid generalized cantor expansion.
Case II: i  k st ai  p(i  1)  1, ak  p(n  1)  1
(This case covers a series of carries that terminates at the greatest digit place of the
number)
n  1  ak * P(k )  ( p(k )  1) * P(k  1)  ....  ( p(1)  1) * P(0)  1
n  1  ak * P( k )  P( k ) from the Lemma
n  1  (ak  1) * P(k )  0 * P(k  1)  ...  0 * P(0)
which is a valid generalized cantor expansion since (ak  1)  ( p(n  1)  1)  1  p(n  1)
Case III: i  k ai  p( n  1)  1
(This case covers a series of carries that results in advancing the number of digits in the
number representation by one)
n  1  ( p(k  1)  1) * P( k )  ( p(k )  1) * P(k  1)  ....  ( p(1)  1) * P(0)  1
n  1  1 * P(k  1)  0 * P(k )  ....  0 * P(0) from the Lemma
which is a valid generalized cantor expansion
 Since in all possibilities are covered by the three cases, and each case yields that the
number can be represented as a generalized cantor expansion, then by the principle of
induction, we can conclude that all natural numbers can be put into generalized cantor
expansion.
QED
Note that part of what makes this proof work is the careful way in which we defined the
set S. The only element in S which is allowed to be 1 is the first element. Every other
element must be 2 or greater. If we allowed other 1’s into the set then case III could
possibly fail. If p(k+n)=1 for all n>0 (ie S= {1,…,1,1,1,1…}) then ak+1 must be zero, and
so would every other greater order coefficient. This would mean that numerical
expression of n+1 is impossible, as it would appear to be an infinite sequence of zeros
and yet not be zero, and this would not be very useful.
Now that we know every natural number has a generalized cantor expansion, the question
of uniqueness arises.
Theorem: The generalized cantor expansion of a natural number is unique.
Pf/ Suppose Not.
Then there exists two different GCE representations under the same set S for some n
such that:
n  ak * P( k )  a ( k  1) * P(k  1)  ....  a1 * P(1)  a 0 * P(0) and
n  ( ak )'*P( k )  ( a ( k  1))'*P( k  1)  ....  ( a1)'*P(1)  ( a 0)'*P(0)
n - n = 0 so, then (ak  ak ' ) * P(k )  ...  (a 0  a 0' ) * P(0)  0
since ai  p (i  1) and ai '  p(i  1)
(ai  ai ' )  p(i  1) => (ai  ai ' )  P(i  1)
This implies each term will not interfere with the values of the other terms; the terms are
linearly independent of each other. This implies that:
(ai  ai ' )  0 i  ai  ai ' i
But if all the terms are the same, then there are not really 2 different expansions. This is
a contradiction.
 The generalized cantor expansion of a natural number is unique.
QED
Example
Let S=set of squares of natural numbers={1,4,9,16,…}
p(0)=1, p(1)=4, p(2)=9
P(0) =1, P(1)=4*1, P(2) = 9*4*1
Case 1 used:
Convert 137 into general cantor expansion for the given S
137 = 3*P(2) + 7*P(1)+1*P(0) = 3*(9*4*1) + 7*(4*1) + 1*(1)
137 => (3 7 1)S
137+1=138= 3*P(2) + (7*P(1) + 1*P(0)+1)= 3*(9*4*1) + 7*(4*1) + 2*(1)
137 => (3 7 2)S
Case 2 used:
Convert 71 into general cantor expansion for the given S
71 = 1*P(2) + 8*P(1)+3*P(0) = 1*(9*4*1) + 8*(4*1) + 3*(1)
71 => (1 8 3)S
71 + 1 = 72 = 2*P(2) + 0*P(1) + 0*P(0) = 2*(9*4*1)
72 => (2 0 0)S
Case 3 used:
Convert 575 into general cantor expansion for the given S
575 = 15*P(2) + 8*P(1)+3*P(0) = 15*(9*4*1) + 8*(4*1) + 3*(1)
575 => (15 8 3)S
575 + 1 = 576 = 1*P(3) + 0*P(2) + 0*P(1) + 0*P(0) = 1*(16*9*4*1)
576 => (1 0 0 0)S
These examples additionally illuminate the fact that representations using GCE need not
cover every possible combination of digits used. We note that if we start counting
upwards in the base used in the example, our representations leap from (1 8 3)S to (2 0
0)S . Thus the range of digits from (1 8 4)S to (1 9 9)S is off limits since it breaks the rules
of our representation. If we choose to break the rules, then we lose uniqueness of
representations.
It is interesting to consider the cardinality of the set of all possible generalized cantor
expansions.
Theorem: There is an uncountably infinite number of generalized cantor expansions.
Pf/
Each expansion has a unique set S which characterizes the expansion.
S  {1, x1, x 2,... | where xi  N }
We can construct another smaller set S’ such that
S '  {1, x1 mod 10, x 2 mod 10,... | where xi  S}
There is a one to one correspondence between the elements of S’ and the digits of a real
number x = 1. x1 x2 x3.... (standard notion of base 10 representation for reals used here).
Since every value of every variable will be reached if we consider the set of all GCE’s,
then every real number on the continuous interval [1,2) will be reached. Thus the
cardinality of S’ is the same as that of the reals - 1 , which is uncountably infinite, and S
which is larger set, is also infinitely uncountable.
QED
Now with this more powerful definition of a generalized cantor expansion, we can
examine how specific number systems fit into this definition.
Factorials
Factorials and the original cantor expansion, from which the generalization evolved, are a
simple case of the generalized theorems where:
S = {1,2,3,4,5….}
p(i) = i+1
P(i) = (i+1)!
And the identity then resolves as:
n 1
n 1
i 0
i 0
n
1   ( p(i  1)  1) * P(i )  1   (i  1)( i  1)!
= 1   i * (i! )
i 1
n
 1   i * (i! )
i 0
=(n+1)!
Which, is actually the original identity shifted up by one iteration;
n 1
n!  1   i (i! )
i 0
The coefficients for each term will be between 0  ai  p(i  1)  0  ai  i
which will yield the original cantor expansions:
n  ak * k! a ( k  1) * (k  1)!....  a 2 * 2! a1 *1!
Base-b
In general base b numbers can be represented using
S = {1,b,b,b,….} for b>1, b a natural number
p(0)=1, p(i) = b i>0
P(i) = b^i
Making the identity:
n
P( n  1)  1   (b  1) * b^ i  b^ ( n  1)
i 0
Additionally the coefficients will be between:
0  ai  p(i  1)  0  ai  (b  1)
and n  ak * b^ k  a ( k  1) * b^ ( k  1)  ...  a 0
which is the standard definition of a number in base b notation
Other Interesting Examples of Natural Numbers
There are several other interesting cases to consider for the set S.
Letting S  {1}  { primes }
The consecutive products become what are known as primorials
By picking this base, we can write numbers as sums of primorials.
17 = 2*(3*2*1) + 2*(2*1) + 1*(1) => (2 2 1)S
42 = 1*(5*3*2*1) + 2*(3*2*1)+0*(2*1)+0*(1) => (1 2 0 0) S
We can also go the other direction:
(1 0 0 0 0 0 0 0 0 0 0 1) S =>
1*(31*29*23*19*17*13*11*7*5*3*2*1) + 1*1=200560490131
(9 8 7 6 5 4 3 2 1) S => 9*(19*17*13*11*7*5*3*2*1) +
8*(17*13*11*7*5*3*2*1)+7*(13*11*7*5*3*2*1)+6*(11*7*5*3*2*1)+5*(7*5*3*2*1)+
4*(5*3*2*1)+3*(3*2*1)+2*(2*1)+1*(1) = 91606553
both of which are actually prime numbers.
The Leap to The Reals
Having considered several cases with the natural numbers, it becomes logical to question
whether Generalized Cantor Expansions can be generalized to the real numbers. With a
little work, and some motivational cases, it can be done.
The New Identity
Just as in the case with the natural numbers, we need an identity to make the
generalization possible. Additionally, we want the identity to look as much alike as
possible to the one used above, for consistency and with the hope of reusing some ideas.
Let S  {1, x1, x 2,... | where xi  1, xi  N }
Let p(n) = the nth element in the set S, starting the counting at n=0
n
Let P( n )  1 /[  p(i )]
i 0
Our generalized identity then becomes:
n
1   ( ( p(i )  1) * P(i ) )  P( n )
i 0
Pf/ By Induction
Basis: n=1
1=(p(0)-1)*P(0)+(p(1)-1)*P(1) + P(1) ; (p(0)-1)*P(1) =0, so it can be dropped
1=(p(1)-1)/p(1) + 1/p(1) since P(1) = 1/p(1)=1/(p(1)*1)=1/(p(1)*p(0))
1=p(1)/p(1)
1=1 true
Assume that this is true for n and show it is true for (n+1). Then
n 1
1   ( ( p(i )  1) * P(i ) )  P( n  1)
i 0
n
1   ( ( p(i )  1) * P(i ) )  ( p( n  1) - 1) P( n  1)  P( n  1)
i 0
n
1   ( ( p(i )  1) * P(i ) )  p( n  1) P( n  1)
i 0
n
1   ( ( p(i )  1) * P(i ) )  p( n  1)/p( n  1) * P( n )
i 0
n
1   ( ( p(i )  1) * P(i ) )  P( n )
i 0
which by the inductive hypothesis is assumed to be true.
Therefore the identity is true for all n≥1.
QED
Now that we have an identity, which in some respects is similar to that above for natural
numbers, we can create a definition.
Definition
A number x, 0≤x<1 can be represented in a Fractional Generalized Cantor Expansion
with respect to a set S iff

x  c1 * P(1)  c 2 * P( 2)  ...   (ci * P(i ))
i 1
where 0≤ci<p(i), with p, P, and S are defined immediately above.
We can write in short hand: x=( . c1 c2 c3 ….)S
It would be nice if all FGCE’s converge so that our definition is well defined, but first we
must know something about the function P.
Theorem: P is convergent.
Pf/
0<P(n) for all n≥0
Since xi  2 for all i≥1,
1
1
P(n) = ---------------- ≤ ----------- = (1/2)^n for all n
x1*x2*...*xn
2*2*...*2
Thus: 0<P(n) ≤ (1/2)^n for all n
Since P(n) is bounded below by zero and bounded above by the convergent sequence
(1/2)^n which approaches zero as n grows, then P is convergent, and converges to zero
QED
With this shown, we can continue.
Theorem: All FGCE series are convergent.
Pf/
From the lemma, which used the largest values of ci’s available under the definition, we
see:
n
n
i 1
i 1
1   ( ( p(i )  1) * P(i ) )  P(n ) → 1   ( ( p(i )  1) * P(i ) )  0
Thus the largest FGCE is bounded for any n.
Since P(n) is bounded above by (1/2)^n we can write:
n
0  (1   ( ( p(i )  1) * P(i ) ) )  P( n )  (1 / 2)^ n
i 1
Thus the sum converges, since it is bounded by a larger convergent sequence. Since all
coefficients ci are 0≤ ci ≤p(i)-1, then all other series have terms which are positive and
less than the larger convergent sum.
n
n
i 1
i 1
0  (1   ( ci * P(i )))  (1   ( ( p(i )  1) * P(i ) ) )  P( n )  (1 / 2)^ n
Therefore all FGCE series converge.
QED
Next we show that each real number has an FGCE associated with it.
Theorem: Each real number 0≤x<1 has a FGCE.
Pf/
Since finite partial sums of FGCE’s are actually rational numbers, which are dense on the
real line, we can pick two finite sums that satisfy, for x a real number:
n
n
i 1
i 1
 (ci * P(i ))  x   (ci * P(i ))  P(n)
then,
n
0  x   ( ci * P(i ))  P( n )  (1 / 2)^ n
i 1
We want this true for all n>N, so we can make a case for convergence.
By Picking an N  log( 1 /  ) / log( 2) , we can get
n
  0 N st. n  N  (1   ( ci * P(i )) )  (1 / 2)^ N  
i 1

→
 (c * P(i ))
i
converges to x.
i 1
QED
Lastly, we want to show that each FGCE is unique, however in the real numbers, we have
a problem. In the reals, digit expansions are not unique. For example in decimal,
1=0.9999999999999… . This can be true for any real number. So rather than show
uniqueness, we can just show a kind of “niceness” that each FGCE gets arbitrarily close
to the number that it is supposed to represent.
Theorem: Each FGCE, for a given 0≤x<1 and a given S, differs only by an arbitrarily
small amount.
Pf/
Suppose we have 2 different FGCE’s for a given x.
x=( . c1 c2 c3 ….)S
x=( . c1‘ c2‘ c3‘ ….)S
n
We want:   0 N st. n  N  (  (( ci  ci ' ) * P(i ))  0)  
i 1
Suppose Not. Then
n
  0 N st. n  N  (  (( ci  ci ' ) * P(i ))  l )   for some l≠0.
i 1

This implies that
 (( c 'c ) * P(i ))
i
i 1
But then this implies that
i
converges to l≠0.


i 1
i 1
 ci'*P(i )   ci * P(i )  l
→ x = x+ l
Since by assumption they are good representations for x.
But this is a contradiction since it implies l must be zero. Therefore the FGCE for the
same number must be off by only an arbitrarily small amount.
QED
As a useful convention, we can definite the proper FCGE as the expansion which is
exactly equal to the number it represents after a finite number of terms. For example
using S={1,2,2,2,2…}
1/2= ( . 1,0,0,0….)S or 1/2=( . 0,1,1,1,1…) S
In this case ( . 1,0,0,0….)S is the proper expansion since after one term, the expansion,
when evaluated will give back the exact number it is meant to represent.
Ex.
In regular decimal notation
1 is a proper FGCE, as opposed to 0.9999999…
With this definition, we can show that the FGCE produces some very interesting
properties with rational numbers.
Examples:
Consider S = {1,2,3,4,5…}

e-2=(1 1 1 1..) S which is expected since e  1 / k!
k 0
Log(2) = (1 1 0 3 1 0 3 6 2 5 4 6 11..) S (pattern not apparent)
24/25 = (1 2 3 0 1 1 3 1 8 0 0 0 0..) S
1/7 = (0 0 3 2 0 6 0 0 0 0..) S
These examples raise the natural question of whether all rational numbers have
terminating expansions for a specific base set. To show this is true, we need more tools
first. We need a lemma that allows us some freedom to work with rationals in [0,1).
Lemma: Terminating FGCE’s (FGCE’s with an infinite number of trailing zeros)
divide the interval [0,1) up into increments of P(n) for a given n.
Pf/
Let l, 0≤l<1 have a terminating FGCE:
c1
c2
cn
l= --- + ------ +….+ ---------------x1 x1*x2
x1*x2*...*xn
We can give all the fractions the same common denominator:
c1 x2*x3*...*xn c2 x3*x4*…*xn
cn
l= ----------------- + ------------------ +….+ ---------------x1*x2*...*xn
x1*x2*...*xn
x1*x2*...*xn
Looking at only the numerators, we see that they are essentially a GCE using
S={1, xn, x(n-1) ,….,x1} and since 0≤ ci< xi = p(i+1) (this p is the GCE p) in this
expansion. By a previous theorem, we know that all integers can be represented as GCE’s
including integers between 0 and x1*x2*...*xn. Thus all numerators are expressed, and
thus all fractions l with x1*x2*...*xn in the denominator between 0 and 1 are represented
using FGCE’s. Thus it divides up the interval in increments of P(n).
QED
With this, we can prove the interesting result:
Theorem: A rational number r=a/b with 0≤r<1 has a terminating proper FGCE iff
there exists an i st. b divides x1*x2*...*xi with respect to the base set S.
Pf/
<=:
Assume there exists such an i st b divides x1*x2*...*xi
Then b*d= x1*x2*...*xi for some i.
a a*d
a*d
- = ----- = -------------- < 1
b b*d
x1*x2*...*xi
By the previous lemma, a FGCE divides the unit interval up into fractions with
denominators of x1*x2*...*xi, of which a/b is one. Therefore a/b has a finite, terminating
expansion, as all terms beyond i have coefficients of zero.
=>:
Assume that r has a terminating FGCE.
Then
a
c1
c2
ci
r= - = -- + ------ +…. +------------b
x1 x1*x2
x1*x2*...*xi
By simply putting all the fractions in common denominator form and adding them, we
get
a
t
r = -- = -------------- < 1
b
x1*x2*...*xi
which implies b divides x1*x2*...*xi, since a/b may be the simplified form of the fraction
with the common factors of a and b removed.
Of course this whole proof really depends upon the choice of S. A necessary condition
for S to give a specific fraction a terminating expansion is that it contains the factors of
the denominator of r. Thus an appropriate choice of S to make all fractions have
terminating expansions would be one in which all possible factors where included. Once
we have selected such a base, the above statements hold.
QED
This is an interesting result since it implies that there is a base in which all fractions have
a terminating expansion.
For example consider S={1,2,3,4,5…}. Since every possible factor is contained in this
set, there will always be an i to make the theorem true, and thus give a/b a terminating
expansion.
Finally, we realize that every real number consists of an integer and decimal part. The
GCE allows all the integer parts to be represented, and the FGCE allows all decimal parts
to be represented. Thus the expansion real number can be thought of as a list of
coefficients for the GCE and FGCE with respect to two base sets. We can write for a real
number x:
x=( cn … c2 c1 . c1‘ c2‘ c3‘ ….)S, S’
with the S and numbers before the decimal point representing a GCE and the S’ and
numbers after the decimal point representing a FGCE. S is still uncountably infinite, so
there are an infinitely uncountable number of ways to represent the real numbers.
Example:
S=S’ = {1, primes}
ππ = 36 + 0.46215960…
= ( 1 1 0 0 . 0 2 3 6 0 7 11 1 21 4 28 ….)S, S’ (no apparent pattern)
Conclusion
As we have shown, there are an uncountably infinite number bases for which the real
numbers can be represented. Some representation methods are common day, such as
decimal, others are more exotic, such as the factorial base, and still others have many
practical applications, such as binary. But how general can we make our
representations? Donald Knuth said that π is 10 in base π. Perhaps the generalized
representations presented here can be extended further to include rational and real
numbers into the sets defining the represention. These new representations could be very
useful in digit related number theory which seeks to study properties of numbers based on
their expansions. For example, the study of additive persistence and digital roots
normally uses base 10 numbers, however, now since it has been shown there are an
uncountably infinite number of bases, those concepts can be expanded. Such may be true
of much in the field of digit related number theory.
Thanks
Special Thanks to Ken McMurdy for constructive feedback, comments, and support that
helped make this paper possible.
References:
Friedberg, Insel, Spence. Linear Algebra. Third Edition. Prentice Hall. New Jersey
ISBN 0-13-233859-9
Johnsonbaugh, Richard. Discrete Mathematics. Second Edition. Macmillan Publishing
Company. New York. ISBN 0-02-359690-2
Ore, Oystein. Number Theory and Its History. Dover Publications. Inc. New York.
ISBN 0-486-65620-9
Rosen, Kenneth H. Discrete Mathematics. Fourth Edition. McGraw Hill.
ISBN 0-07-289905-0
Spivak, Michael. Calculus. Third Edition. Publish or Perish Inc.
ISBN 0-914098-89-6
Weisstein, Eric. MathWorld. “Additive Persistence”
http://mathworld.wolfram.com/AdditivePersistence.html
Weisstein, Eric. MathWorld. “Base.” http://mathworld.wolfram.com/Base.html
Weisstein, Eric. MathWorld. “Digital Root”
http://mathworld.wolfram.com/DigitalRoot.html
Weisstein, Eric. MathWorld. “Primorial” http://mathworld.wolfram.com/Primorial.html
Wikipedia. “Dedekind Cut” http://www.wikipedia.org/wiki/Dedekind_cut
Download