• Keine Ergebnisse gefunden

Grammatiken und Automaten f¨ur die Chomsky-Hierarchie

N/A
N/A
Protected

Academic year: 2021

Aktie "Grammatiken und Automaten f¨ur die Chomsky-Hierarchie"

Copied!
2
0
0

Wird geladen.... (Jetzt Volltext ansehen)

Volltext

(1)

Formale Sprachen und Komplexit¨ at

Sommersemester 2019

07 Formale Sprachen: ¨ Ubersichten

Prof. Dr. David Sabel

LFE Theoretische Informatik

Letzte ¨Anderung der Folien: 19. Juni 2019

Grammatiken und Automaten f¨ ur die Chomsky-Hierarchie

Sprache Grammatik Automat sonstiges

Typ 3 regul¨ are Grammatik endlicher Automat (DFA und NFA)

regul¨ arer Ausdruck deterministisch

kontextfrei

LR(k)-Grammatik Deterministischer Kel- lerautomat (DPDA) Typ 2 kontextfreie Gramma-

tik

Kellerautomat (PDA) (nichtdeterministisch) Typ 1 kontextsensitive

Grammatik

linear beschr¨ ankte Tu- ringmaschine (LBA) (nichtdeterministisch) Typ 0 Typ 0-Grammatik Turingmaschine (de- terministisch und nichtdeterministisch) Beachte: LR(k)-Grammatiken wurden nicht behandelt.

TCS | 07 Formale Sprachen: ¨Ubersichten) | SoSe 2019 2/7

Trennende Beispiele

Die Sprache {a

n

b

n

| n ∈ N } ist Typ 2 aber nicht vom Typ 3.

Die Sprache {w ∈ {a, b}

| w ist Palindrom} ist Typ 2 aber nicht deterministisch-kontextfrei.

Die Sprache {a

n

b

n

c

n

| n ∈ N } ist Typ 1 aber nicht vom Typ 2.

Die Sprache

H = {M #w | die durch M beschriebene

Turingmaschine h¨ alt bei Eingabe w}

ist Typ 0 aber nicht vom Typ 1.

(Die Sprache H ist das Halteproblem, welches wir sp¨ ater noch genauer betrachten und erl¨ autern).

Das Komplement von H ist nicht vom Typ 0.

TCS | 07 Formale Sprachen: ¨Ubersichten) | SoSe 2019 3/7

Deterministisch vs. nichtdeterministisch

Deterministischer Au- tomat

nichtdeterministischer Automat

¨

aquivalent?

DFA NFA ja

DPDA PDA nein

DLBA LBA unbekannt

DTM NTM ja

TCS | 07 Formale Sprachen: ¨Ubersichten) | SoSe 2019 4/7

(2)

Abschlusseigenschaften

Sprachklasse Schnitt Vereinigung Komplement Produkt Kleenescher Abschluss

Typ 3 X X X X X

det.kontextfrei × × X × ×

Typ 2 × X × X X

Typ 1 X X X X X

Typ 0 X X × X X

TCS | 07 Formale Sprachen: ¨Ubersichten) | SoSe 2019 5/7

Entscheidbarkeiten

Sprachklasse Wort- problem

Leerheits- problem

Aquivalenz- ¨ problem

Schnitt- problem

Typ 3 ja ja ja ja

det.kontextfrei ja ja ja nein

Typ 2 ja ja nein nein

Typ 1 ja nein nein nein

Typ 0 nein nein nein nein

TCS | 07 Formale Sprachen: ¨Ubersichten) | SoSe 2019 6/7

Komplexit¨ at des Wortproblems

Sprachklasse

Typ 3, DFA gegeben lineare Komplexit¨ at deterministisch kontextfrei lineare Komplexit¨ at Typ 2, Chomsky-Normalform gegeben O(n

3

)

Typ 1 exponentiell

Typ 0 unl¨ osbar

TCS | 07 Formale Sprachen: ¨Ubersichten) | SoSe 2019 7/7

Referenzen

ÄHNLICHE DOKUMENTE

Bitte werfen Sie Ihre Abgabe in den mit Automaten und formale Sprachen beschrifteten Briefkasten neben Raum lf , oder geben Sie sie online ab ¨ uber die moodle-Plattform. Wenn

Put your solutions in the letterbox labeled Automaten und formale Sprachen adja- cent to room lf , or hand them in through the online moodle -platform. If you hand in online,

1) Geben Sie f¨ ur jedes der W¨ orter a, c und abc jeweils ein weiteres Wort an, das zu dem jeweiligen Wort ¨ aquivalent ist. Geben Sie außerdem ein Wort an, dass zu keinem der..

Put your solutions in the letterbox labeled Automaten und formale Sprachen adjacent to room lf , or hand them in through the online moodle -platform. If you hand in online,

Bitte werfen Sie Ihre Abgabe in den mit Automaten und formale Sprachen beschrifteten Briefkasten neben Raum lf , oder geben Sie sie online ab ¨ uber die moodle-Plattform.. Wenn

Put your solutions in the letterbox labeled Automaten und formale Sprachen adjacent to room lf , or hand them in through the online moodle -platform. If you hand in online,

Put your solutions in the letterbox labeled Automaten und formale Sprachen adjacent to room lf , or hand them in through the online moodle -platform.. If you hand in online,

Put your solutions in the letterbox labeled Automaten und formale Sprachen adjacent to room lf , or hand them in through the online moodle -platform. If you hand in online,