• Keine Ergebnisse gefunden

Theory of Computer Science E6. Beyond NP Gabriele R¨oger

N/A
N/A
Protected

Academic year: 2022

Aktie "Theory of Computer Science E6. Beyond NP Gabriele R¨oger"

Copied!
20
0
0

Wird geladen.... (Jetzt Volltext ansehen)

Volltext

(1)

E6. Beyond NP

Gabriele R¨oger

University of Basel

May 15, 2019

(2)

Complexity Theory: What we already have seen

Complexity theoryinvestigates which problems are “easy” to solve and which ones are “hard”.

two important problem classes:

P: problems that are solvable inpolynomial time by“normal” computation mechanisms

NP: problems that are solvable inpolynomial time with the help ofnondeterminism

We know that P⊆NP, but we do not know whether P = NP.

Many practically relevant problems are NP-complete:

They belong to NP.

All problems in NP can be polynomially reduced to them.

If there is an efficient algorithm forone NP-complete problem, then there are efficient algorithms forall problems in NP.

(3)

coNP

(4)

Complexity Class coNP

Definition (coNP)

coNPis the set of all languages Lfor which ¯L∈NP.

Example: The complement ofSATis in coNP.

(5)

Hardness and Completeness

Definition (Hardness and Completeness) Let C be a complexity class.

A problemY is called C-hardifX ≤pY for allproblemsX ∈C.

Y is calledC-complete ifY ∈C andY is C-hard.

Example (Tautology)

The following problemTautologyis coNP-complete:

Given: a propositional logic formulaϕ Question: Isϕvalid?

(6)

Known Results and Open Questions

Open

NP= coNP? Known

P⊆coNP

IfX is NP-complete then ¯L is coNP-complete.

If NP6= coNP then P6= NP.

If a coNP-complete problem is in NP, then NP = coNP.

If a coNP-complete problem is in P, then P = coNP = NP.

(7)

Time and Space Complexity

(8)

Time

Definition (Reminder: Accepting a Language in Timef) LetM be a DTM or NTM with input alphabet Σ, L⊆Σ a language andf :N0→N0 a function.

M acceptsL in timef if:

1 for all wordsw ∈L: M accepts w in time f(|w|)

2 for all wordsw ∈/L: M does not accept w

TIME(f): all languages accepted by a DTMin time f. NTIME(f): all languages accepted by aNTM in timef. P =S

k∈NTIME(nk) NP =S

k∈NNTIME(nk)

(9)

Space

Analogously: A TM accepts a languageLin space f if every word w ∈Lgets accepted using at most of f(|w|) space besides it input on the tape and no w 6∈Lgets accepted.

SPACE(f): all languages accepted by a DTM in spacef. NSPACE(f): all languages accepted by aNTM in spacef.

(10)

Important Complexity Classes Beyond NP

PSPACE =S

k∈NSPACE(nk) NPSPACE =S

k∈NNSPACE(nk) EXPTIME =S

k∈NTIME(2nk) EXPSPACE =S

k∈NSPACE(2nk) Some known results:

PSPACE = NPSPACE (from Savitch’s theorem) PSPACE⊆EXPTIME⊆EXPSPACE

(at least one relationship strict)

P6= EXPTIME, PSPACE6= EXPSPACE P⊆NP⊆PSPACE

(11)

Polynomial Hierarchy

(12)

Oracle Machines

Anoracle machine is like a Turing machine that has access to an oraclewhich can solve some decision problem in constant time.

Example oracle classes:

PNP={L|Lcan get accepted in polynomial time by a DTM PNP={L|with an oracle that decides some problem in NP}

NPNP ={L|Lcan get accepted in pol. time by a NTM NPNP ={L|with an oracle deciding some problem in NP}

(13)

Polynomial Hierarchy

Inductively defined:

P0 := ΣP0 := ΠP0 := P

Pi+1:= PΣPi ΣPi+1:= NPΣPi ΠPi+1:= coNPΣPi PH :=S

kΣPk

P0 = ΣP0 = ΠP0 = P = ∆P1 NP = ΣP1 ΠP1= coNP

PNP= ∆P2 ΣP2 ΠP2

P3 ΣP3 ΠP3

...

(14)

Polynomial Hierarchy: Results

PH⊆PSPACE (PH= PSPACE is open)? There are complete problems for each level.

If there is a PH-complete problem, then the polynomial hierarchy collapses to some finite level.

If P = NP, the polynomial hierarchy collapses to the first level.

(15)

Counting

(16)

#P

Complexity class#P

Set of functions f :{0,1} →N0, wheref(n) is the number of accepting paths of a polynomial-time NTM

Example (#SAT)

The following problem#SATis #P-complete:

Given: a propositional logic formulaϕ Question: How many models doesϕhave?

(17)

End of Part E

(18)

coNP Time and Space Complexity Polynomial Hierarchy Counting End of Part E

What’s Next?

contents of this course:

A. background X

. mathematical foundations and proof techniques B. logic X

. How can knowledge be represented?

. How can reasoning be automated?

C. automata theory and formal languagesX . What is a computation?

D. Turing computability X

. What can be computed at all?

E. complexity theory

. What can be computed efficiently?

F. more computability theory . Other models of computability

(19)

What’s Next?

contents of this course:

A. background X

. mathematical foundations and proof techniques B. logic X

. How can knowledge be represented?

. How can reasoning be automated?

C. automata theory and formal languagesX . What is a computation?

D. Turing computability X

. What can be computed at all?

E. complexity theoryX

. What can be computed efficiently?

F. more computability theory . Other models of computability

(20)

Quiz

kahoot.it

Referenzen

ÄHNLICHE DOKUMENTE

If you read a 1 at the first tape position, move every non-blank symbol on the tape one position to the right, write a 1 in the first tape position and accept...

I If you read a 1 at the first tape position, move every non-blank symbol on the tape one position to the right, write a 1 in the first tape position and accept...

We number the tape positions with natural numbers such that the TM head initially is on position 1. Observation: within p(n) computation steps the TM head can only reach positions

D3.2 Propositional Logic D3.3 Cook-Levin Theorem D3.4 3SAT..

Clique , IndSet , VertexCover three classical routing problems:. DirHamiltonCycle , HamiltonCycle

Does this graph have a vertex cover of size 4?.. VertexCover is

By using one or both of the padding numbers for each clause digit, all clause digits can be brought to their target value of 4, solving the SubsetSum instance.. For

An oracle machine is like a Turing machine that has access to an oracle which can solve some decision problem in constant timeA. Example