Handout - Institut für Theoretische Informatik - Technische ...
Handout - Institut für Theoretische Informatik - Technische ...
Handout - Institut für Theoretische Informatik - Technische ...
Erfolgreiche ePaper selbst erstellen
Machen Sie aus Ihren PDF Publikationen ein blätterbares Flipbook mit unserer einzigartigen Google optimierten e-Paper Software.
Kontextfreie Sprachen<br />
Normalformen und Anwendungen<br />
CYK(LL)-Algorithmus (explizite Version)<br />
Eingabe: kfG G = 〈V, X , S, 〉 in 2NF, U G , w = s 0 . . . s n−1 ∈ X +<br />
Ausgabe: Entscheidung, ob w ∈ L(G) .<br />
for i < n do V i,i := U ∗ G (s i)<br />
for 0 < j < n do<br />
for j > i > 0 do V ′ i,j := ∅ ;<br />
for i ≤ h < j do<br />
for all A yz<br />
if y ∈ V i,h and z ∈ V h+1,j then V ′ i,j := V′ i,j ∪ {A}<br />
V i,j := U ∗ G [V′ i,j ] = ⋃ y∈V ′ U ∗ i,j G<br />
(y) ′<br />
if S ∈ V 0,n−1<br />
then return “yes” else return “no”<br />
Satz<br />
Der Zeit- und Raumbedarf des obigen Algorithmus bewegt sich in der<br />
Größenordnung von |G| · |w| 3 bzw. |G| · |w| 2 .<br />
Jürgen Koslowski (TU-BS) <strong>Theoretische</strong> <strong>Informatik</strong> 1 WS 2010/2011 143 / 191