Thursday, July 17, 2008

While I Was Away on Vacation

The mail that caught my attention first when I came back from vacation was a forward named "Don't miss even a single word". It was "an inspirational story" intended to show that atheists are not as rational as they claim to be. As my friends can imagine, I couldn't leave the argument at that. The mail and my reply are given below just for fun.

The Story:

An atheist professor of philosophy speaks to his class on the problem science has with God, The Almighty. He asks one of his new students to stand and.....

Prof: So you believe in God?

Student: Absolutely, sir.


Prof : Is God good?


Student: Sure.


Prof: Is God all-powerful?


Student : Yes..


Prof: My brother died of cancer even though he prayed to God to heal him.
Most of us would attempt to help others who are ill. But God didn't. How is this God good then? Hmm?
(Student is silent.)

Prof: You can't answer, can you? Let's start again, young fella. Is God good?


Student: Yes.

Prof: Is Satan good?

Student : No.

Prof: Where does Satan come from?

Student: From....God...

Prof: That's right. Tell me son, is there evil in this world?

Student: Yes.

Prof: Evil is everywhere, isn't it? And God did make everything. Correct?

Student: Yes.

Prof: So who created evil?

(Student does not answer.)

Prof: Is there sickness? Immorality? Hatred? Ugliness? All these terrible things exist in the world, don't they?

Student: Yes, sir.

Prof: So, who created them?

(Student has no answer.)

Prof: Science says you have 5 senses you use to identify and observe the world around you. Tell me, son...Have you ever seen God?

Student: No, sir.

Prof: Tell us if you have ever heard your God?

Student: No, sir.

Prof: Have you ever felt your God, tasted your God, smelt your God? Have you ever had any sensory perception of God for that matter?

Student: No, sir. I'm afraid I haven't.

Prof: Yet you still believe in Him?

Student: Yes.

Prof: According to empirical, testable, demonstrable protocol, science says your GOD doesn't exist. What do you say to that, son?

Student: Nothing. I only have my faith.

Prof: Yes. Faith. And that is the problem science has.

Student: Professor, is there such a thing as heat?

Prof: Yes.

Student: And is there such a thing as cold?

Prof: Yes.

Student: No sir. There isn't.
(The lecture theatre becomes very quiet with this turn of events.)

Student : Sir, you can have lots of heat, even more heat, superheat, mega heat, white heat, a little heat or no heat. But we don't have anything called cold. We can hit 458 degrees below zero which is no heat, but we can't go any further after that. There is no such thing as cold . Cold is only a word we use to describe the absence of heat . We cannot measure cold. Heat is energy . Cold is not the opposite of heat, sir, just the absence of it . (There is pin-drop silence in the lecture hall.)

Student: What about darkness, Professor? Is there such a thing as darkness?

Prof: Yes. What is night if there isn't darkness?

Student : You're wrong again, sir. Darkness is the absence of something. You can have low light, normal light, bright light, flashing light....But if you have no light constantly, you have nothing and it's called darkness, isn't it? In reality, darkness isn't. If it were you would be able to make darkness darker, wouldn't you?

Prof: So what is the point you are making, young man?

Student: Sir, my point is your philosophical premise is flawed.

Prof: Flawed? Can you explain how?

Student: Sir, you are working on the premise of duality. You argue there is life and then there is death, a good God and a bad God. You are viewing the concept of God as something finite, something we can measure. Sir, science can't even explain a thought.. It uses electricity and magnetism, but has never seen, much less fully understood either one.To view death as the opposite of life is to be ignorant of the fact that death cannot exist as a substantive thing. Death is not the opposite of life: just the absence of it. Now tell me, Professor.Do you teach your students that they evolved from a monkey?

Prof: If you are referring to the natural evolutionary process, yes, of course, I do.

Student: Have you ever observed evolution with your own eyes, sir?
(The Professor shakes his head with a smile, beginning to realize where the argument is going.)

Student: Since no one has ever observed the process of evolution at work and cannot even prove that this process is an on-going endeavor, are you not teaching your opinion, sir? Are you not a scientist but a preacher? (The class is in uproar.)

Student: Is there anyone in the class who has ever seen the Professor's brain?
(The class breaks out into laughter.)

Student : Is there anyone here who has ever heard the Professor's brain, felt it, touched or smelt it? No one appears to have done so. So, according to the established rules of empirical, stable, demonstrable protocol, science says that you have no brain,sir. With all due respect, sir, how do we then trust your lectures, sir?
(The room is silent. The professor stares at the student, his face
unfathomable.)

Prof: I guess you'll have to take them on faith, son.

Student: That is it sir... The link between man & god is FAITH . That is all that keeps things moving & alive.

NB: I believe you have enjoyed the conversation...and if so...you'll probably want your friends/colleagues to enjoy the same...won't you?.... this is a true story, and the student was none other than.........

APJ Abdul Kalam, the former president of India

---------------------------------

My Reply:

Hi,
I can only say that the Professor is not much intelligent. No scientist would want his students to listen to his lectures faithfully. He would want them to question every word he says, to see for himself as far as possible.

Also, belief in evolution can never be compared with belief in God. Evolution is a scientific theory. Nobody asks anyone to believe it as immutable truth. Ever since the theory was put forward, scientists are collecting more and more evidence. Upto now EACH piece of evidence suggests that the theory is true. If tomorrow a SINGLE fact is discovered which proves conclusively that evolution by natural selection is false, ALL the scientists would discard it as a non-working theory. (By the way, evolution doesn't teach that man is descended from monkey. It says that Man and Monkey are cousins. So are Man and Cat. This shows that the professor doesn't have much knowledge of evolution)

Science doesn't have all the answers. No scientist claims that he knows the principles behind everything. But he is hopeful. He believes that he can find the answers. This keeps the science alive. The crucial point is this: Just because science has still a long way to go doesn't mean that religion has already reached the summit. The major difference between a scientist and a religious person is that when a scientist doesn't know something, he admits so. In contrast, the religious claims to have all the answers already written in some books.

Well I can't imagine that the professor fell for these silly logic. I think it just shows the standard of professors in India.

------------------------------------------

I don't know if the foolish arguments of the story were indeed used by the former President of India. If he did, I hope that he is now an intellectually maturer person (If you have been reading my earlier posts carefully, you can see that here I am contradicting myself. But as you are bright enough to notice it, you can sort it out, too).

Sunday, May 4, 2008

Egoists

We hear sometimes people speak of someone as: "He is such an egoist. Always wants others to praise him". This in reality is a contradiction. An egoist is a person who is self-centered, who has (perhaps too much) self-confidence. Such a person wouldn't care if others talk about him or not - he is almost self-contained and doesn't depend on others emotionally. In contrast, if somebody needs others' praise, it usually means that he values them more highly than himself. Whatever this implies, it is not an oversupply of ego.

Of course, there are diehard egoists who love praise even though they don't actually need it. But even in this case, the two sentences (1. He is an egoist 2. Always wants others to praise him) are independent and the second is not an explanation of the first.

So in majority of the cases what should be said is: "He has too little ego. Always wants others to praise him"

Visualizing 3-D graphs

I have never been very good at visualizing and when in 11th standard they told me that z=ax+by+c is the equation of a plane, I couldn't "feel" it. That y=ax+b is a line in 2D world I had no doubt becuz all one had to do was to grab a graph paper and draw some points and voila! there is a dull yet wonderful line.

For 3D graphs, things were not so easy. The best one could do was to depend on a plotting software. Unfortunately, I then knew as much about computing as about driving a train. So I had to just take the text books on their word.

(OK, the last para was not wholly accurate. "The best one could do"? "So I had to"?. Really it should be "I thought The best one could do" and "So I thought I had to". But I am coming to that)

Some weeks ago when I was attending a boring class I thought I should as well try and visualize some 3-D graphs. I tried and to my chagrin found out that it was not so hard after all! So if you are still with me, here is how to:

The first thing one should do to enjoy any good show is to be on the best place to watch. What better place for watching the graph show than the Holy Origin?

Imagine a large field (infintely large, to be precise) with you standing in it. Call the place you stand the origin (don't stray, please). Your right and left hands indicate the positive and negative x axes respectively. Along your height is the positive z axis and stretching directly in front of you is the positive y-axis.

Now here is the trick: imagine an infinite series of vertical semi-transparent graph papers at each point on the y axis. ie, at y=1 there is an x-z 2-D graph paper. It is not actually important that there are an infinite number of them. But you should be able to produce one at any y point as required. Of course, it is terribly important that the graph papers should have a variable transparency. Graph papers are just props and not a part of the show.

That's it! Let's try and visualize z=y.

Here is one very obvious plain fact: z=y is the same as z=c at y=c. Too obvious, rt? But this is all that is needed to visualize z=y. at y=0, the graph is z=0 ie., a line parallel to the x axis. Plot it in the graph paper at y=0 (if you remember, this paper should be splitting you in half). Visualize this plot (if it helps, you can imagine the line as a lengthy tube light or in Star Wars) but try to make the graph paper completely transparent. In the graph paper at y=1, plot the line z=1 ( a line parallel to the x-axis but a little higher than the previous line). Continue this process till you get the feel of it. Behind you, you can draw some plots for negative y. All these lines are parallel to x-axis but as y goes on increasing, the lines will be having greater heights.

Now, just forget about the graph papers but retain the lines plotted. Can you see a staircase like structure? It is a staircase because we plotted only a finite no. of lines. From y=0 we jumped to y=1. If we draw lines at y=0.5, y=1.5 etc. The number of lines will be increased. We can go on adding lines and in the end -- it is the plane!

Make sure that you can successfully visualize z=y before going any further!

Next let's take z=by.

Here the "very obvious plain fact" is: z=by is the same as z=bc at y=c. This means simply that for the plot lines to reach the same height it may take a longer (b<1),>1) or the same (b=1) time. In other words, the plot is the same plane and the intermediate plot the same staircase but with a greater or smaller steep if b is not 1.

What about z=ax+by? We already know the special case when a=0. The only difference in the general case is that the lines(the rungs of the staircase) are no longer lines parallel to the x-axis but are at a definite angle (depending on the value of a) to it. So, our staircase is as though placed on uneven ground. Our plane has a horizontal tilt.

Try it yourself question:
* Visualize z=ax+by+c

If you have reached here unscathed, let's try to visualize something a little bit more complex: z=xy.

Our simplifying statement: z=xy is the same as z=cx at y=c. So at y=0 our line is z=0; at y=1 z=x; at y=1 z=2x so on. Now, in z=cx c is a measure of how (comparitively )fast we reach infinity. ie., z=2x reaches the point z=2 earlier (at x=1) than z=x which reaches the same point at x=2. (In this article I have used the terms like earlier, fast etc in a sloppy manner. If you are mathematically oriented, forgive me as my intention is just to be intuitively expressive). So z=2x is "closer" to the z axis (which reaches infinity the fastest -- at x=0!)

So, the "steps" that make up our "staircase" (we don't actually know if it is a staircase for this graph yet) for z=xy become closer to the z-axis before us as y increases and closer to the negative y-axis behind as y decreases (why?). Our plot lines start (if we are looking forward in our hypothetical plane. if you are not, look ahead!) at z=0 the line is horizontal. As the distance from us increases, the lines become steeper and steeper until, at infinity, the line becomes parallel to the z axis. The graph is hence a twisted plane. One thing to note is that the plane is not uniformly twisted because only at y=infinity does the plane becomes perpendicular. The twist is rather sharp around y=0 but becomes almost unnoticable at higher y's. As it turns out, our "staircase" is a long spiral one. Try to visualize this graph -- it is beautiful. Really!

Try it yourself questions:

* Visualize z=yx^2 and z=xy^2
* Can we visualize z=xy as a very large sheet that is shifted perpendicularly at the ends?

P.S. I have doubts whether I have been very clear. In fact I am positive that some of what I have written is rather confusing at places. Plz help me write a better version of this article.

Sunday, April 13, 2008

Winners vs Losers

This is a thought from months back. I saw somewhere the quote "Winners don't do different things. They just do things differently". If winners are people who do the same things as losers but in a different way, it would turn out that losers are people who do the same things as winners but in a different way. Then what is the difference between them?

Well, as the quote itself is rather stupid (how can you define a winner? A person who is happy or a person who appears to be happy or a person who others feel ought to be happy?), the thought was not exactly revolutionary and there was no need to go further. Still, I felt good.

One Subtly Illogical Argument

Once when I was 10 or 11 I looked at some pictures drawn by children in a Newspaper and commented tactlessly to my brother that many hardly esembled what they were supposed to resemble. He asked if I could draw even half as good. Thinking about my own "horrifyingly original" creations, I answered truthfully "no". "Then don't make fun of them", he said. "You have no right to criticize someone if you can't do better"

I was confused. I sensed there was something wrong with the logic but couldn't tell exactly what it was. Now I would have replied "Well, you don't have to be a master cook to taste something, right?" The fallacy of the logic here needs no pointing out.

What I want to emphasize is not of course that I have a damn good right to comment on any food I come across (which, by the way, I do have). It is that many "logical" arguments when seen in a different light reveal themselves to be surprisingly hollow.

"Mature" intellects may think that this no-right-to-tell-what-you-think specious reasoning cannot be used to confuse them. It is, in most part, a mistaken smugness and that is why being "mature" is not always a desirable thing. Thinking like a child is an art(lessness) we should all practice.

Anyway, when speaking about the God hypothesis, one argument I repeatedly hear is: "If there is no God, how can you explain the universe? How do you account for the planets, the laws, the mathematics?". See the sophistry? The argument is exactly the same. If you don't have a better hypothesis (If you can't cook better .... ) you have no right to criticize the current one (.... eat quietly even if you would love to throw up). Now see? I wonder what would the leading mathematicians have replied if someone, after having presented a fallacious proof for the Fermat's last theorem and having been rejected, had said: "You don't have a valid proof yet. So you have no right to reject my proof." Fortunately, I can wonder as such an incident has not (as far as I can tell), occurred.

Incidentally, no one who presented this argument to me were deliberately trying to mislead. They themselves were "blinded by logic" as it were. I am very curious to know the real origin of this line of reasoning.

Again incidentally, there are hypotheses that are at least as valid as the God hypotheses explainining the Life, the Universe and Everything (even the hilarious hypotheses expressed in the The Hitchhiker's Guide to the Galaxy are more coherent). But the whole point of this sermon is that lack of alternative theories doesn't constitute any kind of proof.

Thursday, April 3, 2008

A Random Password Generator

A good password should be as random as possible, not just pseudo-random. Hence password generator programs shouldn't depend on the library functions like rand() because they generate reproducible "random" numbers whose "randomness" depends solely on the seed.

Here is a simple password generator in Perl which uses random bits from /dev/random to generate as good a password as can be made on a Unix machine. The password length can be specified as an optional argument. By default, it generates a password of length 10.


#!/usr/bin/perl -w

# (C) Minus i 2008
# Permission is granted to copy, modify and/or redistribute this under the
# terms of GNU General Public Licence version 3, or later.

use bignum;   # for arithmetic that may transgress
              # from the integer field

use Config;   # to know the integer sizes in the system

$len=$ARGV[0]>0?int $ARGV[0]:10; # by default, generate a password of length 10

open R, "/dev/random", or die "couldn't open: $!";

# password contains characters from this array
@CHR=('a'..'z','A'..'Z',0..9,' ',
qw(~ ! @ $ % ^ & * - _ = + \ | ; : < > . / ? ));


$intsize=$Config{ivsize};
$maxint=(1<<8*$intsize)-1;># The idea is simple. To generate a character, we read $intsize bytes
# from the random file and use it to get a random number in the range of
# 0 and $#CHR. With this, we just index the array.

read R, $buf,$intsize*$len;


$pw="";

# The Unpack function is used to get $len integers of $intsize bytes each
# from the string $buf
map {$pw.=$CHR[int (@CHR * ($_/(1+$maxint)))]} unpack("I$intsize"x$len,$buf);

# Work over, print the password
print"$pw\n";




Caution: Since the program uses /dev/random, in GNU/Linux systems it may block until the system has gathered enough entropy. You can use /dev/urandom to generate less random passwords faster, but I would advise against it. While you are at it, generate highly secure passwords.

Wednesday, March 26, 2008

Random Numbers and God

It is easy to see that no entity can be simultaneously omnipotent and omniscient. Omniscience means complete knowledge (of past, present and future) and omnipotence implies a power to go against that knowledge.

If we just think about random numbers, this will become clear (or hopelessly confusing at least :)) Here is how: Suppose that there are true random numbers. ie., somebody can generate numbers that can't be predicted beforehand. This implies that nobody is all-knowing. On the other hand, if all supposedly random numbers are only pseudo-random, no one is all-powerful QED.