2081 8

CSC262 · 2081 · 5 marks

Represent the following regular grammar to finite automata. S→aA∣aB∣ΔS \rightarrow aA \mid aB \mid \varepsilonS→aA∣aB∣ΔA→aA∣aSA \rightarrow aA \mid aSA→aA∣aSB→bB∣ΔB \rightarrow bB \mid \varepsilonB→bB∣Δ

Represent the following regular grammar to finite automata. S→aA∣aB∣ΔS \rightarrow aA \mid aB \mid \varepsilonS→aA∣aB∣ΔA→aA∣aSA \rightarrow aA \mid aSA→aA∣aSB→bB∣ΔB \rightarrow bB \mid \varepsilonB→bB∣Δ[5]

Theory of ComputationChapter 4: Context Free GrammarEquivalence of regular grammar and finite automata

Production Rules ------ S → aA \ aB \ Δ A → aA \ aS B → bB \ Δ --- Each non-terminal in the grammar becomes a state in the FA. We also need a dead/final state for terminals. - States: S, A, B, F (where F is the final/accepting state) - S is the start state - Since S → Δ and B → Δ, both S and B ar...