• Keine Ergebnisse gefunden

NL NL

N/A
N/A
Protected

Academic year: 2022

Aktie "NL NL"

Copied!
7
0
0

Wird geladen.... (Jetzt Volltext ansehen)

Volltext

(1)

Complexity Theory

Theorem: dirPath is NL NL -complete

Let A

NL NL

, decided by c·log n space-bounded NTM M Input: w; output: dir.Graph G and vertices s,t such that:

M accepts wthere is a path in G from s to t G=(V,E), V:=all configurations of M of size c·log |w|

(K1,K2)∈E :K2 is a successor config of K1

s:=start config of M on w; t:=accept.config (wlog unique)

• M accepts wthere is a path in G from s to t √

• How large is G? Constructible in logarithmic space?

qed

(2)

Complexity Theory

Immerman-Szelepcsényi

L = NL ? =

L = NL ? = coNL coNL ? ? = P ? = P ?

Compare „

P P

vs.

NP NP

L L

vs.

NL NL

:

NL NL

-complete dirGraph, 2unSAT, nonBipartite

NL NL

vs.

P P

:

P P

-complete problems

(probably do not admit an efficient parallelization)

NL NL

vs.

coNL coNL

: solved in 1987, ACM Gödel Prize 1995 !

Theorem (Neil Immerman,

Róbert Szelepcsényi):

NL NL

=

coNL coNL

Proof: Show

dirGraph

coNL coNL

Theorem: For constructible s(n),

NSPACE

NSPACE(

s(n)

)

=

coNSPACE( coNSPACE

s(n)

)

.

(3)

Complexity Theory

Given G=(V,E), s,tV={1,…,m}. Goal:

Logspace NTM accepts iff t not reachable from s.

Ai := { vV : exists path in G of lengthi from s to v }, ci := #Ai , i=0,…,m-1. A0={s}, c0=1. Accept iff tAm-1 Def: NTM computes (partial multivalued) f:⊆Σ*

Σ* iff

• ∀ inputs xdom(f) there is an accepting computation.

• Every accepting computation outputs some yf(x).

FNL FNL

is closed under composition! (proof?) Lemma: For each i, Ai

NL NL

.

Given (!) ci, logspace NTM can even enumerate Ai:

• For each vV, ‘guess‘ whether vAi (1) or not (0)

• If guessed 1: output, verify (

NL NL

) and increase counter

• In the end, accept iff counter=c !!!

dirGraph coNL coNL

(4)

Complexity Theory

Given G=(V,E), s,tV={1,…,m}. Goal:

Logspace NTM accepts iff t not reachable from s.

Ai := { vV : exists path in G of lengthi from s to v }, ci := #Ai , i=0,…,m-1. A0={s}, c0=1. Accept iff tAm-1

Lemma: For each i, Ai

NL NL

.

Given (!) ci, logspace NTM can even enumerate Ai. Lemma: Given (!) ci, Ai+1

coNL coNL

:

Enumerate Ai and, if no edge to v found, accept.

Lemma: Given ci, logspace NTM can compute ci+1:

For each v, ‘guess‘ whether vAi+1 holds, and verify Proof (Theorem): 1=c0c1c2 c3 → … → cm-1

dirGraph coNL coNL

(5)

Complexity Theory

NL NL and Parallel Computation

Every problem in NL NL can be solved in parallel time O(log²n) by polynomially many processors!

• dirPath ≼

L

Boolean Matrix powering:

– G=(V,E) adjacency matrix A ∈ {0,1}

V×V

of G:

– A

u,v

>0 : ⇔ v reachable from u in ≤ 1 step

– (A

k

)

u,v

>0 ⇔ v reachable from uV in k steps

• goal: (A

k

)

s,t

for some k|V|=:n.

– rept.squaring: AA

2

A

4

A

8

…: O(log n)

– each phase = matrix multipl.; n

2

dot products

– each dot product in parallel time O(log n)

(6)

Complexity Theory

More Parallel Algorithms

Prefix Sum: Given (x

1

,…,x

n

), calculate all sums

x

1

, x

1

+x

2

, x

1

+x

2

+x

3

, …, x

1

+x

2

+…+x

n-1

, x

1

+x

2

+…+x

n-1

+x

n

in logarithmic parallel time?

lo g n

… …

for any associative operation ⊕

using O(n·log n) gates

(7)

Complexity Theory

'generate', 'propagate'

Carry Look-Ahead Adder

Prefix Sum: Given (x

1

,…,x

n

), calculate all sums

x

1

, x

1

+x

2

, x

1

+x

2

+x

3

, …, x

1

+x

2

+…+x

n-1

, x

1

+x

2

+…+x

n-1

+x

n

in parallel time O(log O(log n n ) )

for any associative operation ⊕

Long Addition: Given (a

0

,…,a

n-1

) and (b

0

,…,b

n-1

), calculate (c

0

,…,c

n-1

,c

n

) := (a

0

,…,a

n-1

) + (b

0

,…,b

n-1

) in logarithmic parallel time? ripple-carry adder i-th carry z

i

= g

i

(p

i

z

i-1

)

where g

i

:= a

i

b

i

and p

i

:= a

i

b

i

(g,p)(g',p') := ( g'(p'g), p'p ) associative!

(z

i

,0) = (z

i-1

,0) ⊗ (g

i

, p

i

)

=( (z

i-2

,0) ⊗ (g

i-1

, p

i-1

) ) (g

i

, p

i

)

Referenzen

ÄHNLICHE DOKUMENTE

Zu beziehen nur gegen Voreinsendung des Betrages bei Robert Seeger jun., Graz, Albrechtgasse 9, sowie durch sämmtliche

 FR  Sécher avec un linge propre et doux  DE  Trocknen Sie mit einem sauberen, frischen Tuch  IT  Asciugare con un panno asciutto e pulito  ES  Seca con un paño

Návod k použitί Lite Mode Brugsanvisning Lite Mode Кαθоδήγηση Lite Mode Kezelési útmutató Lite Mode Istruzioni d’uso Lite Mode Gebruiksaanwijzing Lite Mode

Návod k použitί Lite Mode Brugsanvisning Lite Mode Кαθоδήγηση Lite Mode Kezelési útmutató Lite Mode Istruzioni d’uso Lite Mode Gebruiksaanwijzing Lite Mode

Voor het programmeren van het slot (openen van het menu) druk op de knop ‘Function’ als het symbool ‘M’ in het display verschijnt.. Met de toets ‘1’ scroll up (symbool in

Institut für Informatik Ludwig-Maximilians-Universität München Prof..

verbringen mit Dir einen Abend pro Woche, an dem Ihr Euch (=Du und Deine StudienkollegInnen und die TutorInnen) ~ennenlemt, gemeinsam die (Trink- )Kultur von Graz und

Eidgenössisches Departement für Umwelt, Verkehr, Energie und Kommunikation UVEK.