Fun Math Puzzle

Auto Date Sunday, February 28th, 2010
lockers

http://www.flickr.com/photos/kahunapulej/326062731/

One hundred students line up to walk by one hundred closed lockers. The first student walks by opening every locker that is closed. The second student then walks by and opens every second locker that is closed and closes every second locker that is open. The third student does the same for every third locker and the nth student does the same for every nth locker.

After all the students have walked by the lockers, how many lockers are open.


Based on the responses in our group, this is either a very easy or a somewhat difficult puzzle. It was the latter for me. It took over thirty minutes for me to find the reason and provide a proof. I personally believe that type of frustration is good and I’m working on increasing the amount of time I spend trying to solve problems before giving up and looking for the answer.

Galilean Relativity

Auto Date Sunday, February 28th, 2010

Over the next few months, I’m learning the theories of Special and General Relativity with a group. Part of this learning experience is teaching each other the content of the different sections of the book we’re studying (The Geometry of Spacetime: An Introduction to Special and General Relativity). The first section that I had to teach was on Galilean relativity. The following are my cliff notes on the subject.


engineer_on_train

by colorblindPicasso http://www.flickr.com/photos/colorblindpicaso/2686378645/sizes/m/

Introduction


Imagine two engineers:, one on a train moving 20 m / s, and another stationary on the ground. The engineer on the train throws a ball towards the back of the train at 20 m / s. What does the engineer on the ground see? What does the engineer on the train see? Will those observations be in agreement or translatable to each other.


A world in which the answer was no would be a purely subjective one. Physics could not exist because no objective facts could ever be correlated. A world in which observations can be correlated is a world in which a principle of relativity exists – i.e., some subset of objective facts or events have the same form in all frames of reference.


A principle of relativity works not by proscribing the same observations in different frames of reference but mathematical formulas that can translate between them. The engineer on the train will not observe the same trajectory of the ball as the engineer on the ground. Instead, they will be able to use a principle of relativity to translate their observations of the event so that they are in agreement.


Galilean relativity is a principle of relativity that was first proposed before special and general relativity. It stipulates that all observers moving in constant motion – without speeding or slowing down – will be able to translate their observations of the same events by factoring in the relative velocities of the observers.


In this introduction to Galilean relativity, we will walk though a concrete example of Galilean relativity by translating the observations of the first engineer when the ball is thrown in the air to the observations of the second engineer. We will then work through the first example in this section of the book, taking care to point out potential stumbling blocks for mathematicians. We will close by briefly providing an overview of the principles of relativity at work in Newtonian mechanics and special relativity.


Engineers and Trains

Let’s return now to our engineers and walk through a simple example of translating their different observations of the ball..


Relative motion is the key to translating events in Galilean relativity. The equations for such translations are:


τ = t

ξ = vt + z


Intuitively, this equation states that the observations of the two engineers will be translatable once their relative velocities are factored out.


In this example, the relative velocity of the engineer on the train is + 20 m/s with respect to the engineer on the ground. Or, alternatively because there are no privileged reference frames, the engineer on the ground is moving – 20 m/s with respect to the engineer on the train.


The engineer on the train throws the ball at – 20 m/s away from him. As expected, it travels in a parabola away from the engineer.

train-perspective


Assuming the engineers start at the same position, after three seconds the ball will be 60 meters away from the engineer on the train.


For the engineer on the ground, we can determine the position at any moment by using the above equation. Intuitively, the forward velocity of the train of 20 m/s and the backward velocity of the train at 20 m/s will cancel out and the ball will appear as if it is falling straight down.

ground-perspective

We can predict this plugging in the formula. At one second, the engineer on the train will observe the ball at -20m. The engineer on the ground will see the ball at +20m/s (1s) -20m = 0m. At two seconds, the engineer on the train will see the ball at -40m and the engineer on the ground will see it at 20m/s (2s) – 40m = 0m. And so on.



Exercise 1: Potential Stumbling blocks

The Question: Suppose the events E1 and E2 have the coordinates (1,0) and (2,0) in R. What is the spatial distance between them, according to R? What is the spatial distance according to G?

One of the great things about this books is that the questions are largely written for mathematicians. In general, the treatment is fairly standard, but there is one potential stumbling block in notation and another in perspective that can sometimes cause confusion. Both of these, to the author’s credit, are carefully explained in the book.


  • Notation: The first coordinate in an event is the time and the author has a preference for representing events in 1 dimension of space and 1 dimension of time. Critically, this means that (1,0) is not a particle at x=1 and y=1 but the position of a particle at time t = 1 second and position z = 0.

  • Perspective: From the perspective of a mathematician looking at a graph – or the graph reference frame – the particle is not moving. The question might even appear nonsensical. It’s critical to remember that this is just an illusion. The graph perspective of velocity 0 is just another reference frame. And it is not the reference frame that we are being asked about.

With these caveats in mind, the problem is simple. One second passes between the events. During that time, the first reference frame G moves with a velocity v away from the coordinate z=0 and the second reference frame R moves with a velocity -v away from the coordinate z=0. G will measure the distance between the events as being +v and R will measure the distance between the events as being -v.



Comment Apocalypse

Auto Date Sunday, February 28th, 2010
zombie_apocalypse

http://farm1.static.flickr.com/36/80558500_2c68cac608.jpg

This blog has been under a heavy spam load for some time. In the midst of deleting some of spam comments (no I do not want to visit your porn site even if you like my post very much), I accidentally deleted all of the real comments from readers (some of which had never been posted).

My sincere apologies to my readers — for now I’m disabling comments until the problem of spam can be addressed more elegantly.

Cranky Evolutionists and Rational Creationists

Auto Date Monday, December 7th, 2009

greatest-show-dawkins-jacketRichard Dawkins is quite cranky when it comes to the subject of creationists, the most famous of which have a long history of misrepresenting his life’s work. In his new book, The Greatest Show on Earth, he begins with the goal of graciously persuading creationists of the truths of evolution. He then devotes the rest of the book to insulting his intended audience.

As a review in New Scientist put it:

It’s really kind of comical. If “spot the condescensions” is a new drinking game, then bottoms up! There’s one in just about every chapter. Though Dawkins says from the outset, “This is not an anti-religious book”, he can’t help but knock religion throughout, For instance, he writes: “God, to repeat this point, which ought to be obvious, but isn’t, never made a tiny wing in his eternal life.” Young Earth creationists are, he writes, “deluded to the point of perversity”. You get the sense that Dawkins just can’t control it. It’s as if he suffers from an anti-religious form of Tourette’s syndrome.

Although I am a long-time fan of Dawkin’s work, there is little to disagree with here. Insulting a person is seldom an effective means of persuading them of your position. More grace in Dawkins’ work would increase its persuadiability for Creationists.

The focus of this post is not on whether Dawkins is tactful — not even he would defend such a position. Instead, I want to focus on a common refrain heard every time an apology on evolution is published. This refrain is found in the same New Scientist review:

But in the end, you have to wonder why Dawkins wastes so much time trying to argue with creationists. We all know that creationists are not rational thinkers. They are driven by beliefs, not by logic.

This is an understandable criticism — it accurately describes the only Creationists most scientists ever encounter. It’s also completely wrong.

Well-known Creationists are fanatical and intellectually dishonest, but they are not representative of most Creationists. The overwhelming majority of Creationists have not studied evolution, they do not participate in Creationist debates, and they have no understanding of “Creation Science” or “Intelligent Design.” They are Christians, true, but they are Christians who have an unexamined belief in Creationism. They only believe in Creationism because they learned it in Sunday school and none of them has ever heard the theory of evolution honestly presented.

Some of these Creationists are fanatics. Some are rationalists who can be persuaded by evidence and are only one well-written book from believing in evolution.

My book was The Blind Watchmaker by Dawkins. I was raised a Creationist and grew up reading the weekly newsletter from the Institute of Creation Research. Even with this pedigree, Dawkin’s algorithmic description of evolution in the Blind Watchmaker was undeniable to my rationalist mind. I struggled with my belief system for a few years after reading his book until finally deciding to settle the issue through experiment.

On the summer of my nineteenth birthday, I spent several months writing a simple simulation of evolution on my computer. I created computer organisms with pseudo-DNA structures that determined their feeding strategies. I bred them generation after generation, letting the environment select which organisms had more offsprings based on their survival rate.

The result of the experiment was simple. Before I ran it, I was a Creationist. Afterwards, I was an evolutionist.

There are large numbers of other Creationists ready to make the same journey. They are just waiting for their one book. They would be lucky to read an author as gifted as Dawkins because in the end he pays them the highest respect possible. He devotes an entire chapter to examining what we would find if Biblical creationism were true. No rationalist Creationist will remain so after reading it.

Twitter as personal micro-blog

Auto Date Sunday, August 23rd, 2009

I’m misusing twitter now as a personal micro-blog.

twitter-iphone

Go to szymborska there now to read about Alice and the Mad Hatter at the Washington Park Arboretum, the best library in Seattle, and to see Frog becoming friends with a horse name Amos.

Life in the City of Neighborhoods

Auto Date Sunday, August 23rd, 2009

The move up to Seattle to join Amazon was an old fashioned road trip. I traveled up here in my old Honda with my Pop, Sky, and Frog. We visited Powell’s and Japanese tea gardens in Portland and had a barbecue at a friends on our first night here. It was a great bonding experience and the best way to move to a new city.

seattle-at-night

Frog and I have been traipsing through the downtown, finding dog parks, art galleries, Pike’s market, and breakfast places.

I have a lot more time now that I’m not working at Lina and have been spending it reconnecting to the world and my personal loves. Thus far, I’ve taken two art classes (”Drawing Faces”, “Cartooning”) and have four more art classes (”Illustrating Children’s Books”, “Understanding Perspective” “Introduction to Drawing,” and “Figure Drawing”)  coming up in the Fall.

childs-drawing

I hope to post some work this fall, but it will be some time and hard work before it will be as imaginative as a three year old’s drawing or as skilled as an eight year old’s.

I’m also reading again and going to plays like “As you Like it” by Green Stage (a local Shakespeare in the park troupe) and plan on going to Wicked which is visiting Seattle in September and October.

wicked

Frog has made the transition well and seems to love the long walks we take checking out the Capitol Hill neighborhood and Downtown Seattle. Here he is smiling in front of Elliot Bay Bookstore.

frog-elliot-bay

At Pike’s Place Market, I ran into a wonderful subversive giving away free hugs instead of charging them. Look up the free hugs campaign on Youtube and – if you’re ever lucky enough to have the opportunity – participate. The hugs are of very high quality and you will walk away with a smile on your face.

free-hugs

Math is Pretty

Auto Date Sunday, August 23rd, 2009

I was hired by Amazon three months ago to work on large systems — i.e., software that spans thousands of computers. Amazon is one of only a few companies that works with software at this scale. I’m currently working in their cloud computing division that allows you to rent virtual computers online, scalably send messages to virtual queues, and store terabytes on the Web.

Which brings us to this blog. While I worked at Lina, the focus here was on Lina. With this change in employment, this blog can be focused on a topic of my choosing. I have chosen mathematics and the blog’s title has changed as a result from “Code to an Imaginary Number” to “Math is Pretty.”

A Simple Fractal

The title of the blog reflects my experience of mathematics as a beautiful aesthetic whose value transcends its truth statements. I believe most mathematicians experience mathematics this way and one of the main gaps between people who love mathematics and those who don’t is a lack of development of this aesthetic sense. My hope with this blog is to help readers bridge that gap and learn to see beneath the equations and numbers.

Speaking at OSCON 2009

Auto Date Monday, March 23rd, 2009

OSCON 2009

Do you have the next great idea in search? Have you invented the next Ruby on Rails? Are you dreaming of turning the programing world upside down by releasing a programming language that anyone can use?

To change the world, it’s essential that Windows, Mac, and Linux users can easily install your software. Ordinary users won’t use software they can’t install and the 99% of users that are not programmers have no idea what to do with a source tarball.

Creating binaries for multiple platforms and graphical installers for those platforms is a full-time job in itself. It requires learning over half a dozen technologies -  NSIS, mingw, Cygwin, PackageMaker, Objective C, RPM, and DEB – and cross-compiling, debugging, and testing on over a dozen operating systems.

Sounds daunting? Need help? Come to my OSCON session. I’ll personally help you create a universal installer and binary for your dream project in under 45 minutes. It will install on Windows, Mac, and Linux and it will generate virtual appliances for Xen, VMware, VirtualBox, Qemu, Parallels, and Amazon’s EC2.

All you need to bring is yourself, a Debian package of your application, and a 128×128 PNG image of your logo.

We’re going to have fun. Even if you don’t have a project yet, you’ll gain practical knowledge attending and be able to witness first hand the mad genius of your fellow attendees as they work on their dream projects.

Start a Math Library for 50$ (and a penny)

Auto Date Sunday, December 28th, 2008

There are several great lists on well-written mathematics books on Amazon and other sites, but they all cost hundreds to thousands of dollars. There is nothing for the poor, aspiring mathematician on a budget. So here, for first time, is a collection of books that are inexpensive and meet the following criteria:

  • Extremely well-written with clear presentations
  • Easily read in discrete chunks
  • Beautiful and plentiful illustrations
  • Breadth and depth of subject matters
  • Accessible to anyone who has mastered Calculus

The different books in the library are diverse and filled with everything from brilliant expositions of modern mathematical topics, original papers by the greatest mathematicians in history, and popular mathematical puzzles and games.

Mathematics: its content, methods, and meaning. The first book on the list was the Princeton Companion to Mathematics of it’s day. With contributions from some of the greatest mathematicians of the last century, Mathematics: its content, methods, and meaning, covers everything from real analysis to group theory. At over 1000 pages and filled with illustrations, it is an extremely accessible introduction to several mathematical subjects.

Mathematics: its content, methods, and meaning

At the time it was published, Professor Morris Kline called it an ” … amazing panorama of mathematics proper … the best answer in print to what mathematics contains both on the elementary and advanced levels.” On Amazon, the Dover edition will set you back $25.71 (I purchased it for approximately $10 during a sale) and the 1963 MIT 3 Volume set will set you back $13.88.

God Created the Integers. Edited by Stephen Hawking, this 1300 page volume contains the original works of mathematicians from Euclid to Kurt Godel.

God Created the Integers

Reading the original works of great mathematicians is important for several reasons. One of the most important is that it reveals the very human and creative nature to mathematical discovery. Mathematics is more enjoyable when one interacts with the original documents with all their quirks and experiences firsthand how much art and creativity is involved in the process. I recently purchased a new copy for $3.99 at Borders. Used copies sell for the same amount on Amazon ($4.39 currently).

The Road to Reality. For applied mathematics, I originally was going to complement the above with Hawking’s “On the Shoulder of Giants” which has many of the original works of Physics. This would have kept the price under $50. Physics does not age as well as Mathematics, though, so I have substituted “The Road to Reality”. Penrose’s book provides a modern and accessible introduction to modern physics and applied mathematics.

The Road to Reality

Reading this book, one feels like a graduate student in Oxford listening to Penrose give a lecture on an English afternoon. It is beautifully illustrated and the mathematics used in modern physics is carefully and intuitively laid out. It can be purchased for $14.72 used on Amazon.

The Colossal Book of Mathematics.The most playful book on the list is by one of the greatest popular mathematics writer of this and the last century — Martin Gardner. I grew up reading his columns in old Scientific Americans in my high school. Gardner knew better than anyone how to make mathematics fun, how to recapture that moment when you first realized how beautiful and unexpected its results could be.

The Colossal Book of Mathematics

This book contains his best columns over several decades, from Surreal Numbers to the Game of Life to Penrose Tiles and the Plainiverse. It’s a wonderful book and can be purchased used for only $15.60 on Amazon. And, of course, it is filled with the same beautiful illustrations as the others.

How to Lie With Statistics.The final book on the list is not a formal introduction to statistics (see Kolmogorov in Mathematics: its content, methods, and meaning for that), but it critically teaches skepticism towards the application of mathematics. It is also very fun and can be the book in your library that you can lend to friends.

Statistics

Statistics – like many mathematical disciplines – is widely misused. Anyone who reads this book and anyone can will be able to discern when politicians are lying, even when they are talking about subjects the listener knows nothing about. In medicine, readers will be able to discern which procedures have no medicinal value even when backed up by studies. Whether the subject is crime, sports, immigration, or the environment, this book will provides a magic decoder ring to detect when numbers are being used to mislead rather than inform. It can be purchased used on Amazon for $1.42.

Altogether, the total comes to $50.01 for over 4,000 pages of mathematics if you buy used. And it’s only slightly more if you buy new. If you are on a budget, you will not regret buying any of these books, even with the free resources of Wikipedia and Arxiv.

Wisława Szymborska

Auto Date Sunday, December 21st, 2008

Wislawa Szymborska has long been one of my favorite poets.

Szymborska

The Ball

As long as nothing can be known for sure
(no signals have been picked up yet),
as long as Earth is still unlike
the nearer and more distant planets,

as long as there’s neither hide nor hair
of other grasses graced by other winds,
of other treetops bearing other crowns,
other animals as well-grounded as our own,

as long as only the local echo
has been known to speak in syllables,

as long as we still haven’t heard word
of better or worse mozarts,
platos, edisons somewhere,

as long as our inhuman crimes
are still committed only between humans,

as long as our kindness
is still incomparable,
peerless even in its imperfection,

as long as our heads packed with illusions
still pass for the only heads so packed,

as long as the roofs of our mouths alone
still raise voices to high heavens–

let’s act like very special guests of honor
at the district-firemen’s ball
dance to the beat of the local oompah band,
and pretend that it’s the ball
to end all balls.

I can’t speak for others–
for me this is
misery and happiness enough:

just this sleepy backwater
where even the stars have time to burn
while winking at us
unintentionally.

~ Wislawa Szymborska ~