Beruflich Dokumente
Kultur Dokumente
SPRACHEN
UND
COMPILER
– MODUL 2
ERGÄNZUNG
Dominik Johannes KNOLL
dominik.johannes.knoll@scs.ubbcluj.ro
djknoll.github.io
2020, v2
ENDLICHER AUTOMAT (EA) – FINITE AUTOMATON (FA)
2
https://commons.wikimedia.org/wiki/File:Moore-Automat-de.svg
FINITE AUTOMATON – PSEUDO CODE
1. Q∩Σ=∅
2. δ:Q×Σ→P(Q) , ε∈Σ0 - relation δ(q,ε)=p NOT allowed
3. If |δ(q,a)|≤1 => deterministic finite automaton (DFA)
4. If |δ(q,a)|>1 (more than one state obtained as result) =>
nondeterministic finite automaton (NFA)
5
NICHT-DETERMINISTISCHER ENDLICHER AUTOMAT (NEA)
https://studyflix.de/informatik/nichtdeterministischer-automat-1213
NEA – BEISPIEL
https://commons.wikimedia.org/wiki/File:Nichtdeterministischer_endlicher_Automat_2.svg
VERBINDEN VON AUTOMATEN
Thompson-Konstruktion
¡ Konkatenation
¡ Alternative
¡ Wiederholung
¡ Verwendung von ε-Übergängen
8
ALGORITHMUS
VON EINEM NEA ZU EINEM DEA
10
https://www.geeksforgeeks.org/conversion-from-nfa-to-dfa/
BEISPIEL 2 – TEILMENGEN-KONSTRUKTION
11
https://www.geeksforgeeks.org/conversion-from-nfa-to-dfa/