0% found this document useful (0 votes)
42 views

Complexity: P & NP

This document discusses complexity classes P and NP and the relationship between optimization problems, evaluation problems, and decision problems. It defines the complexity classes P (problems solvable in polynomial time) and NP (problems verifiable in polynomial time) and explores the relationship between them. It introduces the concepts of NP-hard and NP-complete problems and provides examples like SAT, 3CNF, Clique, and Set Cover problems.

Uploaded by

kapilkondawar
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
42 views

Complexity: P & NP

This document discusses complexity classes P and NP and the relationship between optimization problems, evaluation problems, and decision problems. It defines the complexity classes P (problems solvable in polynomial time) and NP (problems verifiable in polynomial time) and explores the relationship between them. It introduces the concepts of NP-hard and NP-complete problems and provides examples like SAT, 3CNF, Clique, and Set Cover problems.

Uploaded by

kapilkondawar
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

7.

Complexity: P & NP
implies implies
solution for solution for
Optimization Problems Evaluation Problems Bound Problems
find an optimal solution, taking determine the value binary given a bound B, determine
most common in praxis subparts away of an optimal solution search whether the value of an optimal
solution is above or below B
need
to fin
d rela
ted

Decision Problems
binary output (yes/no)
to defin
h re spect ed w
ith re
d wit spect
e
defin to

Polynomial (P) ⊆ Non-deterministic


- P = { L ⊆ A* | ∃ TM M, ∃ polynomial p (trivially) Polynomial (NP)
such that L = L(M) and ∀x ∈ A*: tM(x) ≤ p(|x|)} - Def. 1 (parallel computation):
P = NP? NP = { L ⊆ A* | ∃ NTM N, ∃ polynomial p
such that L = L(N) and ∀x ∈ A*: tN(x) ≤ p(|x|)}
- Def. 2 (sequential verification):
NP is the class of languages that have
Polynomial-time reducible (≤p) deterministic polynomial-time verifiers
L ≤p L' ⇔ ∃f, f polynomial-time, f: A* → A*,
∀w  A*, w  L ⇔ f(w)  L'
L'  NP

NP-hard L' is NP-hard NP-complete


L' is NP-hard iff ∀L  NP, L ≤p L' L' is NP-complete iff L'  NP and L' is NP-hard

al
typic lem
proto ete prob
mp l
N P-co
SAT
Satisfiability of boolean expressions
p

3CNF
Satisfiability of boolean expressions
given in 3-conjunctive normal form

p ≤p
p

CNF Clique Set Cover


Satisfiability of boolean expressions Given a graph G and an integer k, Given a finite set U (“universe”), n subsets,
given in conjunctive normal form does G contain a clique of size ≥ k? and an integer k ≤ n, does there exist a
selection of k subsets whose union is U?

You might also like