Automata Ch2
Automata Ch2
Chapter two
Regular Expression and Regular languages
{ ε , a ,aou, aiou, b,
abcd…..} where ε
any no. of vowels v*.c* ( where v – represent empty string
followed by any no. of vowels and c – (in case 0 vowels and
consonants consonants) o consonants )
• Grammar G1 −
• ({S, A, B}, {a, b}, S, {S → AB, A → a, B → b})
• Here,
• S, A, and B are Non-terminal symbols;
• a and b are Terminal symbols
• S is the Start symbol, S ∈ N
• Productions, P : S → AB, A → a, B → b
Suppose that I have an NFAε (Q, Σ, δ, q0, F,). I construct a right regular grammar
(Q, Σ, R, q0).
• For each transition δ(qi ,a) = qj, I construct the rule qi → aqj in R.
• Furthermore, for every state qi in F I add the rule qi → ε in R.
Solution:
Solution:
Q0 → aQ1 | bQ0
Q1 → aQ1 |bQ0 | ε
Let L be a regular language. Then there exists a constant ‘c’ such that
for every string w in L −
|w| ≥ c
• We can break w into three strings, w = xyz, such that −
|y| > 0
|xy| ≤ c
For all k ≥ 0, the string xykz is also in L.