Tag Archives: Math

Why You Don’t Have To Check Every Nutty Claim

going-to-hellA friend once earnestly invited me to his very fundamentalist church. I was a Christian at the time but, according to his church, I was not the right kind of Christian and was destined for hell. He said to me, “With the stakes so high, doesn’t it make sense to come check it out?”

He had a point, but I declined.


Continue reading

Does Pi Contain the Universe?

I just ran across a very poetic meme about the number pi .

Pi is an infinite, non-repeating decimal — meaning that every possible number combination exists somewhere in pi. Converted into ASCII text [computer representation], somewhere in that infinite string of digits is the name of every person you will ever love; the date, time and manner of your death; and the answers to all the great questions of the universe. Converted into a bitmap [computer image], somewhere in that infinite string of digits is a pixel-perfect representation of the first thing you saw on this earth; the last thing you will see before your life leaves you; and all the moments, momentous and mundane, that will occur between these two points.

All the information that has ever existed or will ever exist, the DNA of every being in the universe.

EVERYTHING: all contained in the ratio of a circumference and a diameter.

Googling around for more about this, I saw someone point out that if the universe is finite, then pi must somewhere contain a representation of the entire universe.

I find this beautiful and very appealing. Judging by all the “Wow!” comments on the Internet, a lot of other people are equally fascinated.

The only problem is, it ain’t necessarily so. The non-sequitur is in the very first sentence: “Pi is an infinite, non-repeating decimal — meaning that every possible number combination exists somewhere in pi.” I studied a lot of math in college, and I admit that the error slipped by me. Before I knew it, I was carried away by the poetry and joined in the chorus of “Wow!”

The error (obvious now!) is that just because a number never repeats itself into all infinity, it does not follow that every possible number combination occurs. For example, maybe there are no sevens after the trillionth digit, but the other nine digits continue without repeating. If you’re looking for a sequence that contains a seven, and you don’t find it in the first trillion digits, you will never find it.

Sadly, the frisson I felt while reading transcendent thoughts about everyone’s favorite transcendental number was … unwarranted. Even a methodological naturalist like me must be careful to practice shaphat.

After further Googling, I learned that it could be true that pi contains all finite sequences. In fact, mathematicians suspect that it is true, even though it has not been proven one way or the other.

Now … how tempted am I to believe without proof, just because it’s beautiful?

I’ll leave that question with you as an exercise in shaphat. Can you refrain from judging what’s in my head when you have no proof? 🙂

31 Days – Ratcheting

We have only 3 days left in this month’s 31 Days of Wonder, and I’ve saved a good one for you. I call it the ratcheting effect, and we owe our existence to it.

First let’s play cards.

If you were to shuffle a deck of cards perfectly (completely randomizing it) over and over again, how long do you think it would take until, by chance, it fell into order? (“Order” in this case means Ace through King of Spades, followed by Ace through King of Hearts, and so on — one specific order.)

Well, there are about 8 * 1067 possible ways to arrange 52 cards. By comparison, the universe is only about 4 * 1017 seconds old.  If you were to shuffle once every 5 seconds, you would have to shuffle for incalculably many lifetimes of the universe before you’d expect even one perfect ordering.

Now suppose we change the game. This time, each card has the unusual property that if it happens to get shuffled next to its correct neighbor, then the two will ride together for all the remaining shuffles.

How long do you think it will take before the deck is in order?

Last night, I wrote a little computer program to perform this experiment. On average, it took only 55 shuffles to put the deck in order. You could do that in less than 5 minutes — a lot less than even one age of the universe.

When something that’s “right” sticks, the situation can ratchet toward a desired outcome very quickly.

So what does this have to do with us? How do we owe our existence to the ratcheting effect?

Some people think the chance formation of even a single cell is wildly improbable. And so it would be if it had to form in one step, but that’s not the way it happened. Just as the cards in our second deck stuck together to form sub-units, which then coalesced further until the deck was ordered, life ratcheted up in steps, each of which was naturally preserved.

In fact, the more experiments we do in this area, and the more Earth-like planets we discover, the more likely it seems that we are not alone in the universe. Now that’s something to wonder about!

31 Days – Godel’s Theorem

So many times we have said something cannot be done and we have been proven wrong. We can arrive at points east by traveling west. We can fly in a heavier-than-air craft. Altruism can arise from competition.

That’s why it’s extra amazing to me when someone proves — really proves — something is impossible. Such is the case with one of the most brilliant insights that you might never have heard of: Godel’s Incompleteness Theorem.

In the early 1900’s, Bertrand Russell and Alfred North Whitehead laid out a way to derive all mathematical knowledge with logic — or so they thought. Their approach was to start with a few common-sense axioms and a few rules of inference and build everything up from there. This is just what you did in high school, using theorems you had proved one week to prove more theorems the next. Done right, it’s infallible.

Doesn’t it seem that if math class had gone on forever (yeah, yeah, I know…) you could, in theory, have proven every mathematical thing there is to prove?

False!” said the young logician, Kurt Gödel. “There are some statements that are true, but which you can never prove. What’s more, I’ll show you how to construct an infinite number of such statements.”

He did this by turning Russell & Whitehead’s work on itself. He showed how to make their infallible engine of mathematical facts create statements like “This statement cannot be proven.”

That’s easy to do in English (I just did it), but imagine doing it with nothing more at your disposal than the basic rules of arithmetic and logic.

As I said, Gödel proved that such statements are both true and unprovable.

They are true because he showed how to derive them from axioms and infallible logic.

They are unprovable because, well, they say they are unprovable and we have already agreed they are true!

What’s more, Gödel continued, even if those statements were added to the system as axioms, more true-but-unprovable statements could be generated from that new system.

Gödel’s achievement was as revolutionary in math and logic as Einstein’s theory of relativity was in physics. The most brilliant minds in the world had labored for hundreds of years to create a consistent and complete formulation of mathematics, and he showed this was impossible.

Of course, this only applies where Gödel proved it applies, namely the realm of math and only for those special types of statements. Gödel’s theorem should not be construed in a metaphysical way, or for all knowledge.

If you want to read more, the best and most concise exposition I could find is this humble Web page. It ends with some fun speculation about how the theorem  relates to Zen Buddhism.

If you want to read a lot more, there’s a favorably reviewed book at Amazon called Gödel’s Incompleteness Theorem: An Incomplete Guide to Its Use and Abuse.

31 Days – The Monty Hall Problem

The human mind is notoriously bad at probability. We think a medicine that allegedly helped a single friend or celebrity is more likely to work than one that has withstood scientific trials. We think we are more likely to win the lottery than to be struck by lightning (especially if we’ve been good), but the reverse is true. If we have no idea whether an event will happen, we tend to lay the odds at 50-50.

It should come as no surprise, then, that many people would make the wrong play in the following scenario. What would you do?

Let's Make a Deal Doors

Let’s Make a Deal

You’re a contestant on the old game show, Let’s Make a Deal. The host, Monty Hall, shows you three doors and you get to pick one. Behind one is a car; the other two conceal goats. Let’s say you pick Door #1.

Before opening Door #1, Monty, who knows what’s behind all three doors, opens one of the other doors to show you a goat. (He will always open a door, and it will always show a goat.) Let’s say he opens Door #3. He then offers, “You may stay with Door #1 if you wish, or you may switch to Door #2.”

I remember watching this show as a kid, putting myself in the place of the contestant. “What an impossible situation!” I thought. “Which is worse: looking like an idiot if you switch and it turns out to be the wrong choice, or looking like an idiot if you stand pat and that turns out to be wrong?”

What would you do?

The audience is shouting at you. Your friends are watching from home. You’re sweating under the stage lights. Before you know it, time is up.

Are you ready with your answer?

If you guessed that it doesn’t matter because you have a 1 in 3 chance of getting the car in either case, you’re in good company. Most people would agree with you. However, the truth is that switching doubles your chance of winning.

When the smartest person alive, Marilyn vos Savant, explained this in her column, she got about 10,000 letters claiming she was wrong, including 1,000 from PhDs. It confuses a lot of people. In fact, someone has written a whole book on the subject, partly to show how befuddled we get when reasoning about probability.

The best explanation I’ve found goes like this. If your strategy is to always stick with your initial choice, then of course you have a 1 in 3 chance.

However, if your strategy is always to switch, then you only lose in the case where your initial choice was the car. (If your initial choice was a goat, and Monty just showed you the other goat, then switching will always get the car.) Your initial choice will be the car 1 out of 3 times. The other 2 out of 3, therefore, are wins for you. You win 2 out of 3 times by switching!

You might win some money at the bar with this. Get 3 opaque cups to serve as “doors.” Offer to a friend that you and he will each put up a one-dollar stake, so there will be two dollars in play. Your friend will be Monty Hall, putting the money under one of the cups while you aren’t looking. You will guess a cup, and he will offer you the chance to switch after showing you one of the empty cups.

If your friend is like most people, he will think he has the advantage in the game, for he will think that you will win just 1/3 of the time. However, you will win, on average 2/3 of the time. For your $1 investment, you will get an average of $1.33 (2/3 of $2). Not bad for 30 seconds’ work!

Maybe you can sucker your friend in by letting him play Contestant for the first few rounds. He will probably switch half the time and stand pat half the time, which does make it an even-money game. He will think the game is fair, and let you be the contestant after that.

Of course, a few bucks are not worth the loss of a friend. It’s probably best to use your winnings to buy him a drink. 🙂

31 Days – The Mandelbrot Set

Mandelbrot Set

This is an oldie but goodie. I’d like to show you a shape that is infinitely complex and also very beautiful, known as the Mandelbrot set.

Regarded from a distance, it looks like a bug with little bugs budding off of it. So what’s so beautiful? Zoom in anywhere along its edge and breathtaking patterns emerge. Most remarkably, you’ll continue to see repetitions of the original bug, but with variations.

In the pictures, the actual Mandelbrot set is the area in black. The colors at other points represent how close those points came to being members of the set. (I’ll explain what that means in a moment.)

Here’s a bug that is a bud off a bud off a bud off I-don’t-know-how-many other buds. For the full sequence that got us here, visit this site.

Mandelbrot Satellite Bug

The repetition and complexity continue literally forever!

Amazingly, the set is described by a simple equation: Zn+1 = Zn2 + C. Don’t worry if you don’t know what that means for now. The only point is that it’s simple, yet it produces an object of infinite complexity. How beautiful!

Let’s look at some videos.

The first video has some baroque music to match the baroque nature of the set, so turn on your speakers! At the beginning, notice how the bugs repeat. There’s a transition to a seahorse patterns that repeats with variation as the magnification increases, and finally an unexpected bug at the end.

Here’s a video that zooms in on another area. By the end, the magnification is so extreme that the original picture would be larger than the entire universe – and the complexity continues unabated.

So what’s going on?

To introduce the idea, consider what happens if you multiply a number by itself umpteen times. Let’s say the number is 2. You’ll get 2, 4, 16, 256 and so on. If you were plotting those number on the number line, you’d bounce along toward infinity. However, if you were to start with 0.1, you’d get 0.1, 0.01, 0.0001, 0.00000001, trending toward zero.

The Mandelbrot set multiples and iterates with a different sort of number called a complex number. If you’re interested in the details, please visit the links below. For now, suffice it to say that while a normal number is placed on a number line, a complex number is graphed on a two-dimensional plane. If you add or multiply complex numbers, you get to a different point on the plane, instead of a different point on the number line.

If the iterations don’t fly toward the infinite distance on the plane, then the complex number you started with is a member of the Mendelbrot set. If they veer toward infinity, then they are not members. On the videos, the different colors correspond to how quickly they fly off.

Here’s the best series of videos I’ve found that explain it all.

  1. Introduction to Complex Numbers
  2. Complex Plane Dynamics
  3. How Julia Set Images are Generated
  4. Mandelbrot Set: How it is Generated

31 Days – Euler’s Identity

When something is true by coincidence, we can just enjoy it…

HE: What brings you to a grocery store in the middle of the night?

SHE: I’m looking for a pie.

HE: Wow! Me too!

When the truth is serendipitous, we start to wonder whether Something More might be going on:

SHE: What kind?

HE: Strawberry rhubarb with macaroons on top.

SHE: That’s incredible! Strawberry rhubarb with macaroons on top is my favorite! And why are you up in the middle of the night?

When it’s true by definition, it’s no big deal…

HE: I can’t sleep. I’m a mathematician and there’s a problem I can’t solve. It has to do with pi.

SHE: Strawberry rhubarb pie?

HE: No, pi — defined as the ratio of a circle’s circumference to its diameter.

…but when it must be true and nobody knows why, our hearts start to pound.

SHE: Oh! Pi! As in Euler’s Identity, which <batting her eyelashes> mysteriously relates the five most fundamental numbers in mathematics: pi, e, i, 1 and 0, using only multiplication, addition, exponentiation and equality <bat, bat> exactly once each?

HE: I love you.

And here it is: Euler’s Identity. No list of 31 Wonders would be complete without it.

Euler's Formula

In case you’re not as familiar with math as our two protagonists, I’ll explain the three letters there. The wonder is how they can possibly be related so simply.

You can think of “e” as pertaining to continuously compounded interest. If you were to invest a dollar at a 50% interest rate, you’d have (1+1/2)2 dollars after two years, which is $2.25. At a 33% interest rate for three years, you’d have (1+1/3)3, or $2.37. Invest a dollar at an infinitely tiny interest rate for an infinite number of years, and you’d end up with (1 + 1/∞), or “e“, dollars. That’s about $2.72. (How amazing is it that we can even compute that answer!?) More on “e” here.

As an aside, “e” also happens to be expressible as an infinite series:


…which is pretty cool.

i” is the square root of -1. Can you think of a number that, squared, equals negative 1? Neither can anyone else, which is why “i” is called an imaginary number. In fact, in math it is the prototypical imaginary number. All other imaginary numbers are multiples of it.

You already know what pi () is, but here’s an infinite series for it:

Pi Series

…which is maybe even cooler than the one for “e“.

Now what five numbers could be less related to each other than e, i, pi, 0 and 1? How amazing is it that they do, in fact, combine into such a compact equation as Euler’s Identity? Many mathematicians consider Euler’s Identity to be the most beautiful result in all of mathematics.

If 1 + 1 = 2 is for kids and a2 + b2 = c2 is for grown-ups, then Euler’s Identity is for the gods.

And Euler’s Identity is only a special case of the more general Euler’s Formula, which brings trigonometry into the picture.

Tomorrow, I promise I’ll bring you something less geeky. For today, I hope you’ve enjoyed this excursion into the mysterious and beautiful world of math.