• Keine Ergebnisse gefunden

NP NP coNP coNP P = P =

N/A
N/A
Protected

Academic year: 2022

Aktie "NP NP coNP coNP P = P ="

Copied!
10
0
0

Wird geladen.... (Jetzt Volltext ansehen)

Volltext

(1)

Complexity Theory

Das Wesen der Wissenschaft

Bertrand Russel (1872-1970):

„Darin besteht das Wesen der Wissenschaft:

Zuerst denkt man an etwas, das wahr sein könnte.

Dann sieht man nach, ob es der Fall ist und im allgemeinen ist es nicht der Fall.“

Erweiterung:

Oft kann man es nicht beweisen noch widerlegen.

Damit muß man umgehen (lernen)!

(2)

Complexity Theory

Szenarien für P NP

coNPcoNP := { L : das Komplement von L liegt in NPNP } unSAT

unSAT ={Bool‘Formel φ(x1,…,xn) falsch x} coNPccoNPc

NP NP coNP coNP P = P =

NP = NP = coNP coNP

P = P =

NP c

NP c co NP c co NP c

NP NP coNP coNP

Theorem (Ladner 1975): Falls P≠P NP, so gibt esNP

LNP \ ( NP P PNPc) NPc

NP NP

coNP coNP

(3)

Complexity Theory

2.8 Der Satz von Savitch

Zeit: P NP P = NP ? $1 Mio Platz: PSPACE NPSPACE

Walter Savitch (1970): PSPACE = NPSPACE Genauer gilt:

NSPACE(s(n))DSPACE(s(n)2) sofern s(n) konstruierbarkonstruierbar ist.

Def: …d.h. wenn eine DTM bei

Eingabe „1n“ Ausgabe „1s(n)“ produ- zieren kann in Zeit O

(

s(n)

)

.

Beispiele: Polynome, Übung…

(4)

Complexity Theory

Akzeptanz als Erreichbarkeit

Sei M (nicht-/deterministische) TM,

s(n)-platzbeschränkt und t(n)-zeitbeschränkt.

Erinnerung: L(M)

p QBF:

succ(U,U'') := «U'' ist Nachfolgekonfig. von U, die nach höchstens 2 Rechenschritten erreicht werden kann»

⇔ ∃U': succℓ-1(U,U') succℓ-1(U',U'')

(U' V,W: ((V=U W=U') (V=U' W=U'')) succℓ-1(V,W))

Dann rekursiv weiter…

(5)

Complexity Theory

Algorithmus „ erreichbar

erreichbar (U,U'',ℓ)

// Ist U'' von U aus

// in ≤2

Schritten erreichbar?

Falls ℓ=0, return ( U=U''U ¢ U'' )

Falls ℓ≥1, teste für alle U' rekursiv:

erreichbar (U,U' ,ℓ-1) und

erreichbar (U',U'',ℓ-1)

Falls beides ja, return(true) return(false)

Platzbedarf: f(ℓ) ≤ O(S) + f(ℓ-1) ≤ O(S· ℓ)

(6)

Complexity Theory

NSPACE(

s(n)

) ⊆ DSPACE(

s(n)2

)

NTM N sei s(n)-platzbeschränkt;

DTM M simuliert N auf Eingabe w:

Berechne S:=s(|w|)

und markiere so viel Platz auf dem Band.

[Nach Vor. „platzkonstruierbar“ geht das!]

Berechne ℓ:=log ( T(|w|) ) ≤ c·S

und U:=Startkonfig von N (S Zellen),

U'':=Endkonfig von N (o.B.d.A. eindeutig)

(7)

Complexity Theory

3.2 Classes LL, NLNL, and LL-reductions

P P NP NP PSPACE=NPSPACE PSPACE=NPSPACE EXPEXP

LL := { problems decidable using O(log n) tape cells } but already the input uses n=|x| tape symbols.

Def: DTM/NTM with separate read-only input tape, count

only working/output tape usage

L L

,

NL NL

Exercise:

NL NL

P P

LLNL NL

Example: { 0m1m : m }

•check the form 0*1*

•count #0s

•and #1s;

•compare these numbers:

only O(log m) tape cells in addition to the input!

(8)

Complexity Theory

Space-Bounded Computation

• Input tape: read-only, for free

• working tape: read/write, incurs cost

• output tape: write-only, one-way, for free

streaming computation Def: A

L

B iff there is some log-space

computable f:Σ*→Σ* s.t. xAf(x)B .

Call A

NL NL

-hard if every B

NL NL

satisfies B

L A,

NL NL

-complete if in addition A

NL NL

holds.

(9)

Complexity Theory

Example Problem in NL NL

• directed s-t-connectivity dirPATH :=

{ 〈 G,s,t: G=(V,E) directed graph, s,tV with a path from s to t }

Algorithm directedReachable(V,E,s,t,ℓ):

– while ℓ>0 and s≠t do

• follow some edge (s,u)E leaving from s

• let s:=u, ℓ:=ℓ-1

– if s=t return(true), else return(false).

• ℓ:=|V|-1, s, u each use O(log |V|) bits.

(10)

Complexity Theory

Reductions

• polynomial-time many-one:

A

pm

B

f:Σ*→Σ*

P P

-computable s.t.: xA f(x)B – in general

B

pm

Σ

\B

(example?)

• log-spacebounded many-one:

A

Lm

B

f:Σ*→Σ*

L L

-computable s.t.: xA f(x)B

– A

Lm

B A

pm

B

(proof?)

• polynomial-time Turing Reduction:

A

pT

B

A can be solved in polynomial time

by aid of oracle queries to B: A

P P

B

A

m

B A

T

BA

T

Σ

\B

(proof?)

Referenzen

ÄHNLICHE DOKUMENTE

When all specified self-diagnostics terminate normally, the HDD posts the GOOD status for the SEND DIAGNOSTIC command. When an error is detected in the self-diagnostics, the

Gibt es nun für die Lösung eines Problems keinen effizienten Algorithmus, dann kommen die orithmus, dann kommen die Näherungsverfahren in‘s Spiel.. Näherungsverfahren

Es gibt aber auch NP-Probleme, die nicht als CSPs darstellbar sind 3F, k -F¨arbbarkeit f¨ur jedes feste k > 2, 3SAT,. IPROG ¨uber jedem festen Bereich

UBUNGEN ZUR VARIATIONSRECHNUNG IM SS 2011 ¨ BLATT 2 (BESPRECHUNG AM 17.. Hin- weis: Verwenden Sie die

Gesucht ist eine bijektive Abbildung zwischen den ungekürzten Brüchen und den natür- lichen Zahlen..

•  set of those Decision problems, for that an algorithm exists, which solves the problem and which consumes no more than polynomial runtime.. The class P:

•  Jede Kante repräsentiert eine Belegung von Variable auf ebene i des Baumes. •  repräsentiert den Wert von Variable

Jeweils berechenbar aus w in polynom. Zeit