Thursday, April 15, 2010

A Birthday puzzle...

What can be the count of people in a group, given the probability of two people sharing a common birthday?

Let us assume that the correct count is n,

permutation of 365, n => p(365, n) / 365 ^ n = 1/2; Amazingly, the approximate value of n, satisfies this is 23 !!! no way related to the trivial answer 365 / 2 :)


Tuesday, April 13, 2010

Square root of 2 is irrational.

Proof by infinite descent:
=================

Proving sq.root(2) is irrational is a perfect instance.

Let us say, sq.root(2) a rational number.

x = sq.root(2) . y

x ^ 2 = 2 . y ^ 2 => proves x is even. let us further assume, x = 2 . z

4 z ^ 2 = 2 . y ^ 2 => y^2 = 2 . z^2 => proves y is even.

So, x and y are both even, which can be reduced further and further as proved above. So, x / y, representation of sq.root(2) doesn't exist, and hence irrational.


Identify a running instance - A Software tip

Identifying a running Instance:

Sometimes, It would be very helpful not to start a new instance if another instance is already running. Have your software create a Mutex once it is started and failure to do so, means another instance is already running.

Windows provides Standard APIs to create Mutex, CreateMutex, read through the link below about Mutex Windows API. Obviously, Name of Mutex must be unique and can be magic to avoid unexpected.

Fermat's Last Theorem.

Fermat's Last theorem:

It states an extension of Pythagorean Theorem to higher dimensions is not possible. In simple terms, we can't merge two cubes into a single cube unlike two squares can be merged into a single square. Proving Pythagorean theorem is very simple, but proving Fermat's Last theorem took 350 years until Andrew Wiles successfully proved it. A single proof which almost covers all possible areas of Mathematics, makes this theorem and proof very interesting.