Sunday, May 20, 2012

Have Mercy on my Implication


There is some sayings that irritates me. Like, "this is a quantum leap" (Norwegian: "Dette er et kvantesprang"). A quantum leap is the smallest possible leap in nature, in everyday life a quantum leap is the same as a continuous increase, as it is extremely small. That can be remedied, however, by thinking of the quantum leap as a leap in understanding. Physics at the scale of atoms were poorly understood until the concept of a quantum (the world is not continuous, but fundamentally quantized).

And then there are some that have no valid interpretation, some phrases that want me to knock someone's teeth out: "Yes, that implies truth."

It is common to confuse the following three words:
Correlation: Often when there is sun and rain we see a rainbow.
Causation: If you hit me on the head, I will feel pain.
Implication: If the moon is made of cheese, then I am eating chocolate right now.
(Since the moon is not made of cheese, the implication is true whether I am eating chocolate or not. Note also that moon and chocolate have nothing to do with each other.)
See Wikipedia's three pages for a more thorough explanation. Some may argue that implication is an abstract model for causation, but let us avoid philosophy right now.

Back to business: Instead of saying "X is true" some people say "X implies truth" to sound more wise. (In Norwegian: "X medfører riktighet"). This is completely bollocks! If you know that X implies truth, then you know nothing at all about X. ANYTHING implies truth! (Can you feel my frustration?) On the other hand, if someone were to say "Truth implies X", then you would know that X was true.


Friday, May 18, 2012

The Limitations of Logic


- Consistency, completeness, and Gödel's theorems.
- This is not really a hint to SolvingConundrums, but it is a prerequisite for understanding some of the solutions properly.

What is a logic? What is a mathematics? It is a set of axioms and some rules for deducing true statements.

Logic is the set of rules and axioms we have agreed to use. I will assume that we agree on these. (I refer to the mainstream choice, I know there are other candidates, like fuzzy logic, and I may come back to that later.)

A consistent system is one in which not both 'P' and 'not P' is true. In other words, a system where there is no statement P that is both true and false. Why is it so bad to have one such statement in our logic? Well, assume that we have one such statement, and call it P. Then for any other statement Z we get that P implies Z, because P is false. Then, since P is true, we can deduce that Z is true. The conclusion is that every statement in our logic is true (including 'not Z'). This is senseless – there is no difference between true and false anymore!

A statement-complete system is one in which every statement is either true or false, so that there is no unknowable thing. Having an incomplete system means that we can't know everything, even in principle, and that is bad. (When doing science we often think that there is just a matter of time and patience before we understand something.) This concept, I just made up, and it is a bad concept. What is truth, really, in a logical system? We still want to avoid epistemology (philosophy), so what then is truth? It is something that can be proved by using the axioms and logical rules.

In Logic/Mathematics we desire proofs. If something is true (say 'P'), then we want there to exist a string of logical arguments showing that 'P' is true. If something is true, but there is no way of knowing that it is true, that is bad. Our definition of truth in a logical system is that which can be proved within the system. A system where every statement (which can be constructed in the system) is either provably true, or provably false, is known as a complete system. Wikipedia calls this syntactically complete, and gives a nice reformulation: A system is complete if and only if "no unprovable axiom can be added to it as an axiom without introducing an inconsistency."

Let me be clear: We will only use one concept, so that truth and provability is the same thing in Logic. It is possible to make a distinction between the two, but I don't want to do that.

What Gödel tellsus is that we can never have a complete system (given that it includes basic number theory and some extra technicalities). If humanity some day decides on a logical system to use for all eternity, then either that system is inconsistent or incomplete according to Gödel's proof. In other words, since we require our system to be consistent, there will be statements that are neither true nor false in our system.

What do we call these statements that are neither true or false in our logical system? We call them independent or undecidable. Examples of these are the axiom of choice (independent in ZF-logic), and the continuum hypothesis (independent in ZFC-logic). These examples are (to mathematicians) interesting statements, so the problem that Gödel found is not some weird technicality, but something we have to deal with.

What can be done with an independent statement? We can choose to add it as an axiom, or we can choose to add its negation as an axiom. Logic does not care which we choose, it will still be consistent regardless of our choice! If we want to model observable reality, however, we might care about which is "true", as in which choice results in the best model of reality.

When we have added our axiom (or its negation), then our logic is a new and more powerful logic, where more statements are provable (also known as 'theorems'), and where more statements can be constructed. Again Gödel's proof works, and we can find new (and possibly interesting) statements that are independent in this new logical system. And so on, and so on.

Here, those who are familiar with mathematics might want to try to cheat, and add an infinite sequence of axioms, each based on a previous level's known independent statements. Even this (and generalizations of this) will not work at all. The logic you end up with is either incomplete or inconsistent.

Gödels general examples that always work in a logical system T (not true nor false):
(A Gödel number is a proof translated to a number in number theory.)
"There is no Gödel number to this statement using the logical rules of system T"
(i.e.: There is no proof of this statement.)
"The logical system T is complete"

Sunday, May 13, 2012

Solving Conundrums Part 1


[I was a little unsatisfied with my last post, the second part of Q.M. logic, so to the next theme I will take a different approach; starting with a problem to solve, and, within two weeks, give hints, and within four weeks, the solutions.]

I have a conundrum for you (that word tastes like soft thunder rolling over the horizon on a warm summer day). Well, I have several. All in the form of seemingly innocent questions, that soon become quite frustrating logical puzzles. I promise that I will solve all of them in a very concrete way; I am, after all, a mathematician (I do not, however, promise that you will like the solutions, as I am not a politician).

The First Conundrum
You sit down to have your exam in [logic-something-course], and get the following multiple-choice question:
"If you were to answer this question randomly what is the probability that you would be correct?
A) 25%
B) 50%
C) 0%
D) 25%
"
What is the correct answer?

The Second Conundrum
Suppose you are at a crossroads, and there are two paths, one will lead to riches, and the other to death. In the old days there were two brothers; one who always speak the truth and another who always lie. They were, of course, identical twins. The solution was to ask both of them, which road would your brother tell me to go to get riches, and then go the opposite way.

Sadly, one of the brothers was killed by an angry customer. As they were twins, noone knows who died and who still lives on. The only thing you know about the person in front of you is that he always either speaks the truth, or he always lies. What do you ask him? Will you get rich?

The Third Conundrum
Is the following statement true?
"This sentence is false."
What about the two next sentences, are any of them true?
"The next sentence is false.
The previous sentence is true."

The Fourth Conundrum
Once upon a time, there was a proud king. His throne was usurped by a maniac, and the king was to be executed. The maniac said: "I will execute you this week, on Tuesday, Wednesday, Thursday or Friday. I will come and get you early in the morning, and it will surprise you!" The proud king then answered: "Well, fool, you cannot kill me on Friday, because then I will know it Thursday evening, so it will not be a surprise! Since you are unable to kill me come Friday, on Wednesday evening I will know it if you plan to kill me on Thursday, hence you cannot kill me on Thursday. Now, only Tuesday and Wednesday remains. So if I am not executed on Tuesday, I will know that you plan to kill me on Wednesday. Hence only Tuesday remains. But I know this, so there are no possible day when you can kill me!"

The maniac thought about this for a while, then answered "We will see". On Wednesday, the proud king was, to his surprise, executed (he had, after all, predicted that he would not be executed). Where was the flaw in his logic?

The Cat That Killed De Morgan


According to google (number of hits), it's supposed to be "the cat who killed", does anyone know for sure?
In logic (classical/ordinary logic) we have something known as De Morgan's laws:
Let P be the statement 'It's raining outside', or any logical statement
Let Q be the statement 'The sun is shining', or any other logical statement

Then saying 'not(P and Q)' is the same as saying '(not P) or (not Q)', in words:
'It can't be both raining outside and sunny' is the same as
'It isn't raining outside, or It isn't sunny'
(yes, none of the sentences are necessarily true, but they are equivalent)
(in logic, 'A or B' means 'either A, or B, or both')

Does this work in Quantum Mechanics? No. Remember our perfectly grey cat. If you ask the cat
P: Are you black
Q: Are you grey

The statement 'not(P and Q)' [not both black and grey] is true. In the Quantum Mechanical sense, you cannot observe that it's grey and black at the same time (that is not a legal outcome). Hence (grey and black) is false, and 'not(grey and black)' is true.

The statement '(not P) or (not Q)' [not black or not grey] is true in 50% of the experiments. The part (not grey) is never true, as it starts out with being perfectly grey, and you cannot then observe it to be not grey. The statement 'not black', however, is true 50% of the time as it is a 50% chance that when we measure it to be 'not black' the cat will spontaneously become white. In total '(not P) or (not Q)' is true 50% of the time, and false the other 50% of the time.

So in Quantum Mechanical logic De Morgan's laws are not valid, the two statements are not equivalent. But in logic we require this law, so what to do? Well, even though I have called it Quantum Mechanical logic, it isn't really logic, but something else that has a strong similarity to ordinary logic; and it has some differences as we just saw.

To be fair to any mathematically inclined readers I want to add a comment. The "logical" 'or'-statement in Q.M. is usually taken to be a join of subspaces (the least subspace containing both the subspaces of Q and P), instead of a 'or' between two experimental outcomes, so that in our example the most natural thing to say is that (not black) or (not grey) is the linear span of the two, namely the whole 2-dimensional black/white subspace. Observing whether it is in this subspace would give a 'yes' with a 100% probability. It was, after all, grey. This seems to make my point moot, but alas, even with this more refined notion of "logical 'or'" you can find contradictions to De Morgan's laws (where meet and complement of subspaces is not the same as complement and join), see for example this page.

Monday, April 30, 2012

The Color Of A Cat


I'm late for my two week-appointment with my blog, so here's something special.
- How logic in Quantum Mechanics differs from the 'real world'.

Today I want to tell you one of the big secrets of Quantum Mechanics, using a parallel with a cat in it. By the time you have read this page (a couple of times) ordinary Quantum Mechanics will hopefully be clear, if not, don't hesitate to ask. Schrødinger's cat is another well known parallel with a cat, but it is about something else (in Q.M.).

We all use probability in our daily life, it's a handy tool. There is 1/6 chance of a die landing on a 6, there is 1/2 chance of a slice of bread landing with the peanut-butter-side down on the floor. Here, common sense dictates several wrong claims, like getting a 6 two times on a row (on a die) makes a third 6 less probable. Forgetting those fallacies, we all think that having enough information removes the probability. If I know the exact speed(s), air currents and form of the die and the table, I could (in theory) predict exactly on which side it would land.

So the classical world ('real world', 'everyday world') probabilities are really hidden variables. Stuff we don't know. Probability is in the map and not in theterritory.

How does this differ from Q.M.? Let us give a parallel.

Say you have a perfectly gray cat. Perfect in the sense that it is exactly halfway between white and black on your gray-scale. If you ask 'is the cat gray?' what happens? The answer is 'yes', and, of course, the cat doesn't care. If you ask 'is the cat black' what happens? You get the answer 'sort of' or 'halfway black', and, again, the cat doesn't care.

Let us assume this cat is an electron, and color is some property of that electron. The cat is still perfectly gray. If you ask 'is the cat gray?' what happens? Well, the answer is 'yes' and the cat doesn't care. It's the same, so no surprises yet! If you ask 'is the cat black?', two things can happen:
  1. Answer: 'yes, black' and the cat instantly changes color to black.
  2. Answer: 'no, not black' and the cat becomes non-black, which, in this case (starting with a grey cat) would actually give you a white cat.
Poor cat. But which of the answers do you get? If you had 1000 such cats and asked them all, you would get answer 1) about 500 times, and answer 2) about 500 times, so we say that the probability of getting 1) is 1/2 and same for 2).

To digress, what Schrødinger's cat is about (if I understand it correctly), is whether this is actual probability. Are there any hidden variables determining which of the cats come out black, or is there an inherent True Probability in Nature? 'God does not throw dice' -Einstein. If anyone cares, I believe Einstein to be wrong about this, and that these experimental outcomes are determined by probability. I also believe the Schrødinger's cat experiment to be a bad argument, as the cat would measure whether it was alive or dead. You don't have to be a person to do an 'experiment', and not a cat either; any two molecules on a collision course will do an experiment to see whether they collide or not.

What is special about Q.M. logic? Grey can be a 'superpositon' of white and black. How do we model this? There is a certain thing in mathematics called a Hilbert space, where colors are unit vectors (or subspaces), and a vector [1,1] can be viewed as a superposition of [1,0] and [0,1].

Why? Well, experiments show that... But why? This borders on philosophy. From a scientific point of view, this is our best model – it works (there's a friggin' flag on the Moon and a rover on Mars).

Sunday, April 15, 2012

Answers to odd numbered exercises

(This post will discuss the difference between a good and a bad scientific understanding/education.)

Why is there, in most math books (and physics, chemistry etc.), only solutions for some of the exercises? The last chapter is often "Answers to odd numbered exercises", but why not give answers to all of the exercises?

It could be laziness, but if you ask those who write the books they answer "the students learn better". Students, on the other hand, often complain, "how can we know that we are doing things right, without all the solutions?" Well, in mathematics, half the point is being certain that you are right. Even though this is close to the point I want to make, it's not exactly it, so let us hear a story.

"Once upon a time, there was a teacher who cared for a group of physics students. One day she called them into her class, and showed them a wide, square plate of metal, next to a hot radiator. The students each put their hand on the plate, and found the side next to the radiator cool, and the distant side warm. And the teacher said, write down your guess why this happens. Some students guessed convection of air currents, and others guessed strange patterns of metals in the plate, and not one put down 'This seems to me impossible', and the answer was that before the students entered the room, the teacher turned the plate around. "

(Taken from this page who cites Verhagen 2001.)

I see this all around me when people are trying to find a 'scientific' explanation for the world. The physics students in this story did a 'political argument', they wrote their bottom line first. If we write the conclusion first, it does not matter what kind of arguments we use to support it. When we write the conclusion, it's either correct or false – whatever arguments we write down after having decided does not influence the conclusion. You can give the best arguments for why the earth is flat, and how you can fall of the edge, but it doesn't change the world.

The kind of 'political thinking' where you choose your 'truth' first, and your arguments second is very common, and works fairly well when putting pressure on other people and on the society. But if you are faced with a difficult problem where there is a well defined answer, your arguments are supposed to help you find the correct solution.

When solving a math exercise, would you write down the answer (42) at the bottom of the page, and then try to give sufficient arguments and 'good' calculations resulting in 42? Then you are learning how to get 42, not how to find the correct answer.

The power in science is being surprised whenever something implausible happens. If you can explain everything equally well, then you truly know nothing.

Monday, April 9, 2012

A rose by any other name


A few weeks ago I posted the following status to facebook:
"A shovel, by any other name, would still shovel dirt. A rose, on the other hand, would it still smell as sweet?"

This was the end result of one hour of deliberation, and it has significant philosophical depth. Apparently, facebook is not the place for something like that, so let me explain to you what it means. (I meant to do this two weeks ago, but you know...)

First one has to associate to it the well known saying by Shakespeare (said by Juliet in 'Romeo and Juliet', which is a good enough read, and written in funny English (by the way, has anyone noticed the similarities between Shakespeare-talk, and Yoda in Star Wars?)):
"What's in a name? That which we call a rose
By any other name would smell as sweet."

Modern research would answer: "Yeah, no, not really". Words, by their sound, and by their relation to other words (associations, connotations), does carry quite a bit of 'subconscious' prejudice.

How can this be? Studies show how the expensiveness of wine makes you like it more. So that if you don't know the price, most wines are equal (or even more expensive wines do poorer), but if you know that a wine is expensive, then you like it more. Now, you are probably thinking that the subjects reported to like it more, so that we can only conclude that the price affects how much we think we should like it. But no, alas, it also affects the amount of pleasant your brain generates. So the conscious price-information is taken into account when your brain decides how much it likes the wine on a subconscious level!


This should explain the second sentence of my facebook status, but what is the deal with the shovel?

Well, even if you are told that the shovel was expensive (maybe it's lined by gold or something) what happens? If it breaks, or is unable to contain enough dirt, then whatever it's called and how it's priced does not matter at all. Perhaps you like the expensive gold-shovel more, but the shovel that is best at shovelling dirt is the 'best shovel'.

To clarify, there is a distinction between two different values here. On one side it is the beauty, or the artistic value of a rose; it is summer and happiness, joy and love. On the other side it is the usefulness or practical value of the shovel. Even though it shovels dirt (a word with negative connotations) it is important to us. And this practical value would not be changed by renaming it.

As any other pair of concepts these are seldom seen apart. More often than not, the two values are entwined in any given object; there is a combination of artistic value and usefulness. But ideas, I think, are more powerful when we are able to distinguish between them.