Showing posts with label math. Show all posts
Showing posts with label math. Show all posts

Friday, April 24, 2020

How to Ensure the World Never Ends

A few weeks ago, we talked about the idea that the world is not magically eternal, and it is possible for it to come to an end. We finished with a positive message that by taking this possibility seriously, we have the ability to prevent it from happening. Today, we’re going to use math to show why there is hope, and why it is worth it to work for the preservation of humanity.

Each year, there is some probability the world will end. At times, the probability has been frighteningly high, such as in the US-USSR cold war. It is clear that we want to avoid the risk rising to such levels ever again. But how low is low enough? Suppose there is a 1 in 100 chance the world will end this year. That doesn’t seem too bad; it’s a little scary, but we’re almost certain to survive. But what if the probability remains the same next year, and the next, and the next? A 1 in 100 chance of extinction in one year adds up to a 63 in 100 chance of extinction in 100 years!

It’s impossible to get the probability to 0, because there is always the possibility for something to go horribly wrong. How low, then, is low enough? One in a million? One in a billion? Because of the way probabilities stack up, the cumulative probability will rise to 63 percent over that timespan. In other words, if there is a one in a million chance of annihilation per year, then the probability will have risen to 63 percent after a million years, and continue to climb after that.

I don’t know about you, but I’m not comfortable with the probability rising over 1 percent ever. Well, in the reasonable future at least; the universe will inevitably end, but that is so far in the future we can approximate it as infinity. So how is it possible, if probabilities accumulate and it is impossible to get the probability to 0, to prevent the cumulative probability from rising up into the unsafe zone?

To answer this, we have to look at the mathematical concepts of limits and convergence. Let’s start with limits. Take the equation,

y = 1/x2

What happens when x = 0? We’ve been taught that it doesn’t work, we’re not allowed to divide by 0. But we can take the limit as x approaches 0. The smaller x gets, the larger y gets. Thus, the limit of y as x approaches 0 is infinity.

Now let’s talk about convergence. Suppose

y = 1/2 + 1/4 + 1/8 …

The sequence goes on infinitely long, each term being half the previous term. What is y if there are an infinite number of terms? You might think that, since we are adding an infinite number of positive numbers together, the answer will be infinity. But it’s not. If we take the limit of y as the number of terms approaches infinity, the series converges to 1. That’s right, the sum of this series, all infinite terms of this geometric sequence, is a finite number!

The graph for the function e1-x continually approaches 0, but never reaches it. However, as x approaches infinity, the total area under the curve starting at 0 approaches the number e, or approximately 2.7.
So now we have what we need in order to reduce the probability of human extinction to 1 in 100 cumulatively from now to the infinite future: Start small, and reduce the probability every year. If the probability is 1 in a million this year, we should aim for 1 in 1.1 million next year, 1 in 1.3 million the next year, and so on forever. We can never reach perfection, but we can always get just a little better.

Of course, this is an idealized goal. The probability in real life goes up and down depending on technology, politics, Earth’s geological and environmental state, and all kinds of things. But we can use wisdom, governments, institutions, and individual passion to mitigate the probabilities so that when they rise, they don’t rise as high as they might have. And if we keep working on these problems forever, we can continue to improve on them until the universe starts to run down. And even then, if we have been working on existential risk for all that time, we may be able to forestall the heat death of the universe as our post-biological descendants enjoy life for eons untold.

Friday, September 6, 2019

Imaginary Numbers and Beyond

Everyone knows what a number is. It is an amount of something. We have the natural numbers, 1, 2, 3, … We add zero and negative numbers to get the integers. Between the integers, we have rational numbers, which can be written as fractions or ratios. And we have the real numbers, which include numbers like π and √ 2  that cannot be written as fractions. It would seem like that’s all the numbers, because if we try to fit anything else in, it counts as a real number.


But let’s do something weird. If we multiply a number by itself, we get its square. 42 = 4*4 = 16. We can do the opposite, what is called the square root. √ 16  = 4. But when we play around with this, we notice something. A negative times a negative equals a positive, so -4*-4 = 16. Therefore √ 16  = 4 and √ 16  = -4. It might seem weird that there are two answers, but that’s all right. If we find a square root in a calculation in physics, it just means there are two right answers. For instance when you calculate the moment in time when a cannonball will be a certain height after it is fired, you find it’s at that height twice, once as it goes up and once as it comes down.



But consider the following operation: √ -1  . What is the answer? It’s not 1, because 1*1 = 1. It’s not -1, because -1*-1 = 1. So does it just not have an answer? No, it does. Everything in math has an answer. If the answer can’t be found in what we already know, we have discovered something new. We define √ -1  as i, and see what happens from there. In official math, the set of all real numbers *i is called the imaginary numbers, and the set of all combinations of imaginary numbers plus real numbers (for example, 8 + 4i) is called the complex numbers.

Let’s play around with i. i*i = -1, so i*-i = 1 logically, 4i*i = -4, and the same holds true when you substitute 4 with any other number. But again, what happens when we get to √ i  ? It’s not i or -i. It’s not anything that doesn’t include i. Do we have to postulate a new type of number? Something like j = √ i  ? Miraculously, we don’t. √ i  can be written as a number that doesn’t involve j or any other letter besides i. That number is:

√ i  = 1/√ 2  *(1 + i)

Hold on. That looks weird. Let’s do the calculation to make sure it actually is the answer. We start by squaring it:

(1/√ 2  *(1 + i))2

By association, this is equal to

1/√ 2  2*(1 + i)2

The left part is easy.

1/2*(1 + i)2

Next, we need to know the rules for how to square groups of numbers that are added together. (1 + i)2 does not equal 12 + i2. It equals, not forgetting the 1/2

1/2*(12 + 1*i + i*1 + i2)

We simplify this to

1/2*(1 + 2i + i2)

i2 = -1, so we have

1/2*(1 + 2i - 1)

The 1 and the -1 cancel each other out, so

1/2*2i

1/2*2 = 1. So when we simplify it completely, we are left with

i

And there it is! We have just proven √ i  = 1/√ 2  *(1 + i). No new dimensions of numbers are required.

Are imaginary numbers just a math thing, or do they have applications to the real world? One significance of imaginary numbers is that they represent things that don't exist. For instance, you can calculate the moment in time when a cannonball in flight will be higher than its highest point, and you get an imaginary number. On the other hand, sometimes complex numbers are shortcuts we can take to make math easier. For instance, in the famous Schrodinger equation in quantum physics, momentum is represented by an imaginary number. We could represent it by another dimension of real numbers and put in more sines and cosines, but imaginary numbers make it a whole lot easier.



But we can do other things besides take the square root. Complex numbers obey a rule called commutativity, which means 4*5 = 5*4, and the same is true with any other pair of numbers. But what if it weren’t? In math, it’s perfectly okay to ask questions like that. For this one in particular, we get a new, 4-dimensional set of numbers called the quaternions. Their units, and their basic operations are

1, i, j, k

i2 = -1,     j2 = -1,     k2 = -1

i*j = k,     j*k = i,     k*i = j

j*i = -k,     k*j = -i,     i*k = -j

i*j*k = -1,     k*j*i = 1

Notice the differences between the 3rd and 4th rows. If we switch the order of multiplication, we get a minus sign. This is weird, and you may wonder if it even makes sense, or if the mathematicians who dreamed it up were smoking something. To assuage your fears, there is a more intuitive way to understand it, and that is to use matrices. Although the quaternion i can be thought of as the same as the complex i, it can also be written as a matrix, as can j and k, and even 1.


To multiply matrices, you take the first row in the first matrix and the first column in the second matrix, multiply each pair of numbers in the order they appear in the row and column, add the results, and put the answer into a new matrix in the place where the row and column cross. If that was as confusing to read as it was for me to write, here is a single step as an example. Suppose we want to calculate i*j in matrix form. Specifically, we want to know what the top right element will be. To do that, we choose the first row of i and the last column of j


The top right element of the result will be

0*0 + -1*1 + 0*0 + 0*0

Or

-1

Do that with every other combination of i rows and j columns, and you’ll find that you end up with k, just like we expected. And the same is true with every other product combination. I won’t prove it here, because that would be a lot of work and no one would read it, but you can work it out for yourself if you like, or you can take my word for it. In any case, hopefully you are convinced that the quaternions make sense, and aren’t just random gibberish spouted by people who want to be seen as smart.

Quaternions aren’t just a quirk of math. They are useful in modeling 3D rotations, and they are used in all kinds of simulations, movie special effects, and video games. This goes to show that math is everywhere, and even the weird, out-there mathematics can have a practical use.

Are quaternions the end, or are there larger sets of numbers still? There are. By a process called the Cayley-Dickson construction, which I know nothing about, you can get an infinite amount of them, increasing in size by powers of 2. Beyond the quaternions there are the 8-dimensional octonions, and then the 16-dimensional sedenions, and on and on. What are these number groups useful for? Heck if I know. But it sure is fun to know they exist!

Hopefully, this discussion has shown you a glimpse into the wild depths of mathematics. If not, then at least you will be able to wow your friends with imaginary numbers, and brag that you know what the square root of i is.

Friday, August 30, 2019

The Science of Luck

Image by nitrolxstock on deviantart.
It happens to all of us every now and then. Something good happens that we didn’t expect, or that is incredibly unlikely. We get a check in the mail. We win at a game we aren’t very skilled in. The rain lets up just as we have to go outside, despite a forecast of unrelenting downpour. Then, it happens again. And again. And we get a feeling of elation, as if something unseen is messing with the fabric of reality. Or, the opposite happens. We lose the game by a one-in-a-million chance occurrence. An apple falls in the mud, and the one drop it throws out lands on our nice white clothes. And these things start happening one after another, and we feel an otherworldly sense of despair, as if the universe itself were conspiring against us. In both instances, our minds search for an explanation, and we call it “luck.”

The gambling type like to link luck with feelings, going with their gut whether or not to make another bet or play another round. The rationalist type like to say luck doesn’t exist, that it’s just an illusion. Who is right? You’re probably expecting me to side with the rationalists, being one myself. But as much as I am a rationalist, I am also a non-conformist, and I choose a third option: to examine the idea of luck from a philosophical perspective.

In our last discussion, about God, we talked about open and closed definitions, and this seems a good time to put that concept to use. If we give luck a closed definition, it would say something like, “luck is an immaterial force that is sometimes aligned with your wellbeing and sometimes against it,” and the question would be whether or not it exists. On the other hand, if we give it an open definition, “luck is the explanation of why strings of unlikely things happen,” then we are describing something that definitely does exist, and the question becomes, “what is it?”

Instead of coming up with some hypothesis to test, let’s first see what we would expect based on known science and math. We’ll start with the simplest random system, flipping a coin. If it’s a well-balanced coin, it has a 50% chance of landing on heads and a 50% chance of landing on tails. So we expect if we flip it a bunch of times, we will get roughly half heads and half tails. If we were to flip 10 heads in a row, we would say that is sufficiently far from the expectation that it counts as luck.

What is the probability of flipping 10 heads in a row? Well, if each individual toss gives us a probability of 50%, or 1 in 2, or 1/2, then the probability of each subsequent head multiplies it by another 1/2. Let’s look at what we need to get a second head. The second head is also 1/2, but it only counts if we get the first head, making it 1/2 of 1/2, or 1/4. If we want a third head, it becomes 1/2 of 1/4, or 1/8. We see the pattern, the probability of getting n heads in a row is 1/2n. Thus, the probability of flippeing 10 heads in a row is 1/210, or 1 in 1024.

But wait, we said it would count as luck if we flipped 10 heads in a row. But if we flip 10 coins 10,000 times, we’ll see 10 heads in a row a few times by sheer probability! In fact, if 10,000 people flip 10 heads once, we expect to find several of them have flipped 10 heads in a row, and for these individuals to get excited about it.

Now extend this to everyday experiences. If the probability of something happening to any given person at any given opportunity is 1 in a million, it’s not really that unlikely. There are billions of people in the world, and they may each have many opportunities a day for 1 in a million events to happen. Although the chance at any one time is very small, we should not be surprised when we see them happening all the time, and even to the same person in a row every now and then. No magic, no mysticism, we have found the explanation for luck in good old fashioned mathematics!

This tells us something else about luck; it is only an observation of the past, and cannot be used to predict the future. When we get “on a roll,” with lots of good things happening in a row, we feel like it is more likely for the next outcome to be a good one too. But unless there is some causal connection between past events and future events, the probability of the next good thing happening is the same regardless of what came before it. The probability you will roll a seven on a pair of fair dice is 1 in 6, regardless of whether this is your first throw, or you have already rolled eight sevens in a row. Your luck so far is not a good predictor for what will happen next. There is a chance, of course—1 in 6 is not that bad of odds—but there is no mystical force influencing the outcome in your favor.

When strings of unlikely things happen to us, we shouldn’t be surprised. It’s perfectly normal, just what we would expect in a universe governed by plain old natural statistics. Maybe you think that’s boring, and I’m taking all of the wonder out of luck. But I see it as the opposite: keeping the wonder of luck in a deterministic, mathematical world. The universe is stranger and more amazing than we can fathom, and the nature and logic behind the scenes doesn’t have to change any of that.

Friday, May 10, 2019

Mathematics: The Language of the Universe

Nature of Reality:
Quasi-Realism
Representational Realism
Existence and Natures
Knowledge of Reality
The Language of Reality

Toolbelt of Knowledge: Concepts
Algorithms
Equivalence
Emergence
Math
The Anthropic Principle
Substrate-Independence
Significance

In our discussions about the nature of reality, we have come to the view that reality is a thing unto itself, independent of perception, belief, or knowledge. Anything we perceive or think we know about reality is not reality itself, but only a representation we have constructed in our minds. A representation is true to the degree that its logic matches with the logic of the real thing it is describing. Today, we are going to talk about that logic, mathematics.

By WyrdWolf on Deviantart
A lot of people see math as something mysterious that they will never understand. But math is not supernatural. It is not hidden knowledge available only to an elite few. People who know math are not wizards or prophets, they are normal people just like you. I hope that after reading this discussion, you will be convinced that you can learn math too, if you so desire.

To start, let’s forget about numbers and just think about something physical, like air pressure. We know from centuries of experiments that, the pressure in a given volume is proportional to the number of molecules in the volume and the temperature. This may sound complicated, but all it means is if more air is added or the temperature is increased, the pressure increases.

Let’s look at the italicized statement. We have four physical quantities: pressure, volume, number of molecules, and temperature. Let’s shorten each of these to just their first letters: P, V, N, and T. “Is proportional to” means if you change what comes after it, then what comes before it changes by the same percentage. We can represent this by an equals sign and a constant, the letter k. Put this together, and we have,


It’s an equation! We have just done something marvelous; we have taken a fact about reality and written it as a mathematical statement. By doing this, we realize a profound truth: math is not just a tool to work with numbers and get answers to homework problems; it’s a language and a writing system. By becoming math-literate, we break into a higher level of understanding the universe.

Let’s try it again. This time we’ll start with an equation, and figure out what it means.

The first thing we need when trying to read this equation is what the letters mean. In normal languages, letters have mostly the same sounds wherever they appear. In math, it is not so; we must be told what each letter means every time. It is the organization, operations, and numbers that have consistent meaning. So here is what the letters in our new equation mean: capital T stands for temperature, small t stands for time, and k is a constant.

What operations does this equation have? The first thing we notice is d/d. This means, the rate at which the thing on top changes as the thing on the bottom changes. So for us, it would be the rate the temperature changes over time. Next, we notice a triangle before the T on the right. This triangle means the difference between two of what comes after it. So in our case, ΔT means the difference between the temperatures of two objects.

Putting all this together, we can read the equation. It says, “The rate at which temperature flows between two touching objects is proportional to the difference in temperature between the two objects.” This means if two touching objects have very different temperatures, heat will flow quickly between them, but if their temperatures are near each other, the heat will flow slowly.

There is one final piece to the equation, and that is the minus sign. This tells us that the temperatures are changing closer to one another, not running away to extremes. This makes sense. Cold things heat up when they touch hot things, and hot things cool down when they touch cold things. Heat always flows toward equilibrium.

The ability to read equations is only one small part of math. There is also geometry, group theory, set theory, vectors, tensors, and much more. All of these fields of study are called the same thing, math, so what do they all have in common? The answer is that mathematics is the set of all well-defined abstract ideas that follow the principle of non-contradiction. To create math, we must declare one or more axioms, statements that define an imaginary object.


Let’s take an example. "A circle is a shape where every point on its boundary is the same distance from its center." Based on this axiom, we can figure out all kinds of things about lines drawn through circles, intersecting circles, circles in curved space, and more. Everything in math is like this; we start with axioms, and then use logic on them to figure out all that we can about them.


Philosophers and scientists have often wondered at how well math is able to describe the universe. To some, it seems miraculous. However, based on everything we have talked about in the Nature of Reality series, I think it makes perfect sense. Here’s why:

1) A representation is true to the degree that its logic lines up with the logic of the part of reality it is meant to represent.
2) An idea is a representation.
3) Reality is well-defined and always follows the principle of non-contradiction.
4) Every idea that is well-defined and follows non-contradiction is mathematical.
Therefore, everything in reality can be truthfully represented by mathematical ideas.

If we accept the views of reality we have argued for on this blog, this is why Mathematics is the language of the universe.