mcsse 104 automata theory and computability

M.TECH. DEGREE EXAMINATION
Branch: Computer Science and Engineering
Specialization: Computer Science and Systems Engineering
Model Question Paper - I
First Semester
MCSSE 104 AUTOMATA THEORY AND COMPUTABILITY
(Regular – 2013 Admission Onwards)
Time: 3 hours
Maximum Marks: 100
1. (a) Give a DFA for the language L = {x ∈ {a, b}∗ | aba is a sub string in x}
(b) Using pumping lemma for regular languages prove that the language, L =
is not regular.
(5 marks)
{am bn
| m ≥ 0 and n > m}
(8 marks)
(c) Mention the applications of Myhill-Nerode Theorem. Consider the language
L = {x ∈ {a, b}∗ | number of a’s in x is odd and the number of b’s in x is even}
Give the equivalence classes of the canonical Myhill-Nerode relation and the corresponding DFA for
L.
(12 marks)
OR
2. (a) Let L1 and L2 be two regular languages. Prove that the language L = L1 ∩ L2 is also regular. (7 marks)
(b) Give a four state NFA M, for the language L = {x ∈ {a, b}∗ | the third last symbol in x is a b}. Use
subset construction to obtain a DFA M 0 from the NFA M.
(8 marks)
(c) Give the equivalence classes of the canonical Myhill-Nerode relation for the language in 2(b).
(10 marks)
3.
(a) Give a regular expression for the language L = {x ∈ {0, 1}∗ | there are no consecutive 0’s in x}.
(5 marks)
(b) Give a regular expression for the language defined by the MSO sentence below over the alphabet {a, b}.
∃X(
(∃x(zero(x) ∧ x ∈ X))∧
(∃x(last(x) ∧ ¬x ∈ X))∧
(∀x∀y(succ(x, y) =⇒ (x ∈ X ⇐⇒ ¬y ∈ X)))∧
(∀x(zero(x) =⇒ Qa (x))∧
(∀x(last(x) =⇒ Qb (x))) )
(10 marks)
(c) Give an MSO sentence for the language L over the alphabet {a, b} satisfying the following property.
(10 marks)
x ∈ L ⇐⇒ Any pair of adjacent b’s in x is separated by odd number of a’s.
OR
4. (a) Give a regular expression for the language L = {x ∈ {0, 1}∗ | 010 is a sub string in x}.
(5 marks)
(b) Give a regular expression for the language defined by the MSO sentence below over the alphabet {a, b}.
∃X(
(∃x(zero(x) ∧ x ∈ X))∧
(∃x(last(x) ∧ ¬x ∈ X))∧
(∀x∀y(succ(x, y) =⇒ (x ∈ X ⇐⇒ ¬y ∈ X)))∧
(∀x(x ∈ X =⇒ Qa (x)) )
(10 marks)
(c) Give an MSO sentence for the language L over the alphabet {a, b} such that the maximum number of
consecutive occurrences of the symbol b is 3.
(10 marks)
5. (a) Give a context free grammar G for generating the language L pal of all palindrome words over the
alphabet {a, b}. Using mathematical induction prove that L pal = L(G).
(10 marks)
(b) Using pumping lemma for context free languages prove that the language L = {an bn | n ≥ 0} is not
context free.
(7 marks)
(c) Give a push down automata for the language of strings with equal number of a’s and b’s over the
alphabet {a, b}.
(8 marks)
2
OR
6. (a) Give a context free grammar G for generating the language Leq of strings with equal number of a’s
and b’s over the alphabet {a, b}. Using mathematical induction prove that Leq = L(G).
(10 marks)
(b) Give a context free grammar for generating the language L = {am bn cm+n | m ≥ 0, n ≥ 0} over the
alphabet {a, b, c}. Convert this grammar to Chomsky Normal form.
(10 marks)
(c) Consider the following context free grammar.
S ­→ AAA/B
A ­→ aA/B
B ­→
Give the set of basic pumps and the ≤-minimal parse trees with respect to the Parikh’s theorem.
(5 marks)
7. (a) Give a total turing machine for finding the largest of two natural numbers m and n. (assume that the initial configuration of the required machine is (s, `1m 01n [ω , 0) and the final configuration is (t, `1lmn [ω , k)
(7 marks)
where lmn = max(m, n) and k ∈ N)
(b) State and prove Rice’s Theorem-part-I (on recursive languages).
(8 marks)
(c) Consider the languages H P and F I N defined below. Without using Rice’s theorems prove that F I N
is not recursively enumerable. (you can use the results that H P is not recursive and ¬H P is not
recursively enumerable)
(10 marks)
H P := {M#x | M halts on x}
F I N := {M | L(M) is finite }
OR
8. (a) Give a total turing machine for accepting the language of palindrome words over the alphabet {a, b}. (5
marks)
(b) State and prove Rice’s Theorem-part-II (on recursive enumerable languages).
(10 marks)
(c) Consider a turing machine M. Prove that the decision problem P given below is undecidable. (you
(10 marks)
can use the result that H P is not decidable)
P ⇐⇒ M accepts the null string
H P := {M#x | M halts on x}