Monday, October 10, 2011

Greetings! How fares it for those of you who aren't me? I arbitrarily presume that is goes well. Despite the elimination of the Rays, baseball has been pretty good in that the Yankees/Phillies World Series has been averted in stunning fashion, with neither team even reaching their respective league championship. Honestly, I'm cool with any of the remaining teams.

A few news items piqued my interest this week, so I'll be a bit unorthodox and discuss them.

The 2011 Nobel Prize in Physics was given out last week to three astrophysicists for the discovery that our universe is expanding. Something called Dark Energy is to blame, and while this might sound bizarre and enigmatic to you, I assure you that it is far more baffling to Physicists. It is currently postulated that 73% of the universe consists of this mystery material, and we know next to nothing about it. I would go as far to say as that it is currently the biggest unanswered question that science has about the universe, and hence the discovery of the question is well worth the highest award the community has to offer. Note that google image searching Dark Energy is pretty funny.
After hundreds of years the greatest minds of humanity have managed to learn a little bit about 4% of the universe! Hopefully our progress will accelerate along with the universe's expansion 
I'm sure you also heard that Steve Jobs died. The man worked for Atari, Pixar, and Macintosh and was one of the most creative and influential businessmen in American history. Countless facets of our lives would be radically different had he not been who he was and done what he did. Much more has been written, so I need not elaborate. Great man.

But now to the maths. Most know that Pi is the famous ratio of a circle's circumference to its diameter. So if you were marooned on a desert island with nothing but a circle, a ruler, and the foolish idea to waste your precious energy, you would probably be able to estimate Pi's value fairly well from a few quick measurements. But imagine if things were much worse: What if after failing to pay your cyber-taxes in the 23rd century you were recruited into a astro-debtor's program as a planet-to-planet needle salesmen and forced onto an artificial gravity-enhanced, oak-planked vessel launched into the far reaches of the universe and after a fairly nondescript voyage through the vast, inky blackness between galaxies your ship's computer accidently lost its data for Pi in an ill-advised gamble with the onboard coffee maker and you had no choice but to enter a new value that would, depending on your accuracy, either send you hurtling into a black hole or safely on your way into the lucrative business-bosom of Thread-Star VI. This problem (or one without some of the extraneous details I may have added for dramatic effect) troubled the Comte de Buffon in the 18th century. Given a set of parallel lines and a needle, he showed the you can actually come up with an experimental calculation for Pi. Here's how to solve the famous problem of Buffon's Needle:

Suppose I randomly drop a needle of length L onto a set of parallel lines a width d (where d > L) apart as indicated in the above diagram. There are only two free parameters given this situation, the perpendicular distance x from the center of the needle to the nearest line, and theta, the acute angle between the needle and the aforementioned perpendicular. From these constraints we know that the possible values for x range from 0 to d/2 and the possible values for our angle range from 0 to Pi/2. Since all values for each variable are equally possible within these bounds, my probability density functions for each will be uniform. Calling them A and B and normalizing (ensuring that the sum of all probabilities is one) gives:
Now we need only integrate over the relevant parameter-space to determine the odds that the needle will cross a line. A bit of geometry shows that this will happen whenever half the length of the needle times the cosine of the angle it makes with the perpendicular is greater than the distance to the nearest line. Hence the probability that a randomly dropped needle will cross a line is given by:
So, if your needle happens to be the exact same length as your line spacing, the odds the needle will cross a line are 2/Pi or about 64%. Hence, given enough free time you could drop a whole bunch of needles, come up with a percentage of your own, and experimentally calculate Pi!


Using a very similar process, I also solved the problem for the tiled case below (again for a,b > L).
The problems works out in a very similar manner (although one does need to be a bit careful about adding probabilities), and in the end you find that given the above geometry the odds that a needle crosses any of the lines when dropped is:
Of course, the savvy statistician will recognize this as the probability of crossing one of the horizontal lines plus the probability of crossing one of the vertical lines minus the probability of doing both. Note further that in the case of a or b going to infinity we re-derive our Buffon case. Finally, we see that if a=b=L (the happy situation that you have square tiling and your needle has the same length as the tiles), then the odds of the needle crossing a line are 3/Pi, or about 95%. 

I want to emphasize that all the above calculations were done assuming that the length of the needle was less than or equal to the lengths between lines. The results are not valid otherwise and in fact things get a bit ugly in that case. Another way to muck things up is to carry out this calculation for a grid of equilateral triangles! I wouldn't advise it though...the math gets very messy. After all, nature abhors the triangle.

A quick villain for your viewing pleasure. Today I bring you one of the main antagonists from Tale Spin (of the holy trinity including Darkwing Duck and Duck Tales). He is the Air Pirate Don Karnage.
A romantic adventurer, man of accented eloquent and no-good thieving scoundrel of the skies, Don Karnage is a villain not soon to be forgotten. He menaces merchants and pilfers pilots around the humorously named Cape Suzette, looking to score a quick buck aboard his flagship, the Iron Vulture. While he's not the nicest guy and certainly not the smartest, the  pirate captain sometimes turns friend and helps out Baloo, the hero of the show. Among his arsenal of weaknesses are his bumbling crew, startling vanity and incredible overconfidence. His personal fighter plane is pretty sweet though. 

2 comments:

  1. We briefly discussed this method for calculating pi last week in my computational molecular evolution class. Pretty cool.

    ReplyDelete
  2. Highly classified laboratory experiments have shown that much of the dark matter floating through deep space is the vanishing remnants of the hopes and dreams of Yankee, Red Sox, Phillies fans, drifiting aimlessly toward the terminal state of maximum entropy.

    ReplyDelete