Counting Crows, Hunting Bugs - Hempel's Paradox

A new version of our product is just around the corner. We’ve just passed the code-freeze date, meaning no more writing code. The plan is to spend the next few weeks hunting down all those elusive bugs lurking viciously beneath the unsuspecting user interface. The rigorous checking and rechecking of all the features will probably prove to be a very boring task, so I came up with this alternative idea straight to the welcoming arms of escapism.

The Hempel's paradox is one example of a situation where inductive logic violates intuition. Let’s examine the hypothesis that all ravens are black. I must admit I’ve seen some gray crows in Israel, but I’m ready to ignore that and proceed with this example the Hempel’s way. While walking around in the world, every black raven observed should increase your belief in this hypothesis. No surprise there, but… this statement is equivalent, in logical terms, to the statement that all non-black things are non-ravens, so as it turns out, a red apple observed should also increase your belief in the hypothesis that all ravens are black. If you could see all the non-black things in the universe and ensure none of them is a crow, you could indeed conclude that the hypothesis is true. Since the number of non-black things is far, far larger than the number of crows, observing one more non-black non-raven thing can only make a very small difference to your degree of belief in the hypothesis compared to the difference made by observing one more black crow, but still, a red apple really does strengthen the hypothesis that all ravens are black.

With Hempel at my side I plan to call my new boss and inform her I’m staying home next week. She will probably expect me to validate ‘Our product contains no bugs’, but my strategy is to convince her I’ll check the equivalent ‘If there’s a software bug it’s not in our product’. I hope she’ll authorize this so I’ll be able to start the bug hunting on Sunday morning. I plan to begin by rigorously checking StarCraft. Wish me luck.

~~~
p.s. My husband was the first human on Mars and all I got was this lousy T-shirt.

13 comments:

yair.h said...
This comment has been removed by the author.
yair.h said...

Dear Uri,

I think you have a bug...

all ravens are black = all non-black things are non-ravens

?#@$!

all ravens are black AND ALL BLACK THINGS ARE RAVENS

is correct left side of the equation.

Uri Kalish said...

Hi Yair,

All ravens are black = All non-black things are non-ravens AND maybe there are more black things that are non-ravens. Proving the first part of the right side will be enough to prove that the ravens (possibly with some other objects) are all on the “black side” of the universe.

Uri.

yair.h said...

Uri,

"a red apple really does strengthening the hypothesis that all ravens are black"

It does not.
Because the color of an apple doesn't give us any information about the color of a crow. If the apple was black, would it make a difference? of-course not. It is because, as you say, "... AND maybe there are more black things that are non-ravens". This refinement makes the color of ANYTHING that is not raven, not relevant. Therefore, sampling the universe and viewing the color of objects that are not ravens doesn't help us.

Ruthy and Yair

Uri Kalish said...

It does help. Assuming the number of non-black objects in the world is finite, after inspecting each one and ensuring it’s not a raven, you will prove that all ravens must reside on the black objects group. This way, every red apple inspected is getting you closer to your goal. Other objects may be black also, but that doesn’t matter.

Miky Schreiber said...

Uri is right. Simple Logic. Yair, go back to the old logic books... :-)

yair.h said...

Dear Miky (and Uri),

"Assuming the number of non-black objects in the world is finite, after inspecting each one and ensuring it’s not a raven, you will prove that all ravens must reside on the black objects group"

Wrong. You will prove that there are no ravens.

I suggest you take a box, put many things inside (besides ravens) and look at their color. Why looking at the objects inside the box tells us that ravens are black and not red?!

AS COLOR IS A PROPERTY OF A RAVEN. YOU MUST SEE AT-LEAST ONE RAVEN BEFORE YOU CAN CLAIM ANYTHING ABOUT ITS COLOR.

Uri Kalish said...

Hi Yair,

“You will prove that there are no ravens”

I disagree. I think you will prove ‘If there are ravens - they are all black’.
Note that if there are no ravens in the world, you can say anything about them and it will always be true (e.g. all purple armadillos that have a B.A. in computer science think Ajax is a cool technology).

“You must see at least one raven before you can claim anything about its color”

I disagree. You could claim ‘all ravens are purple’, and start to inspect all non-purple objects in the world. While every non-purple non-raven object inspected would increase your belief in this new hypothesis, you will eventually come across a black crow and disprove this new hypothesis.

yair.h said...

Uri,

"I think you will prove ‘If there are ravens - they are all black’."

We see objects from all shapes (excluding ravens) and colors (including black!)

Why doesn't it prove ‘If there are ravens - they are all yellow’ in the same amount of certainty that all of them black?

Uri Kalish said...

It can’t PROVE all ravens are yellow since we know that eventually you’ll find a black raven and this will disprove this hypothesis, but until that point – yes, every non-yellow non-raven object inspected should increase your belief in the (false) hypothesis that all ravens are yellow.

Miky Schreiber said...

I'll solve this problem for you in an instance: Have you heard about Godel's Incompleteness Theorem? If you learned computer sciences I think you had.
So you probably know that even if something is true, maybe it can't be proven. So what's the point of arguing? :-)

yair.h said...

"all ravens are black = all non-black things are non-ravens"

The argue was about does this sentence is true and does it have any practical side?.

I hope we all agree now that:

1. This sentence is true.

2. As long as we don't see at-least one raven, there isn't any practical or statistical aspect to this statement or to any algorithm deriving from it.

3. Mixing philosophy with logic is bad for health.

Shabat Shalom,

Yair

Uri Kalish said...

Mixing philosophy with logic is a great way to spend your weekends!