Some people really find it hard to understand what is the concept behind the NP case in Mathematics and Algorithms, even if they are able to understand the equations governing it, and one among them were me. Now I've deviced a strategy to understand this concept better.
There are four concepts to be understood the P, NP, NP Hard and the NP Complete. Let's start this by understanding the theme of the following story: I doubt if there'd be somebody who doesn't know the story of the fox and the grapes. The fox went to the vine yard and tried to eat the grapes hanging in the vine. But the grape was hanging in the vine in a higher altitude, so it couldn't get it. The fox tried for some time and finally decided to move off, saying to itself 'The Grapes tastes sour'. A very wise decision indeed, but still isn't perfect or complete. Now lets analyze the story, and understand what the problem is. The fox needs the grapes in the vine and how it's going to get it is the problem. If the fox had plucked off the grapes in the vine, then the problem is solved. Meaning otherwise the problem had some polynomial solution (the P case). Had the fox tried really hard or had applied some kidneys (mean brain) to solve it, there could have been some solution to it. But may be it tried hard and didn't get to it. This means the NP case (can take now as the 'Not Possible' case). But there sure could be some solution which we donno' and is really hard pretty for sure. But here NP doesn't mean 'Non Polynomial', but means 'Non Deterministic Polynomial', which means there exists no deterministic time algorithm to solve such a problem in the stipulated time (For people who don't know what a algorithm is, it's just the set of rules or the step by step procedure to be followed to solve some particular problem). Now lets look up the cases of the NP Complete and the NP Hard categories. NP Hard problems are the hardest problems in P, meaning that it can be as hard as any NP but is solvable in some polynomial time. It's crazy ain't, NP Hard just means as hard as a NP but is a P. NP Complete problems are the hardest problems of all. Till now there is no algorithm available to solve such problems in P time. Then why is it NP complete? it's b'cos if one devices a algorithm to solve such problems in P time, then all available NP problems can be solved in P time, 'a completion case, if solved to all such problems', so is it called NP complete. |
|