NP Hard and NP Complete
NP Hard and NP Complete
NP Hard and NP Complete
tyt errpho.
(cimputa hional pnl,h
Proslend
bacable
Deinition of P-ctasc' - the problems -thalcan be soved
arse calle
pelnorad tine by dutigmintta alges
"ptahds to poynoal
NP- clay
NP-tomplule
NP-hand
o u ndettand
-3uncnen ne uwe l
Vauee Bandon bhemtheset x
I- choice lA) (hocaee any
LeedHo irli'cale unsulcess t l nphu
3.
Ne-han
Aucibe decvton preldenu
prolole that ene hancn one
NP- hand:
Non-Qetennislie dlgotathimn tos ca1chirg.
peoblen to deanch
Consideog the Set S[t : x], x>/
epecified elenent e in he
give the output, the fncle (i)
and element
of the dearching
detismiiste seasch algohn
e non -
the PAoblem u as follows,
tor
NDSeach x, e).
(s.
dlgosithim;-
i:choice (1,x);
if (si]e)
then
outpot(i),
SUccessC);
else
output (o:
failuse (3
ecsiOn Paoblern anol cpimiali on Psoblern
, Gien a staing S, and sting S, does
S, appeas as
and 's do s and s
2, Given tuo ses S and
?
Contain the csame dset of elements
3 Given a giaph G with integu wtights
hae
intgea k, does
on it edges and veght
a minimum ópanning t e of
atmot K ?
datufiabibty.
9 Boolean Vasiables ; ,X2 ,
2, Boole a connectives o any boolean
furetons ottk one tawo inputt ancd ore
Butput asuch as A (AND), VCOR), ~CNoT),
’ Cimplica bor), o C and only if) anod
3 pasenthess
NP- HARD AND NP- CoMPLET E CAS SE S
"p' is tke class of decision Aobbms
polynomially bounchd. "p s
dlefineol ony fot decisiorn pAobtens.
"Np is the class of deeiion piobem
for cohich these is poly nomially
boonoltd 2on - de tesminisic algoithn.
NP -Conpe te paoblems
TCx)
X ounses
(aninpot laninput
NP ttaud paoblems det l, and l br paobl
by by a oleluministio
s a cway to solue
using adationinitie
S
' olgo
to cornshuc
Ihe time heeded