Documente Academic
Documente Profesional
Documente Cultură
RAPORT
La lucrarea de laborator Nr. 1.
La disciplina: LimbajeFormale i Automate
TEMA: Gramatici regulate
Elaborat: st.gr.TI-
Chiinu 2017
De construit o gramatic care const din :
= 5
= 3
Mulimea de producie .
P = 20
= { }
= { }
R simbol initial
Mulimea de Producie
= { )
) }
1. R 6. T 11. P 16. Y
2. R 7. T 12. P 17. L
3. R = 8. T 13. Y 18.L
4. R 9. P 14. Y 19.L
1 8 19 13 9 3 10
R
Pentru fiecare cuvnt de construit arborele de derivare
h h m h h m n
Pentru gramatica dat de construit automatul finit, unde:
( ) = ( ) = ( ) = ( ) =
( ) = ( ) = ( ) = ( ) =
( ) = ( ) = ( ) = ( ) =
( ) = ( ) = ( ) = ( ) =
( ) = ( ) = ( ) = ( ) =
h n m
R XT Y P
T YL T P
Y PL R X
P RL X Y
L R TP m
X - - -
2 14 17 3 11 13 10
2)R
n h h m m h n
3 9 1 8 18 8 20
3) R
m h h h n h n
2 13 12 19 15 3 10
4) R
n h h m n m n
3 9 1 5 7 9 4
5)R
m h h n m h h
Tipul de gramatic 0 : (gramatic fr restricii)
Cuvntul 2 nhhmmhn
Cuvntul 3 - mhhhnhn
Cuvntul 4 nhhmnm
Cuvntul 5 mhhnmhh