In my last post I talked about using Farey numbers as coordinates for linked list elements. Here’s what that looks like. Click a link to insert a new element into the list.

Rationalizing the Irrational

We can use the Farey Linked List to find rational approximations of irrational numbers between zero and one. If we want to approximate a number greater than one, first we approximate the reciprocal of that number, then we take the reciprocal of that approximation. Let’s do π.\displaystyle\pi. π\displaystyle\pi is greater than one, so first we take its reciprocal which is ~0.3180.318. The empty Farey Linked List has one edge that spans 01.\displaystyle0-1. 0.3180.318 is in that range, so we’ll insert a node there. Now we have two edges. The first edge spans 0120-\frac{1}{2}, and the second edge spans 121.\frac{1}{2}-1. 0.3180.318 is in the first range, so we insert there. We can continue inserting until our approximation is good enough. Not every insertion we do will give us a better approximation immediately, but it will take us in the correct direction. The process looks like this (click the approximate button below).

π=\displaystyle\pi =0

That might take awhile, let’s do something else in the meantime. Here’s ϕ.\displaystyle\phi.

ϕ=\displaystyle\phi =0

Watch both closely. π\displaystyle\pi takes long runs in the same direction, while ϕ\displaystyle\phi alternates directions every step. Alternating the direction the way ϕ\displaystyle\phi does turns out to be the fastest way to make the numerator and denominator of the Farey Numbers grow. This is one manifestation of ϕs\displaystyle\phi's reputation as “The Most Irrational Number”.