0% found this document useful (0 votes)
19 views10 pages

Np-Hard

Uploaded by

thirupal reddy
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
19 views10 pages

Np-Hard

Uploaded by

thirupal reddy
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 10

P,NP-CPMPLETE,NP-HARD PROBLEMS

 The problems are classified into two groups

• 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

NP problems are problems which


P problems are set of problems which can be
can be solved in
1. solved in polynomial time by deterministic
nondeterministic polynomial
algorithms.
time.

The solution to NP problems


cannot be obtained in
2. P Problems can be solved and verified in polynomial time, but if the
polynomial time solution is given, it can be
verified in polynomial time.

3. P problems are a subset of NP problems NP Problems are a superset of P


problems
All the NP problems are non-
4. All P-class problems are deterministic in nature
deterministic in nature
5. Example: Selection sort, Linear search, Example: TSP, Knapsack
Bubble sort, Binary search problem

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy