3

Zeckendorf and Golden Ratio Base are clearly closely related, but still it seems tricky to convert from one to the other. I know that there is work by Frougny and Sakarovitch on this, but I haven't fully understood this. One problem is that Golden Ratio Base representations are rather symmetrical around the radix point, which suggests that these representations may be context free. Sakarovitch and Frougny deal with this by using "folded" Golden Ratio Base numbers. With this modified representation they can supposedly do the conversion with a finite state transducer, but I didn't grasp how this should work.

As for the partial symmetry of Golden ratio base, this has to do with roots coming in pairs (there's a longer explanation that I have of this from George Bergman (pc)).

One thing I do know about the relation between these two representations is that for every Golden Ratio base representation of the form d-1...d_i*d_j...d_n (using '*' as radix point), there is a corresponding equation involving Fibonacci numbers:

Example 4 = 101.01 <=> 4f_n = f_{n+2} + f_n + f_{n-2}   (with f_0 = f_1 = 1
                                                          and f_n = f_{n-1} + f_{n-2})
For n=3,  f_n=3:  12 =   10101
for n=4,  f_n=5:  20 =  101010
for n=5   f_n=8:  32 = 1010100    

(Etc. There is a whole series of numbers that all have the same Zeckendorf bit pattern as Golden Ratio base representation for 4). This sure looks like it ought to be helpful, but how?

This pattern is discussed in D. Gerdemann, Combinatorial proofs of Zeckendorf family identities Fibonacci Quarterly, 2008/2009.

BTW: Despite having a paper in the Fibonacci Quarterly, I'm strictly an amateur in this area. There are a lot of gaps in my knowledge, including the gap I am asking about.

C. K. Young
  • 219,335
  • 46
  • 382
  • 435
Dale Gerdemann
  • 739
  • 5
  • 7

1 Answers1

6

I know this answer is 1.75 years late to the party, but since no one else has tried to answer it and I was exploring the connection between Fibonacci numbers, Zeckendorf representation, and golden ratio base myself, I'll go ahead and post what I've found in related research and my best stab at an answer:

From now on I'll refer to golden ratio base as base phi or phinary for brevity.

Base phi is more strongly tied to the Lucas numbers than the Fibonacci numbers, which explains some of the difficulty you've had in directly converting them. But the Lucas numbers are related to the Fibonacci numbers by:

L[n] = F[n-1] + F[n+1]

and

5 * F(n) = (L[n-1] + L[n+1])

Lucas numbers relate to base phi this way:

L[n] = phi^n + (-1/phi)^n so the n'th and -n'th digits in base phi will be set for each Lucas number.

The direct representation of a Fibonacci number F[n] in terms of powers of phi is:

F[n] = ( phi^n - (-1/phi)^n )/sqrt(5) (notice the minus sign instead of a plus sign)

Which translates in phinary to:

F[n] = ( 10^n - (-0.1)^n )/10.1

Now sprt(5) is directly representable in phinary as 10.1, but it will only evenly divide a fibonacci number if the integer has a factor of 5 in it, because 5 and it's multiples are the only integers sqrt(5) divides. This means that in base phi, 5 is not a prime, but sqrt(5) is (technically it is a primitive prime ideal). sqrt(5) behaves in a very integer-like way. In fact any number finitely representable in base phi is called a Dirichlet Integer because of its integer-like behavior.

I found the above formulas on this web page which has more information on the relationship between Fibonacci numbers, Lucas numbers, and phi.

So here is my attempt at an algorithm. I ask the community to help me spot and correct any mistakes. I'm assuming the Zeckendorf and base phi representations are stored in an array with the Zeckendorf array from 0 to n and the Phinary array from -n to n, and I'm using C-like pseudocode:

for (int n = 0; n < length(Zeckendorf); n++) {
    if (Zeckendorf[n] == 1) {
        Phinary[n] = 1;
        /* in a real array, the negative n needs to be offset like fixed point */
        Phinary[-n] = -1; /* negative phinary digits
        can be converted to positive ones later
        (see Golden Ratio Base article on wikipedia) */
    }
}
Standardize(Phinary); /* Change -1's to 1's with 0,-1,0 -> -1,0,1
negatives will eventually cancel with their positive 1 neighbors to the left. */
/* Divide by sqrt 5 = 10.1 in phinary */
Sqrt5[-1 .. 1] = {1, 0, 1}
PhinalNumber = PhiDivide(Phinary, Sqrt5);

The methods for standardization to minimal form are documented on the wikipedia article for golden ratio base and division can be performed using the Euclidean Division algorithm.

An even better approach might be to use the Balanced Ternary Tau system so that the "rather symmetrical around the radix" property becomes "completely symmetrical around the 0th digit" property (called the Mirror Symmetric Property). The paper describing it is "Brousentsov’s Ternary Principle, Bergman’s Number System and Ternary Mirror-symmetrical Arithmetic" by Alexey Stakhov.

hatch22
  • 797
  • 6
  • 18
  • Thanks. Nice answer! Meanwhile, I've written a paper on the topic : Zeckendorf Family Identities published in the Fibonacci Quarterly and this paper is starting to get a few interesting citations. And I see to have independently discovered this ternary mirror symmetric arithmetic. I was really surprised. I sent it to George Bergman (who was surprised too) and I made a YouTube video about it. I also made a YouTube video relating Golden Ratio Base to the representations of Zeckendorf and Martin Bunder. To generate a sequence of Z- (or B=)reps, generatto GR-base and toss neg digits and repeats – Dale Gerdemann Feb 22 '13 at 03:36
  • That's awesome! I'm glad you liked my answer. Would you mind including links to the Youtube videos (and any related info) so that others can more easily find them? – hatch22 Feb 22 '13 at 15:54
  • There is a mistake where you write: L[n] = phi^n + (-1/phi)^n. This formula is only true for every second Lucas number. The others have a 10101...10101 pattern from beginning to end. Can your answer be fixed? – Dale Gerdemann Feb 22 '13 at 22:55
  • Okay I made a playlist with 10 videos. Mostly they contain a large bit of me playing around. http://www.youtube.com/watch?v=vpf7479tZbc&list=PLHZ0OOJSG_L1b1MdNDj3vbJvJO_ZsNsBZ. (start with number 10). More serious information in a new paper by Edward B Burger et al CANONICAL DIOPHANTINE REPRESENTATIONS OF NATURAL NUMBERS WITH RESPECT TO QUADRATIC \BASES" EDWARD B. BURGER in j. Number theory. Abstract. In 1957, Bergman proved that every natural number can be expressed uniquely as a sum of distinct, non-consecutive integral powers of ' = (1 + p5 )=2. More recently,in 2009, Gerdemann showed ... – Dale Gerdemann Feb 23 '13 at 13:08
  • I'm going on a trip this weekend, but I will try to fix it next week. Anyone else is welcome to as well. – hatch22 Feb 23 '13 at 13:40