12.07.2015 Aufrufe

Abschlusseigenschaften kontextfreier Sprachen

Abschlusseigenschaften kontextfreier Sprachen

Abschlusseigenschaften kontextfreier Sprachen

MEHR ANZEIGEN
WENIGER ANZEIGEN

Sie wollen auch ein ePaper? Erhöhen Sie die Reichweite Ihrer Titel.

YUMPU macht aus Druck-PDFs automatisch weboptimierte ePaper, die Google liebt.

Formale Systeme, Automaten, Prozesse3 Kontextfreie <strong>Sprachen</strong>3.11 <strong>Abschlusseigenschaften</strong> <strong>kontextfreier</strong> <strong>Sprachen</strong>Übersicht3 3 Kontextfreie <strong>Sprachen</strong>3.1 Kontextfreie <strong>Sprachen</strong> und Grammatiken3.2 Ableitungsbäume3.3 Die pre ∗ -Operation3.4 Entscheidungsprobleme für CFGs3.5 Normalformen für CFGs3.6 Chomsky-Normalform3.7 Greibach-Normalform3.8 Das Pumping-Lemma für CFLs3.9 Kellerautomaten3.10 Deterministische Kellerautomaten3.11 <strong>Abschlusseigenschaften</strong> <strong>kontextfreier</strong> <strong>Sprachen</strong>


Formale Systeme, Automaten, Prozesse Folie 2003 Kontextfreie <strong>Sprachen</strong>3.11 <strong>Abschlusseigenschaften</strong> <strong>kontextfreier</strong> <strong>Sprachen</strong>Satz 3.11.1Es seien L und L ′ kontextfreie und R eine reguläre Sprache.Dann sind L ∩ R, L \ R, L ∪ L ′ , L L ′ und L ∗ wieder kontextfreie<strong>Sprachen</strong>.Beweis.Schnitt und Differenz: Produktautomat.Vereinigung: G 1 = (N, T , P 1 , S 1 ) und G 2 = (N, T , P 2 , S 2 ).G = (N, T , P 1 ∪ P 2 ∪ {S → S 1 | S 2 }, S), L(G) = L(G 1 ) ∪ L(G 2 ).Konkatenation: G 1 = (N, T , P 1 , S 1 ) und G 2 = (N, T , P 2 , S 2 ).G = (N, T , P 1 ∪ P 2 ∪ {S → S 1 S 2 }, S), L(G) = L(G 1 )L(G 2 ).Kleene’sche Hülle: G 1 = (N, T , P 1 , S 1 ).G = (N, T , P 1 ∪ {S → ɛ | SS | S 1 }, S), L(G) = L(G 1 ) ∗ .


Formale Systeme, Automaten, Prozesse Folie 2013 Kontextfreie <strong>Sprachen</strong>3.11 <strong>Abschlusseigenschaften</strong> <strong>kontextfreier</strong> <strong>Sprachen</strong>Satz 3.11.2CFL ist nicht unter Schnitt abgeschlossen und damit auch nichtunter Komplement.Beweis.L 1 = { a i b j c j | i, j ≥ 1 }L 2 = { a i b i c j | i, j ≥ 1 }L 1 und L 2 sind (deterministisch) kontextfrei.L 1 ∩ L 2 = { a i b i c i | i ≥ 1 } ist bekanntlich nicht kontextfrei(Pumping-Lemma).Wären kontextfreie <strong>Sprachen</strong> unter Komplement abgeschlossen:L 1 und L 2 kontextfreiL 1 ∪ L 2 kontextfreiL 1 ∪ L 2 = L 1 ∩ L 2 kontextfrei. Widerspruch!


Formale Systeme, Automaten, Prozesse Folie 2023 Kontextfreie <strong>Sprachen</strong>3.11 <strong>Abschlusseigenschaften</strong> <strong>kontextfreier</strong> <strong>Sprachen</strong>Satz 3.11.3DCFL ist nicht unter Schnitt und daher auch nicht unterVereinigung abgeschlossen.Beweis.L 1 = { a i b j c j | i, j ≥ 1 }L 2 = { a i b i c j | i, j ≥ 1 }L 1 und L 2 sind deterministisch kontextfrei.L 1 ∩ L 2 = { a i b i c i | i ≥ 1 } ist bekanntlich nicht kontextfrei(Pumping-Lemma).Wären det. kontextfreie <strong>Sprachen</strong> unter Vereinigung abgeschlossen:L 1 und L 2 deterministisch kontextfreiL 1 ∪ L 2 deterministisch kontextfreiL 1 ∪ L 2 = L 1 ∩ L 2 deterministisch kontextfrei. Widerspruch!

Hurra! Ihre Datei wurde hochgeladen und ist bereit für die Veröffentlichung.

Erfolgreich gespeichert!

Leider ist etwas schief gelaufen!