The genetic algorithm is one method of solving problems in computer science. Although it comes in many flavors, for the purposes of this article I’ll focus on a simple example.
Imagine you have a multiple choice test with 20 questions. Each question can be answered by choosing one of four choices. A compete answer to the test consists of a string of 20 characters, each of which is chosen from the set {A, B, C, D}. The solution to the test is an answer string where every answer is correct.
A valid, but not necessarily correct, answer string would look like this:
ABDCBDABDBCABDCCBABD
How many possible answer strings are there? Well, each position in the string can take on 4 different values, and there are 20 of them, so there are 4^20 = 1,099,511,627,776 possible ways to answer the test. That’s “just” over 1 trillion (over by 99 billion, that is). To give you a sense of perspective, that’s about as many seconds as there are in 35,000 years. Yeah, that’s a lot.
My wife turned up this post, in which a blogger goes on a bit of a rant in regards to attractiveness and weight. I’d like to throw my two cents into the pot and comment on two specific things she touches on briefly.
The paradox of the heap, also known as the Sorities Paradox (from the Greek word for heap), is a paradox revolving around the problem of vagueness.
In its classical formulation, the paradox is expressed as follows:
One grain of sand is not a heap.
If one grain of sand is not a heap, adding one grain of sand will not make it a heap.
So two grains of sand are not a heap.
So three grains of sand do not make a heap.
…
X grains of sand do not make a heap.
Therefore, 10,000 grains of sand do not make a heap.
The form of this argument boils down to:
X grains of sand are not a heap.
If X grains of sand are not a heap, adding 1 grain of sand will not make it a heap.
(Some arbitrary large number of grains of sand) do not make a heap.