The silver ratio

Most people have heard of the golden ratio, but have you ever heard of the silver ratio? I only heard of it this week. The golden ratio can be expressed by a continued fraction in which all coefficients equal 1.

 1 + \cfrac{1}{1+\cfrac{1}{1+\cfrac{1}{1+\cdots}}}

The silver ratio is the analogous continued fraction with all coefficients equal to 2.

 2 + \cfrac{1}{2+\cfrac{1}{2+\cfrac{1}{2+\cdots}}}

You might think for a moment that the silver ratio should be just twice the golden ratio, but the coefficients contribute to the series in a non-linear way. The silver ratio actually equals 1 + √2. The golden ratio has a simple geometric interpretation. I don’t know of a geometric interpretation of the silver ratio. (Update: See Maxwell’s Demon for geometric applications of the silver ratio.)

A previous post mentioned that the golden ratio and related numbers are the worst case for Hurwitz’s theorem. The silver ratio and its cousins are the second worst case for the theorem.

Related posts

Microsoft Ramp Up

A recent .NET Rocks podcast featured Doug Turnure and Johanna White talking about Ramp Up, a new free online training program from Microsoft. It sounds like this program will organize and revise a lot of the scattered training material that Microsoft has produced.

I liked two things I heard about Ramp Up. First, the material for each course will be offered in multiple formats and from multiple perspectives such as conceptual overviews, code-centric drill downs, articles, videos, audio podcasts. Second, they’re not just going to focus on the latest technology. In the past, it’s been easiest to find material on software that hasn’t even been released, followed by the current shipping version. After that, good luck finding material on anything a release or two behind the latest. Microsoft has said that Ramp Up will leave their material online as new versions come out.

Breastfeeding, the golden ratio, and rational approximation

Gil Kalai’s blog featured a guest post the other day about breastfeeding twins.

The post commented in passing that

φ, the golden ratio, is the number hardest to approximate by rationals.

What could this possibly have to do with breastfeeding? The post described a pair of twins with hunger cycles sin(t) and sin(φt), functions that hardly ever come close to synchronizing. The constant φ is difficult to approximate by rational numbers, in a sense that I describe below, and this explains why the two functions are so often out of sync.

graphs of sin(t) and sin(φ t)

In one sense, φ is very easy to approximate by rationals. The ratio of any two consecutive Fibonacci numbers is a rational approximation to φ, the approximation improving as you go further out the Fibonacci sequence. The same is true for any generalized Fibonacci sequence, though the approximation may not be very good until you go out a ways in the sequence, depending on your starting values. So φ is easy to approximate in the sense that it is convenient to think of approximations.

Now let’s look at the sense in which φ is hard to approximate. How accurately can you approximate an irrational number ξ by a rational number a/b? Obviously you can do a better and better job by picking larger and larger fractions. For example, you could always take the first n digits of the decimal expansion of ξ and use that to make a rational approximation with denominator 10n. But that might be very inefficient. How well can you approximate ξ relative to the size of the denominator? This question is answered in general by a theorem of Hurwitz.

Given any irrational number ξ, there exist infinitely many different rational numbers a/b such that

\left| \xi - \frac{a}{b} \right| < \frac{1}{\sqrt{5}\, b^2}

The decimal expansion idea mentioned above is wasteful because the error goes down in proportion to the denominator, while Hurwitz theorem says it’s possible for the error to go down in proportion to the square of the denominator.

Can we do any better than Hurwitz theorem? For example, is it possible to replace √5 with some larger constant? Not in general, and the golden ratio φ provides the counterexample to any would-be refinements of Hurwitz theorem. The constant φ is a worst case. That is the sense in which φ is the number hardest to approximate by rationals. If φ and some related numbers are excluded, then the constant √5 can be increased.

Going back to breastfeeding, suppose the twins had hunger cycles sin(t) and sin(ξt). If ξ is irrational, the two curves will never exactly have the same period. But if ξ were equal to a rational number a/b, then the two functions would have a common period of length bπ if a is even or of length 2bπ if a is odd. If ξ were (approximately) equal to a/b with b small, the feedings would often synchronize. Since φ requires large values of b to make a good rational approximation, ξ = φ is a worst case.

Related posts:

Don’t standardize education, personalize it

I just finished reading Ken Robinson’s book The Element. The title comes from the idiom of someone being in his or her “element.” The book is filled with stories of people who have discovered and followed their passions.

Here are a couple quotes from the book regarding standardized education.

The fact is that given the challenges we face, education doesn’t need to be reformed — it needs to be transformed. The key to this transformation is not to standardize education but to personalize it, to build achievement on discovering the individual talents of each child, to put students in an environment where they want to learn and where they can naturally discover their true passions.

Learning happens in the minds and souls of individuals — not in the databases of multiple-choice tests. I doubt there are many children who leap out of bed in the morning wondering what they can do to raise the reading score for their state. Learning is a personal process …

Here is a talk (link died) Ken Robinson gave at TED in 2006 that led to his writing The Element. The video is entertaining as well as thought-provoking.

Related posts:

The Medici Effect

I was reading a chapter from The Element this evening that reminded me of The Medici Effect.

ACM Ubiquity had an interview with Frans Johansson, author of The Medici Effect, around the time the book came out. The title comes from the idea that it takes more than just genius to create a Leonardo da Vinci. It also takes the community of a Renaissance Florence, made possible by patrons like the Medici family.

I thought it was a great premise for a book and bought the book shortly after reading the interview. Unfortunately, the book didn’t live up to my expectations. I recommend the interview, but I’m not as enthusiastic in my recommendation of the book.

Related post: Don’t standardize education, personalize it

Golden ratio and special angles

The golden ratio comes up in unexpected places. This post will show how the sines and cosines of some special angles can be expressed in terms of the golden ratio and its complement.

Recall the golden ratio is

φ = (1 + √ 5)/2

and the complementary golden ratio is

φ’ = (1 – √ 5)/2.

The derivation begins by solving the trigonometric equation

sin 2θ = cos 3θ

in two different ways. To make the solution unique, we look for the smallest positive solution.

First, note that the sine of an angle is the cosine of its complement, i.e.

sin(x) = cos(π/2 – x).

So our equation can be written as

cos(π/2 – 2θ) = cos 3θ.

The smallest positive solution satisfies π/2 – 2θ = 3θ, and so θ = π/10 or 18°.

Now let’s solve the same equation another way. First, we use the double and triple angle identities.

sin 2θ = 2 sin θ cos θ
cos 3θ = 4 cos3 θ – 3 cos θ

Set the two equations above equal to each other and divide by cos θ. Then we have

4 cos2 θ – 3 = 2 sin θ.

Substitute 1 – sin2 θ for cos2 θ and the result is a quadratic equation in sin θ:

4 sin2 θ + 2 sin θ – 1 = 0.

From the quadratic equation, the solutions are sin θ = (-1 ± √ 5)/4. The positive solution is

sin θ = (-1 + √ 5)/2 = -φ’/2.

Setting the solutions obtained from both methods equal to each other,

sin π/10 = sin 18°= -φ’/2.

We can now use common trig identities and the above result to express the sines and cosines of other angles in terms of  φ. Switching to degrees will make the following a little easier to read.

We know sin 18° = -φ’/2, and so cos 72° = -φ’/2. We can use the sum angle identities to express the sine and cosine of every multiple of 18° in terms of φ. Also, we could apply the half angle identities to express the sine of cosine of 9° in terms of φ, and then again by addition formula we could extend this to all multiples of 9°.

This post was an expanded form of a derivation given in The Divine Proportion.

Would you rather have a chauffeur or a Ferrari?

Dan Bricklin commented in a recent interview on how the expectations of computers from science fiction have not panned out. The point is not that computers are more or less powerful than expected, but that we have wanted to put computers to different uses than expected.

photo of red Ferrari

Fictional computers such as the HAL 9000 from 2001: A Space Odyssey were envisioned as chauffeurs. You tell the computer what to do and then go along passively for the ride. Bricklin says it looks like people would rather have a Ferrari than a chauffeur. We want our computers to be powerful tools, but we want to be actively involved in using them.

I’d refine that to say we either want to actively use our computers, or we want them to be invisible. Maybe there’s an uncanny valley between these extremes. Most people are blissfully ignorant of the computers embedded in their cars, thermostats, etc. But they don’t want some weird HAL 9000-Clippy hybrid saying “Dave, it looks like you’re updating your résumé. I’ll take care of that for you.”

Update: See Chauffeurs and Ferraris revisited.

Programs, not just projects

My frustration with personal productivity systems like GTD is that they’re all about projects and tasks. They leave out a third category: programs. GTD thinks of a project as something that can be broken into a manageable number of tasks and scratched off a list. But programs go on indefinitely and cannot be divided into a small number of one-time tasks.

I’m using the word “program” as in an “exercise program” or a “research program.” (I could think of my exercise program as a project, but it’s one I hope not to complete for a few more decades.) Sometimes there is a neat hierarchy where programs spawn off projects that can be divided into tasks. But sometimes you just have programs and tasks.

One of my frustrations with managing software development in an academic environment was the large number of programs disguised as projects. (Sorry, I know it’s confusing to talk about “programs” in the context of software development and not mean computer instructions.) You can’t manage programs as if they were projects. For example, you can’t talk about “after” project is done if it’s not really a project but a never-ending program. You have to either acknowledge that a program is really a program, or you have to have some way to make it into a finite project.

Connecting Fibonacci and geometric sequences

Here’s a quick demonstration of a connection between the Fibonacci sequence and geometric sequences.

The famous Fibonacci sequence starts out 1, 1, 2, 3, 5, 8, 13, … The first two terms are both 1, then each subsequent terms is the sum of the two preceding terms.

A generalized Fibonacci sequence can start with any two numbers and then apply the rule that subsequent terms are defined as the sum of their two predecessors. For example, if we start with 3 and 4, we get the sequence 3, 4, 7, 11, 18, 29, …

Let φ be the golden ratio, the positive solution to the equation 1 + x = x2. Let φ’ be the conjugate golden ratio, the negative solution to the same quadratic equation. Then

φ = (1 + √ 5)/2

and

φ’ = (1 – √ 5)/2.

Now let’s look at a generalized Fibonacci sequence starting with 1 and φ. Then our terms are 1, φ, 1 + φ, 1 + 2φ, 2 + 3φ, 3 + 5φ, … Let’s see whether we can simplify this sequence.

Now 1 + φ = φ2 because of the quadratic equation φ satisfies. That tells us the third term equals φ2. So our series starts out 1, φ, φ2. This is looking like a geometric sequence. Could the fourth term be φ3? In fact, it is. Since the fourth term is the sum of the second and third terms, it equals φ +φ2 = φ(1 + φ) = φ(φ2) = φ3. You can continue this line of reasoning to prove that the generalized Fibonacci sequence starting with 1 and φ is in fact the geometric sequence 1, φ, φ2, φ3, …

Now start a generalized Fibonacci sequence with φ’. Because φ’ is also a solution to 1 + x = x2, it follows that the sequence 1, φ’, 1 + φ’, 1 + 2φ’, 2 + 3φ’, … equals the geometric sequence 1, φ’, (φ’)2, (φ’)3, …

More Fibonacci posts