Thursday, 11 December 2014

Comment on The Unforgivable Curses

This post is about a group of curses from the magical world created by J.K. Rowling. If you don't know who Harry Potter(the Boy Who Lived) is, then this post is NOT for you.

I have compiled the following set of messages keeping in mind the different classes of people who may happen to read this post. Kindly assume "Harry Potter" written before the words, "books" and "movies".

People who have not read the books AND have not watched the movies :-
       
Don't read. Spoilers Ahead.

People who have not read the books BUT have watched the movies :- 
      
Read this post if you want, but you may not get many things I wrote in this post. Yeah, the movies don't do justice to the books.

People who have read the books :-

There are no additional conditions for you.

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

The Unforgivable Curses. They are named so because the Death Eaters indiscriminately used these curses under the terror reign of Tom Riddle. If any wizard is caught using any of those spells on a fellow human-being, the wizard is sentenced to a life term in Azkaban.
These curses are marked under Dark Magic. The user must be sufficiently skilled and powerful for the spells to work. More precisely, the user "has to mean" them for the curses to work.
These three curses form the Unforgivable Curses as per the Ministry of Magic :-
  • Imperius Curse (incantation: "Imperio!" ) :- Mind-Controlling curse. The user uses this curse to make the victim do whatever he or she wants. This curse may falter in case of strong victims who can oppose it.
  • Cruciatus Curse (incantation: "Crucio!" ) :- Torture Curse. This curse is said to cause immense amount of pain and agony to the victim. Longer duration of curse can cause permanent insanity. Bellatrix Lestrange(who uses this curse on the Longbottom couple, ultimately turning both husband and wife mad) advises Harry to take pleasure from hurting instead of using rightful anger. Only then, the curse would work. One can shield oneself from the curse.
  • Killing Curse (incantation: "Avada Kedavra!") :- The most mysterious of the three curses. If an user uses this curse successfully, then his or her soul breaks (whatever that means). No shield works against this curse.

So, I was thinking about the realistic foundations of these curses. The first two curses can be understood as to be doing something with the cerebral system of the victim. Imperius Curse is very similar to hypnotism while the Cruciatus Curse can be realized by falsely triggering the pain-receptors of the brain.

But, what about the Killing Curse ? The Unforgivable Curses need the user "to mean" them. How could one mean to kill ? When Tom Riddle killed his father using this curse, the police collected the body afterwards. The post-mortem report showed that the body was perfectly normal and healthy, apart from the fact that it was dead. I couldn't find any logical explanation for the curse to work.

That's all for the time-being. If you happen to find a logical explanation then do comment!

In the meantime, I will keep thinking about possible reasons behind all those things that do not make sense.

Thanks for reading !

Monday, 8 December 2014

Loner

Strange title to begin with it. Alone, Me ? Yes, most likely.

I will not brood over it. Nor bore you with unnecessary details. This is a post to rationally sort out the things that made me unsocial and as a result, lonely.

Here they are. One point at a time.

--> One of my classmates told me (Wait. One or many?) that I have a peculiar habit of using points in most of my writing. Well, sorry if it bothers any of you, but I can't help it. Points help me in thinking clearly. Well then, let's get to the point.

  • Looking back, it all started in Class 10. Nearing its end. My parents indirectly made me realize that I can't be irresponsible anymore. I had to get a decent job. They informed me of a simple path :- study. Get good marks in boards, go to a decent HS school, get a decent college education and finally get a job.
    So, I became ambitious. If I had been sorted at that time, I swore I would've went to Slytherin.
    I started making powerful( intelligent ?) friends. Friends who I can rely because of their extreme problem solving skills. I valued those who had intelligence. I considered that only nerds deserved any kind of attention from me.
    Naturally, I lost my friend-base, either because I found more intelligent "friends" or my friends found someone better.
  • Science. No matter how much I hate to write it, one of the things that acted as a transition function to my present state was science. I took one of its principle quite seriously :- Be curious. Question Everything. So, I avoided friendships thinking that that evolution(early humans needed friends to survive) was making me need friends. Same goes for my approach towards girls. I couldn't make out whether I was liking her because of what she is or because of my hormones kicking in (I may regret writing this line later in life, but for now, I am letting it stay).
    And, I questioned myself about myself. Who am I? What exactly universe is? Questions like that tend to make people more secluded. More thoughtful. Aloof. Far less friendly.
  • Comparing myself with others. For years, that was my working logic. Compare yourself with the next best one. Impoverise. Grow.
    I never realized that this was what making me grow cold. Always looking for what I don't have. Who had time for making friends ? I had to defeat the next one who stood in my way.
  • And, finally humans piss me off. I couldn't stop why the human civilization is as it is. Same things happening over and over again:- be born, get education, work for the economy, get married, raise children to take your place when you die and repeat.
    And, why the hell, there is so much wrong in this world. People killing people. People raping people. People conning people.
    So, I developed the notion that people are flawed. I am flawed. Why do I make friends with another flawed specimen of my own kind ?
That's everything I can get to my mind right now. So, the list of reasons I became a loner may tend to grow in future. Thanks for reading (I can give you a hug if you want).

But, I have to go now. I have a question that is bothering me for years :-

"How do I make myself the master of the universe?"  **evil laugh**

Monday, 18 November 2013

The Halting Problem

First of all, an introduction. 

The Halting problem:

Consider a program 'A' which accepts a program 'b' as an input. It gives 'true' as an output if the program 'b' stops(or halts) after a finite time. It returns 'false' otherwise. The problem is that whether such a program 'A' exists or not.

Finding a solution:

Let us try to write a pseudo code for program 'A'.

A(program b)
{
   if(itHalts(b)) 
      return true;
   else
     return false; 

You may be wondering what does itHalts() procedure do. Well, as the name suggests, it checks whether a program passed to it halts or not.

Wait !  

itHalts() checks whether a program halts or not.....Right ? We just said that program 'A' is assumed to do just that !

Let's then write the itHalts() procedure as the procedure 'A'. The pseudo code will then become:

A(program b)
 {
   if(A(b))  
     return true; 
   else 
    return false; 
 }

That's the problem with the algorithm.... it goes into infinite recursion ! No matter, how much time and computational resources, you provide, the program will never succeed in reaching an answer.

Thus, the "Halting problem" is indeed intractable - it cannot be solved by any computer.

The original problem was posed by the legendary David Hilbert. It was called the Entscheidungsproblem ('Entscheidungs' in German means "decision-making").

This problem was shown to be unsolvable by Alan Turing in his famous paper titled Computing Machinery and Intelligence which was published in the year 1950. It was a path-breaking work. More information could be found in standard books.

 


Friday, 1 November 2013

Intelligence vs. Evolution

If you are reading this, and understanding what I have written, then you may be called an intelligent being. By intelligence, I mean that you are quite able to grasp the characters before your eyes and through your accumulated knowledge of English language, you're able to understand what I have written. 

That's great ! You should be thankful to the millions of years of evolutionary processes that went towards it.

Now, for some moment, consider a butterfly. It has also evloved through millions of years and is quite dextrous in what it does. Can it be considered intelligent ? Ofcourse ! But, its not quite intelligent as us. 

Now a comparison: the butterfly is far more intelligent than the device you're using to see this post. Also, it has mastered the ability to fly (at moderate speed) and can mitigate obstacles quite easily.

It may also come in your mind that we humans have also made robots that can function as flying machines. Yeah we did :)

So, the interesting observation: we humans, who have lived on this earth for some 12000 years, have become so intelligent that we can create a robot that can mimic a butterfly(which has taken millions of years to evolve) ! Just amazing ! Intelligent beings creating intelligent beings within a far less time than what nature had taken...

 This observation can help you understand Technological Singularity (I recommend you to go over that link and check for yourself).

We have intelligence.  Intelligence enables us to do far greater things by taking in control of our surroundings. Also, evolution is helping us: with each passing decade and each passing century, we are becoming more intelligent and so our machines. 

Who will triumph ? We, who were created by evolution or the machines that will be created by us ?


I don't know. But, all hail to Intelligence.

Friday, 18 October 2013

Advent of Intelligent Machines !


We all have watched the movie Terminator. It revolves around intelligent machines from the future called Terminators, who are sent to eliminate Sarah (and John) Connor so that they couldn't save mankind from the impending doom(Judgement Day).

As you are reading this, I may assume that you have wondered if such machines are possible in reality. 

Yes, they are ! Not now, but sometime sure in the future !

Now, you may wonder how intelligent today's machines are. Frankly speaking their intelligence is not even close to the intelligence level of the stupidiest person on the earth

So, what characteristics should be present in an ideal "intelligent" machine ?

Analysing the premise of the question in terms of how we humans think, perceive and understand; we can safely point out four "has-to-be" properties that can make a machine intelligent. These four properties were laid out by the celebrated Computer-Science pioneer, Alan Turing, some 63 years ago, and is called the Turing test.

  • Processing Languages: The machine should be able to communicate in the complex natural languages that humans have developed. At least a human should be able to communicate freely with the machine in a language that he/she speaks.
  • Knowledge Retention: The machine should be able to store the information that it receives either by visual perception(through a camera) or by hearing (by an audio-detecting device).
  • Response: The machine should be able to give an automated response to different situations in a rational manner. It must also include reflex actions which require no/minimal thinking.
  •  Adaptation: The machine should be able to adapt to new situations that it is exposed to and must reach conclusions, that would have been reached by any other sane-human on being subjected to same situation. Also, it must solve problems on the basis of given facts and should have the ability to decide whether a particular problem is solvable or not.
Again, lots of research is going on reaching this feats. For ex: Neural networks that try to mimic human-brain, have become an interest area for many.

Also, you may ask whether an "intelligent" machine should behave exactly like a human or take a rational approach. Or whether it should have the ability to feel boredom like many intelligent animal do ?

Majority of people involved with Artificial-Intelligence (AI) believe that a rational approach rather than a human-like approach, is more feasible and acceptable. Reasons are again clear for that: much less knowledge is available about human thinking, which has been developed by still largely unknown evolution.

So, you can say that AI is quite exciting. It is still a baby-science and lot has to be done in it. 

But, its certain that intelligent machines (which may even surpass humans) will walk on this earth.

Will a John Connor be needed ? Or humans will reach even greater feats with machines that can think ?

Who knows ?

Only future will tell.
      



Wednesday, 25 September 2013

Factoring: number of ways to factorize a number.

It happens that you learn a new thing or two everyday. Today, I learned how to find the number of ways to factorize a number where order of divisors is not important (4 X 2 is same as 2 X 4).

Let's think about a the problem :

Suppose your number is n. Also, n can be factorized as n = a x b. So, the number of ways to factorize n will be equal to 1 + no. of ways to factorize b !

So, we need a recursive approach. Here's a code in C++ for doing such that:




//This code finds the no. of ways to factorise a number.
//It is based on a recursve code.
//Order is not important i.e; 2 X 4 is same as 4 X 2.
#include <cstdio>
#include <iostream>
using namespace std;

int countWays(int n,int factor)
{
   int i;
   int count=0; //This variable will contain the number of ways
  for(i=factor;i*i<=n;i++)
    if(n%i==0)
     count += countWays(n/i,i) + 1;
 return count;    
}  
int main()
{
    int n,t;
 scanf("%d",&t); //Test cases.
 while(t--)
 {
  scanf("%d",&n);
  printf("%d\n",countWays(n,2));
 }
 return 0;
}

Try to understand it ..its very simple !

Monday, 29 July 2013

Computer Science: A Beginning

So, here you are !
You are reading this either because you are a Computer Science student or want to be one.
Great...so, here I go.

First about computers. Computers make our job easier.
But, how ?

You will explore only this question in the fantastic realm of Computer Science !

But, becoming a good Computer scientist requires immense efforts. Also, you have to become good in the following things.

First and foremost,  you have to develop a sequential thinking pattern (Computers are sequential machines, they execute in discrete steps. They are not like you :- you have a brain which acts as a parallel machine).

Second, you have to get a good grip on a particular computer language which will be your tool for instructing computers what to do.

Third, you have to learn programming and know how some real world problems are solved on computers. The area is vast, but you still have to know some of the basic ideas.

Fourth, practice.... lots and lots of practice. Browse problems, read articles, discuss with your friends and most importantly, remain excited about computers !

Only this much for now. I will expand it if I feel the need to. Till then , good luck !