UTS Teori Bahasa Dan Otomata 05TPLP002
UTS
GRAMMAR OTOMATA & FINITE STATE AUTOMATA
GRAMMAR
Grammar memiliki 4 tupel
G= V,T,P,S
(tupel)
V = A,B,C,D,E (
variabel state)
T =
a,b,c,d,e,f,g,h (terminal nilai)
S = A/q0
FSA
FSA memiliki 5 tupel
Q = {q0, q1, q2, q3, q4, q5} (state)
Σ = {a,b,c,d,e,f,g,h} (nilai input)
δ = Fungsi Transisi
δ
|
A
|
B
|
c
|
D
|
e
|
f
|
g
|
h
|
q0
|
Q0
|
Q1
|
-
|
-
|
Q3
|
-
|
-
|
-
|
q1
|
-
|
-
|
Q2
|
-
|
-
|
-
|
-
|
-
|
q2
|
-
|
-
|
-
|
Q2
|
-
|
Q3
|
-
|
-
|
q3
|
-
|
-
|
-
|
-
|
-
|
-
|
Q4
|
-
|
q4
|
-
|
-
|
-
|
-
|
-
|
-
|
-
|
Q5
|
q5
|
-
|
-
|
-
|
-
|
-
|
-
|
-
|
-
|
q0= q0(state awal)
F = q5 (final)
MENGUJI INPUT FSA
1. abcd = (Gagal)
2. aegh = (Berhasil)
3. bcdf = ( Gagal)
4. bcdd = (Gagal)
5. aabc = (Gagal)
Komentar
Posting Komentar