Monday 21 October 2013

NP Complete problem

NP Complete problem
 Introduction:
· There are two types of problems:
 Problems whose time complexity is
polynomial: O(logn), O(n), O(nlogn),
O(n 2), O(n 3)
Examples: searching, sorting, merging,
MST, etc.
 Problems with exponential time
complexity: O(2n), O(n!), O(n n), etc.
Examples: TSP, n-queen, 0/1knapsack,
etc.
· Two classes of algorithms:
 P: The set of all problems, which can be
solved by deterministic algorithms in
polynomial time.
 NP: The set of all problems which can be
solved by nondeterministic algorithms in
polynomial time (NP: Nondeterministic
Polynomial)

CLIQUE PROBLEM
In computer science, the clique problem refers to any of the problems related to finding particular complete subgraphs ("cliques") in a graph, i.e., sets of elements where each pair of elements is connected.
For example, the maximum clique problem arises in the following real-world setting. Consider a social network, where the graph’s vertices represent people, and the graph’s edges represent mutual acquaintance. To find a largest subset of people who all know each other, one can systematically inspect all subsets, a process that is too time-consuming to be practical for social networks comprising more than a few dozen people. Although this brute-force search can be improved by more efficient algorithms, all of these algorithms take exponential time to solve the problem. Therefore, much of the theory about the clique problem is devoted to identifying special types of graph that admit more efficient algorithms, or to establishing the computational difficulty of the general problem in various models of computation. Along with its applications in social networks, the clique problem also has many applications in bioinformatics and computational chemistry.
Clique problems include:
finding the maximum clique (a clique with the largest number of vertices), 
finding a maximum weight clique in a weighted graph, 
listing all maximal cliques (cliques that cannot be enlarged) 
solving the decision problem of testing whether a graph contains a clique larger than a given size.
These problems are all hard: the clique decision problem is NP-complete , the problem of finding the maximum clique is both fixed-parameter intractable and hard to approximate, and listing all maximal cliques may require exponential time as there exist graphs with exponentially many maximal cliques. Nevertheless, there are algorithms for these problems that run in exponential time or that handle certain more specialized input graphs in polynomial time.

No comments:

Post a Comment