July 16, 2012

Particles in the Universe and Algorithms


My physics binge continues.
Here's a cool explanation for why we say there are 4x10^79 atoms in the universe.

This is a useful number to know, since it has some interesting implications for algorithms in computer science. Often, if we try to solve a problem using a brute force search ("try every possible solution, and then see if one of them solves the problem"), our algorithm will run really, really slowly for even small problems.

For instance, some brute force algorithms run in O(2^n) time. This means that as that as the problem grows linearly, the time it takes to find a solution grows exponentially. For instance, if it took me 2^10 = 1024 seconds to sort a deck to 10 cards, it will take me 2^11 = 2048 seconds to sort a deck of 11 cards, and 2^40 = 1,099,511,627,776 seconds to sort a deck of 40 cards.

Our first reaction might be to say, so what? Computers are fast as shit, and they keep getting faster, so we don't need to worry about it.

Ah, but we do. What if I want to use our shitty algorithm to sort a deck of 200 cards? This will take 2^200 seconds to do. And since 2^200 > 4x10^79, this is more seconds than there are particles in the known universe.

What this means is that we'll never have a computer that's fast enough to solve this problem using our shitty exponential time algorithm: even if we had a computer that uses every particle in the universe to perform one calculation a second, it wouldn't be fast enough.

In other words,even if we use the universe itself as a calculator, we're fucked. And that's why people search for faster algorithms to problems, instead of simply trying to make faster computers.

July 14, 2012

Scientists Discover the Higgs Boson

Bear with me - this is actually some crazy shit. In short, scientists have discovered the Higgs boson, and this has some profound implications for theoretical physics. How's that?

Well, our current conception of particle physics is encapsulated in a theory called "The Standard Model." The Standard Model models the behavior of subatomic particles, and explains the existence of all the fundamental forces in the universe except for gravity. In short, it's a pretty badass piece of work. Unfortunately, it's also rather ugly, and perhaps a bit contrived.

A contrived housing formula
What do I mean by 'contrived'? Let me explain by way of analogy. Let's pretend we want to model the price of houses in sellwood, and I present you with the following model, where [P = price], and [F = square footage]:

P = 133.3*F

Note that this formula only involves one constant: namely, the constant 133.3. A pretty elegant formula, no?

Now, I come to you guys and claim, "this badass formula explains house prices in Sellwood. For instance, the take the Kukla house. Here, we have F = 3000, so let's plug it in: 3000*133.3 = $400k. In indeed, this is exactly what our house it worth. Ergo, I'm a fucking G."

But chu jumps in: "No bra, not so fast. Let's do my house. Here, F = 4000, and if we apply your formula, we get P = 4000*133.3 = $533k. But our house is worth $600k. So, your formula blows."

Undaunted, I go back to the drawing board. This time, I decide to take into account the number of rooms a house has, giving me the following new and improved formula, where [R = number of rooms]:

P = 66.6*F + 33333.3*R

"Behold!" I cry. "Bow before my formula: since the Kukla house has 6 rooms and the chu house has 10, we get the following":

P = 66.6*(3000) + 33333.3*(6) = 400k
P = 66.6*(4000) + 33333.3*(10) = 600k

Still somewhat elegant. This time, instead of only one constant, the formula has two. But it works. "Read 'em and weep," I declare, having landed the finishing blow.

"But wait," sack jumps in. "My house has F = 3500 and R = 10, and is worth $550k. But according to your formula, it should be worth 66.6*(3500) + 33333.3*(10) = 533k. Ergo, your formula is worthless."

What a dick. Fine. My counterattack is to introduce a third variable: 'ninjaness of primary womp occupant' - call it N. What a ninja move. For the Kukla household, we have N = 100, and for the chu and sack households, we have -50 and -50, respectively. Thus, my re-updated formula is this:

P = -150*F + 125000*R + 1000*N

Three variables, now. It's getting kinda complex. But again, it works:

P = -150*(3000) + 125000*(6) + 1000*(100) = 400k
P = -150*(4000) + 125000*(10) + 1000*(-50) = 600k
P = -150*(3500) + 125000*(9) + 1000*(-50) = 550k

"Sure," you say. "It works - but that's because you kept inserting new variables, and kept pushing around your constants to fit the data. As a result, your formula is pretty contrived."

And it is. My final formula predicting house prices is consistent with existing data, but that's because it's been fit for existing data. The question is, how would it do if given new data? In other words, is my formula predictive? Is my formula capturing some underlying pattern, or have a merely kept introducing constants to fit the data already observed?

Is the Standard Model contrived?
What does this all have to do with the Higgs boson? Well, although the Standard Model is pretty badass and explains everything we currently know about particle physics, it's not unlike my final equation for house prices: it feels contrived. Sure, it explains existing data, but it also uses something like 11 finely tuned constants. Which raises the question: do we actually have a legit model here - one that describes underlying reality - or have physicists merely been pushing around constants to fit existing data?

Fortunately, there's a way to test this question. You see, the Standard Model doesn't just fit existing data. While it explains all currently known subatomic particles, it also make a prediction: namely, is says that there should be a particle called the Higgs boson.

This prediction is the main reason CERN built the $10 billion particle Hadron particle collider. In short, we wanted to find evidence that the Standard Model is legit. The thinking was as follows: "the Standard Model predicts a Higgs boson. So, finding the Higgs boson would be some pretty compelling evidence that we're on to something with this Standard Model of ours. If, on the other hand, we don't find the Higgs boson, then our current conception of physics is kinda bullshit - we've just been pushing around symbols to fit the data, and we need to go back to the drawing board."

This is why the discovery of the Higgs boson is so badass: it's evidence that we might actually kindoff understand how the universe works. It means that modern theoretical physics isn't just a bunch of abstract, bullshit math: it might actually be doing something akin to describing reality.

And that's, my friends, is fucking ninja sweet.

Good article explaining shit here