Hacker News new | past | comments | ask | show | jobs | submit login
Using Fibonacci Numbers to Convert from Miles to Kilometers and Vice Versa (catonmat.net)
144 points by pkrumins on Jan 13, 2010 | hide | past | favorite | 46 comments



Relatedly, if you ever forget Avagadro's number, you can approximate it by figuring out how many unique 5x5 bingo cards you can make by 24 words and a free space. This will get you to within about 3% of the right number.


I sometimes enter a bingo hall with exactly 12 grams of carbon-12, and then I fill out a card for every atom, knowing that I'll have covered all combinations when I run out.


Intriguing. For those that were wondering, patio11 is talking about 24 factorial (or "24!").

Edit: corrected the post from 25 to 24. I got bitten by an off-by-one error in Python's range!


Traditionally, the free space is stuck in the center of the card, and thus it can be ignored for the purposes of the problem. The right answer is 24!

Incidentally, if you're trying to explain the results of this calculation to a middle school English teacher, I recommend "More than there are grains of sand on a beach." It relaxes the worry they really have and is non-specific enough to avoid sounding threatening. (Ask me no questions I'll tell you no lies.)


He's actually talking about 24! not 25!. (Maybe because the free square is in a fixed position?)

24! = 6.20e23; and Avogadro = 6.02e23.


The "Here's why this works" part was the best part of the article. Thanks for writing more than "hey, look at this trick!"


Can anyone who knows history comment on whether or not it is truly a coincidence that the ratio of 1 mile to 1 kilometer approximates the Golden Ratio?

As an aside, Wikipedia doesn't have much on the historical development of the definition of a mile, but it has this amazing tidbit on the meter that I found fascinating:

Historically, the metre ... was designed to represent one ten-millionth of the distance from the Equator to the North Pole along Paris Meridian.... http://en.wikipedia.org/wiki/Metre


SI units:

Seconds came first. Since ancient times (Egypt or Babylon) people divided the day into 24 parts and then sub-divided by 60 and by 60 again. This unit is defined in relation to the rotation of the earth (which was later found to be slowing, so it got redefined).

With seconds established, someone realized that a pendulum has the same period regardless of the weight attached. The meter was defined to be the length of a pendulum with a period of two seconds, or a half-period of one second.

Unrelated, but grams were defined to be the weight of one cubic centimeter of water at (I believe) freezing/melting temperature.

Imperial units:

Well, these come from all sorts of places. Miles comes from paces, which are related to the height of a man.

Conclusion:

SI units are derived from Earth's rotation and gravity, imperial units are derived from functional and human characteristics. Unless you believe that the proportions of the human body are related to other things in the cosmos directly (DaVinci tried to show this) then it's just a coincidence.


I had forgotten about these relationships...

You are right, one gram is the weight of one cubic centimeter of water at 4ºC (a little away from 0ºC so you don´t solidify by mistake).

I heard that imperial units used to change a lot, that the patron was the current king at the throne. Do you know if this is true?


4C is the temperature at which H20 is most dense, so it makes sense use that temp when defining a mass in terms of a volume.

http://en.wikipedia.org/wiki/Properties_of_water#Density_of_...


There are constantly suggestions that some ratios of proportions of the human body are averaged at around the golden mean.


"Mile" also means a thousand, coincidentally. In ancient Rome, it was the distance of one thousand paces. Note that a "pace" was two steps, i.e. one stride with each leg.


I remember that definition from high school. It's funny how useless that definition is, in that, knowing it doesn't help you figure out what it really is.

The newer definition: "In 1983, the metre was redefined as the distance travelled by light in free space in 1⁄299,792,458 of a second." always kind of bothered me because it sounds like it went like this:

"Ok, so we defined the speed of light as 299,792,458m/s and it's all over textbooks and formulas, but the thing is that our current definition of a meter sounds a little bit like a guess. So let's just reverse the speed of light and we're good!" It feels like a backronym to me (http://en.wikipedia.org/wiki/Backronym)


meter was originally designed by French to be measured by clock which was much more precise at the time : a thread pendulum of length one meter has a period of two seconds . thatis why acceleration due to earths gravity is g~pi^2


I understood they designed it to be 1/10000000 of the distance from the North Pole to the Equator (through Paris). Then they had to calculate how far that was. They spent an awful lot of time and trouble measuring a large arc of the world by physical survey, but one of the guys made a small calculation error so it turned out later that the Earth is not exactly 40000km around.

I read a book about it a few years ago, but I can't remember the title.

Nautical miles are based on one minute of latitude, so they vary as the Earth is a bit squashed.


Seems like it's just a coincidence. According to The Straight Dope (http://www.straightdope.com/columns/read/637/whats-the-origi...) the length of a mile is based on the length of a Roman pace (or stride).


Yes, I'd like to know as well. I was unable to find any references so far. I am truly interested.


You can use the same system to convert between British Pounds and US Dollars right now too.. :-) It's been hovering around 1.6-1.62 for a while.


I propose that we change the Golden Ratio to reflect the current exchange rate, daily.


I wonder how many FX players are here in the HN community?


A few.


Golden.


My favorite coincidence in this vein involves feet, nanoseconds, and the speed of light. In special relativity, physicists typically work in "geometric units", where c = 1. Measuring length in feet and time in nanoseconds yields

  c = 0.983571056 feet/nanosecond
This is close enough to 1 for most practical purposes.


Because multiplying/dividing by 1.6 is too hard?


The point is not that it is practical. The point is that it is interesting (even if only by coincidence).


Well, it is interesting, and occasionally practical for small numbers where you might have the Fibonacci sequence memorized. But, I also found it rather odd that the article seems to seriously suggest the technique of finding sums of Fibonacci numbers to total arbitrary numbers you want to convert. People who have difficulty multiplying 100*1.6 probably don't have the Fibonacci sequence readily at their fingertips either.


You forget Haskell programmers :)


My personal favorite is that there are approximately pi * 10^7 seconds in one year.


"How many seconds are there in a year? If I tell you there are 3.155 x 10^7, you won't even try to remember it. On the other hand, who could forget that, to within half a percent, pi seconds is a nanocentury." --Tom Duff, Bell Labs


Hah! It takes the Earth about five million seconds to travel through one radian of its orbit. That... seems more useful to know than it actually is.


"pi seconds in a nano-century" is how I remember it.


Nice. And only 0.5% off.


For me it is easier to multiply a number by 1.6 than to find the combination of Fibonacci numbers forming the original number, finding the next Fibonacci number for each of those and then adding the numbers.

Good trick though.


One of the estimating tricks I use the most is the Rule of 72 ( http://en.wikipedia.org/wiki/Rule_of_72 ), which tells you how long it takes for a number to double (or halve) given a yearly interest percentage (or inflation). Just divide 72 by the interest rate and you get the number of years it takes for your money to double. E.g. at a 3.6% interest rate (above inflation!) it would take about 20 years for your investment to double.


Yeah, this is a nice trick. Also, 72 is a good number because it can easily be divided by a bunch of numbers (1, 2, 3, 4, 6, 8, 9). 5 and 10 aren't hard either, and these interest rates are the ones you are most likely to see.


This is basically http://xkcd.com/687/ with twice the setup and none of the punchlines.


Kilometers to miles: multiply by 2*pi, move decimal left one place. About 1% error.


very useful, thanks :) "Coincidentally, there are 1.609 kilometers in a mile, which is within 0.5% of the Golden ratio." was the only interesting sentence for me


I don't know why you're being downvoted for this statement. It's true, the entirety of the "why" is in that sentence, which you'd think would be what this community was interested in.


[deleted]


The original question was how to convert 19 miles to km.

First decompose it into a sum of Fibonacci numbers:

        19 = 13 + 5 + 1
Then find the next Fibonacci number for each one of them:

        13 -> 21
        5  -> 8
        1  -> 2
Then sum them up to get the result in kilometers:

        21 + 8 + 2 = 31km
Which is within 1.36% of the correct answer (the correct answer is 30.57km.)


Okay, but you could also say

    19 = 20 - 1
then multiply by 1.6

    20 -> 32
    1  -> 1.6
and get the estimate 19mi = 30.4km, which is even closer and seems rather easier to me than figuring out a set of Fibonacci numbers which sum to 19.


I thought the OP was alluding to the slight ambiguity because 1 appears twice in the Fibonacci sequence. You could interpret the approach two ways and do either 21 + 8 + 2 = 31 km or 21 + 8 + 1 = 30 km. Happily these span the correct answer of 30.55km.


In this situation I tend to pretend that 1 -> 1.5. (Or, indeed, 1.6, but generally that looks like claiming more accuracy than is really justified.)


Or you could do 21 - 2 -> 34 - 3


Well, if you had actually read the article before asking, you would have known the answer. (you change the number into the sum of several fibonacci numbers, convert each one, then sum the result again).


19mi = (13mi + 5mi + 1mi) ≅ 21km + 8km + 2km = 31km

Actual answer: 30.58 kilometers




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: