Neat!
The final animation shown might be a good match for the cheap e-badges that have been reverse engineered with their round 240x240 or 320x320 displays (SuperBand, Fitpro, dg01, dg02, BJ-1, ...)
I just learned about Fibonacci hashing, where you multiply a hash function by a certain factor derived from the golden ratio, which gives you better distribution than a bare integer modulo.
Is this used for smoothing any other kinds of outputs that you know of? Like, say, removing noise from big data tables you're using for symbolic regression? I've never come across this before but it seems like it's got a lot of potential compared to other methods.
I noticed in step 5 of this that you get spirals at Fibonacci numbers like 55 and 89 (which are 34 apart). However, if you pick 72 which is half way between the spirals, you see something interesting happen.
If you are curious about a three-dimensional case of distributing points (relatively) evenly, then John Cook has something on that for points on a sphere. And it's also using a Fibonacci pattern.
I think it was the Numberphile video on the Golden Ratio that taught me this fun fact: the Golden Ratio is the most irrational number possible. If you write out an irrational number as a continued fraction (x + 1/(y + 1/(z + 1/...))), or [x, y, z] in shorthand notation, then anywhere there's a large number for x, y, or z, that's a place where you can produce a good approximation. For example, pi is 3 + the continued fraction [7, 15, 1, 292, 1, ...]. The number 15 means there's a pretty large denominator there, so a small value added to 3+1/7, meaning that 22/7 is a halfway decent approximation of pi. But that 292 means that the fraction at that point is 3 + 1/(7 + 1/(15 + 1/(1 + 1/(292 + ...)))). Now 1/(292 + small amount) is a very small number, so if you drop that off, then the value you get won't be very far off from pi at all. So you can round that to 3 + 1/(7 + 1/(15 + 1/(1 + 0))) which is equal to 355/113 — and it turns out that that's quite a good approximation of pi for practical everyday uses, as it's correct to six decimal points.
But the golden ratio is defined as the number a/b that is also equal to (a+b)/a. Now (a+b)/a = a/a + b/a. And what is b/a but 1/(a/b). So the golden ratio, phi, can be written as phi = 1 + 1/phi. Now substitute (1 + 1/phi) for the phi in that right-hand side and you get phi = 1 + 1/(1 + 1/phi). Substitute again and you continue to get (1 + 1/phi) terms continuing onwards. Which means that the continued fraction of phi is just [1, 1, 1, 1, 1, 1 ...] forever.
Since there is no number higher than 1 in that continued fraction, there is no point at which you can take the approximation and know that it's better than taking the approximation somewhere else, unlike pi where you can know that 355/113 is very very close. There is no rational fraction that is a better approximation of the actual value than what you would have gotten if you went another step or two down the chain. (Proportionally speaking, of course: naturally you'll get more decimal digits of correctness the longer you go, but at no point will the proportions be better).
So that's why the golden ratio is the most irrational number. Any other irrational number has at least one point where there's a 2 (or higher) in the continued fraction, meaning there is some place you could stop the continued fraction and get a better approximation than stopping elsewhere. There is some rational fraction that is a better approximation to the actual value than other rational fractions. But the golden ratio's continued-fraction representation is just 1s, forever. And that means there is no place you can stop and say "this spot is a better approximation than the others". It's the most irrational number.
Neat! The final animation shown might be a good match for the cheap e-badges that have been reverse engineered with their round 240x240 or 320x320 displays (SuperBand, Fitpro, dg01, dg02, BJ-1, ...)
I just learned about Fibonacci hashing, where you multiply a hash function by a certain factor derived from the golden ratio, which gives you better distribution than a bare integer modulo.
https://probablydance.com/2018/06/16/fibonacci-hashing-the-o...
The graph of the distribution is indeed very similar to the LEDs in this article: https://book.huihoo.com/data-structures-and-algorithms-with-...
So if you find yourself doing:
Consider introducing Fibonacci hashing. And the reason this works, and provides uniform distribution is this: https://en.wikipedia.org/wiki/Equidistribution_theoremIs this used for smoothing any other kinds of outputs that you know of? Like, say, removing noise from big data tables you're using for symbolic regression? I've never come across this before but it seems like it's got a lot of potential compared to other methods.
I noticed in step 5 of this that you get spirals at Fibonacci numbers like 55 and 89 (which are 34 apart). However, if you pick 72 which is half way between the spirals, you see something interesting happen.
If you are curious about a three-dimensional case of distributing points (relatively) evenly, then John Cook has something on that for points on a sphere. And it's also using a Fibonacci pattern.
https://www.johndcook.com/blog/2023/08/12/fibonacci-lattice/
Can this be extended to n-dimensions or a n-torus?
I think it was the Numberphile video on the Golden Ratio that taught me this fun fact: the Golden Ratio is the most irrational number possible. If you write out an irrational number as a continued fraction (x + 1/(y + 1/(z + 1/...))), or [x, y, z] in shorthand notation, then anywhere there's a large number for x, y, or z, that's a place where you can produce a good approximation. For example, pi is 3 + the continued fraction [7, 15, 1, 292, 1, ...]. The number 15 means there's a pretty large denominator there, so a small value added to 3+1/7, meaning that 22/7 is a halfway decent approximation of pi. But that 292 means that the fraction at that point is 3 + 1/(7 + 1/(15 + 1/(1 + 1/(292 + ...)))). Now 1/(292 + small amount) is a very small number, so if you drop that off, then the value you get won't be very far off from pi at all. So you can round that to 3 + 1/(7 + 1/(15 + 1/(1 + 0))) which is equal to 355/113 — and it turns out that that's quite a good approximation of pi for practical everyday uses, as it's correct to six decimal points.
But the golden ratio is defined as the number a/b that is also equal to (a+b)/a. Now (a+b)/a = a/a + b/a. And what is b/a but 1/(a/b). So the golden ratio, phi, can be written as phi = 1 + 1/phi. Now substitute (1 + 1/phi) for the phi in that right-hand side and you get phi = 1 + 1/(1 + 1/phi). Substitute again and you continue to get (1 + 1/phi) terms continuing onwards. Which means that the continued fraction of phi is just [1, 1, 1, 1, 1, 1 ...] forever.
Since there is no number higher than 1 in that continued fraction, there is no point at which you can take the approximation and know that it's better than taking the approximation somewhere else, unlike pi where you can know that 355/113 is very very close. There is no rational fraction that is a better approximation of the actual value than what you would have gotten if you went another step or two down the chain. (Proportionally speaking, of course: naturally you'll get more decimal digits of correctness the longer you go, but at no point will the proportions be better).
So that's why the golden ratio is the most irrational number. Any other irrational number has at least one point where there's a 2 (or higher) in the continued fraction, meaning there is some place you could stop the continued fraction and get a better approximation than stopping elsewhere. There is some rational fraction that is a better approximation to the actual value than other rational fractions. But the golden ratio's continued-fraction representation is just 1s, forever. And that means there is no place you can stop and say "this spot is a better approximation than the others". It's the most irrational number.
Excellent write-up, I was wondering whether the properties explored in the post could just apply to any irrational number.