Question 5. Let Σ = {a, b}, and consider the language
L = {a n : n is even} ∪ {b n : n is odd}.
Draw a graph representing a DFA (not NFA) that accepts this language.
Question 6. Give a brief description of the language generated by the following production rules.
S → abc
S → aXbc
Xb → bX
Xc → Ybcc
bY → Yb
aY → aa
aY → aaX
Ans 5 :
L = {a n : n is even} ∪ {b n : n is odd}.
In the language given above we can see that it will contain either all a's as even of all b's as odd.
So, starting from the initial state q0 we can either to the way in which even number of a's are found or where the odd number of b's are found. The DFA for such a language is given below.
Question 5. Let Σ = {a, b}, and consider the language L = {a^n : n is even} ∪ {b^n : n is odd}. Draw a graph representing a DFA (not NFA) that accepts this language.
Question 6. Give a brief description of the language generated by the following production rules. S → abc S → aXbc Xb → bX Xc → Y bcc bY → Y b aY → aa aY → aaX
Give a brief description of the language generated by the following production rules. S → abc S → aXbc Xb → bX Xc → Y bcc aY → aa aY → aaX bY → Y b aY → aa aY → aaX
Let Σ = { a, b } , and consider the language L = { a n : n is even } ∪ { b n : n is odd } . Draw a graph representing a DFA (not NFA) that accepts this language.
Question 5. Let S = {a,b}, and consider the language L = {a" : n is even} U{b" : n is odd}. Draw a graph representing a DFA (not NFA) that accepts this language.
Question 1. Let Σ = {a, b}, and consider the language L = {w ∈ Σ ∗ : w contains at least one b and an even number of a’s}. Draw a graph representing a DFA (not NFA) that accepts this language. Question 2. Let L be the language given below. L = {a n b 2n : n ≥ 0} = {λ, abb, aabbbb, aaabbbbbb, . . .} Find production rules for a grammar that generates L.
Question 1. Let Σ = {a, b}, and consider the language L = {w ∈ Σ ∗ : w contains at least one b and an even number of a’s}. Draw a graph representing a DFA (not NFA) that accepts this language.
. Let Σ = { a, b } , and consider the language L = { w ∈ Σ ∗ : w contains at least one b and an even number of a’s } . Draw a graph representing a DFA (not NFA) that accepts this language.
Question 1. Let S = {a,b}, and consider the language L = {w E E* : w contains at least one b and an even number of a's}. Draw a graph representing a DFA (not NFA) that accepts this language. Question 2. Let L be the language given below. L = {a”62m : n > 0} = {1, abb, aabbbb, aaabbbbbb, ...} Find production rules for a grammar that generates L.
Question 1 Let Σ = {a,b,c}. What is the language L accepted by the dfa below? Question 1 a, b, c}. What is the language L accepted by the dfa below? Let = 94 a,c а.с b а,b 91 а,с Яз a,b,c