A couple commenters quickly figured out what my previous post without words was about. The dots making up the image are at integer grid points , with the center at . There is a dot at if and only if and are relatively prime, that is, . Here is a slightly smaller version so it’s easier to see what is going on:
I learned from Lucas A. Brown that this is sometimes known as “Euclid’s Orchard”. Imagine that there is a tall, straight tree growing from each grid point other than the origin. If you stand at the origin, then the trees you can see are exactly those at grid points with . This is because if a tree is at for some , then it is blocked from your sight by the tree at : both lie exactly along the line from the origin with slope . But if a tree is at some point with relatively prime coordinates , then it will be the first thing you see when you look along the line with slope exactly .
(…well, actually, all of the above is only really true if we assume the trees are infinitely skinny! Otherwise trees will end up blocking other trees which are almost, but not quite, in line with them. So try not to breathe while standing at the origin, OK? You might knock over some of the infinitely skinny trees.)
Here’s the portion of the grid surrounding the origin, with the lines of sight drawn in along with the trees you can’t see because they are exactly in line with some closer tree. (I’ve made the trees skinny enough so that they don’t accidentally block any other lines of sight—but if we expanded the grid we’d have to make the trees even skinner.)
Now, what about the colors of the dots? Commenter Snowball guessed this correctly: each point is colored according to the number of steps needed for the Euclidean algorithm needed to reach 1. Darker colors correspond to more steps. It is interesting to note that there seems to be (eight symmetric copies of) one particularly dark radial stripe, indicated below:
In fact, the slope of this stripe is exactly ! This corresponds to the fact (first proved by Gabriel Lamé in 1844) that consecutive Fibonacci numbers are worst-case inputs to the Euclidean algorithm—that is, it takes more steps for the Euclidean algorithm to compute than for any other inputs of equal or smaller magnitude. Since the ratio of consecutive Fibonacci numbers tends to , the dots with the darkest color relative to their neighbors all lie approximately along the line with slope . What’s interesting to me is that lots of other dots that lie close to this line are also relatively dark. Why does this happen?
Pingback: New top story on Hacker News: Euclid’s Orchard, the Euclidean algorithm, and Fibonacci numbers, with pictures – The Internet Yard
The quadrants looks mighty familiar: https://mathlesstraveled.files.wordpress.com/2016/08/838af457ca043c87.png
They certainly look similar because of the radial lines, but actually I think they are quite different. Though if someone knows of a deeper relationship between them I’d love to hear about it!
Claim: if and only if is a primitive root of unity.
Consider the point , where .
Suppose . Then , so is a root of unity. As and is a root of unity, is not a primitive root of unity.
Suppose . Suppose that is not a primitive root of unity. Then there is some such that is an root of unity, i.e., . Thus . As , we must have . This is a contradiction, since . Therefore must be a primitive root of unity.
Oh, I see, very nice!
Looking around you from a point along radial lines is actually used to estimate the density by area of forests.
Pingback: From primitive roots to Euclid’s orchard | The Math Less Traveled
What a beautiful visualisation of Euclid’s Orchard! I can’t stop looking at it and want to tile my floor with it 🙂
> What’s interesting to me is that lots of other dots that lie close to this line are also relatively dark. Why does this happen?
I think I have one possible answer. Points with Fibonacci coordinates can be obtained by starting with coordinate (1, 1) and then climbing upwards via the x(n+1) = x(n) + x(n – 1) rule.
But we can start with any (a, b) coordinate where a and b are co-prime. This will give us:
x(0) = a
x(1) = b
x(2) = a + b
x(3) = a + 2b
x(4) = 2a + 3b
For example, for a = 1 and b = 3 we get: 1, 3, 4, 7, 11, 18, 29, 47, 76, 123, etc, which are still pretty bad for Euclidean algorithm. And the ratio between the neighbours also tends to the golden ratio (e.g. 123/76 = 1.618), in fact almost by the very definition of golden ratio. Indeed, at infinity we have:
ratio = x(n+1) / x(n) = x(n) / x(n – 1)
Rewriting this via x(n + 1) = x(n) + x(n – 1) we get:
(x(n) + x(n – 1)) / x(n) = x(n) / x(n – 1)
or (p + q) / p = p / q — which is how the golden ratio is defined.
So, regardless of the starting coordinate (a, b) our generalised Fibonacci climb will eventually bring us close to the dark side of the Euclid’s Orchard 🙂
Aha, yes, I see! This is a nice way to think about it.