Ete Toc
Ete Toc
Important instructions:
1. Write your Name and Roll number on the first page of answer sheet and number all pages.
2. Scanned answer-sheet has to be mailed at [email protected]
3. If any data is missing, make suitable assumptions and state them clearly.
4. Each question is of 4 marks. Attempt any 10 questions.
5. Answer Sheet must be submitted within 10 minutes after the completion of ETE. If the student
fails to submit within 10 minutes, 10 Marks will directly be deduced from total marks obtains
by the student as a penalty.
6. Answer sheets must be submitted in single Pdf file having file name as: rollnumber name.pdf
1. Let A be the language consisting of all strings over {a,b} containing an ’a’ in the fourth position
from the end. Construct a minimized DFA that recognizes A.
2. Give state diagrams of NFAs with the specified number of states recognizing each of the
following languages. In all parts the alphabet is {0,1}.
(a) The language {w|w ends with 001 } with three states
(b) The language 1∗ (001+ )∗ with three states
3. Let B be any language over the alphabet . Prove that B = B + iff BB ⊆ B.
P
4. Use the pumping lemma to show that the following languages are not regular.
(a) Al= {0n 1n 2n |n ≥ 0}
n n
(b) A2 = {a2 |n ≥ 0} (Here, a2 ” means a string of 2n a’s.)
5. Let B and C be languages over Y= {0,1}. Define
B−→˜ C = {w ∈ B| for some y ∈ C, strings w and y contain equal numbers of 1s}. Show
that the class of regular languages is closed under the −→
˜ operation.
6. (a) Let C be a context-free language and R be a regular language. Prove that the language C
∩ R is context free.
(b) Use part (a) to show that the language
A = {w|w ∈ {a, b, c}∗ and contains equal numbers of a’s, b’s, and c’s} is not a CFL.
7. (a) If G={{S}, {a}, {S =⇒ SS}, S}. Find the language generated by G.
(b) If G={{S, C}, {a, b}, P, S} where P contains S −→ aCa, C −→ aCa|b. Find L(G).
8. Give regular expressions for the following languages:
(a) L1 : {an bm , n ≥ 4, m ≤ 3},
(b) Complement of L1.
9. Remove all unit-productions, all useless productions, and all λ productions from the grammar
S → aA|aBB,
A → aaA|λ,
B → bB|bbC,
C→B ,
What language does this grammar generate?
10. Design a truing machine for remainder(%) operation.
1
11. Construct a minimized DFA for the following transition diagram.