Np-Hard
Np-Hard
• The first group consists of the problems that can be solved in polynomial
time by using deterministic algorithms
Ex:
1)searching of an element from an array –O(log n)
2)sorting of given ‘n’ elements O(n log n)
3)All pairs shortest path problem O(n cube)
• The first group consists of the problems that can be solved in polynomial
time by using non-deterministic algorithms
Ex:
1)Travelling sales problem O(n2 2n)
2)Knapsack problem O(2n/2)
The algorithm in which every operation is uniquely defined is called
deterministic algorithm.
The algorithm in which every operation may not have unique ,Instead there
can be specified set of possibilities for every operations such as algorithm is
called non-deterministic algorithm.
The problem that can be computationally solvable are subdivided into three
classes
1)Polynomial problems(P)
2)Exponential problems(E)
3)Non-computable(Intractable) problems(I)
h
h
h
SNo P Problems NP Problems