667 views

2 Answers

Best answer
2 votes
2 votes
For example we have a regular grammar

S$\rightarrow$aA
A$\rightarrow$a

we can write above grammar as

S$\rightarrow$aA
A$\rightarrow$aF

F$\rightarrow \epsilon$

Now corresponding FA M = ({S,A,F},{a},$\delta$,S,{F})

where $\delta$ are as

S x a $\rightarrow$ A

A x a $\rightarrow$ F

Above may be NFA or DFA or $\epsilon$ -NFA , convert as per required
selected by
1 votes
1 votes
Regular Grammar to Deterministic Finite Automata

steps

1.make epsilon NFA

2,convert in NFA

3. add one dead state if require

4. u got finite automata i.e.DFA

Related questions