Documente Academic
Documente Profesional
Documente Cultură
2. Prove the theorem “if L is accepted by an NFA with ε - transitions then L is accepted by an
NFA with out ε - transitions”.
3. Find a string of minimal length in Σ = {a,b} that is not in the language corresponding to the
given regular expression.
(a) 1 ∗ (01) ∗ 0 ∗ .
(b) (0 ∗ +1∗)(0 ∗ +1∗)(0 ∗ +1∗).
5. (a) Find out a context free grammar for the language of strings over the alphabet {0, 1} such
that the number of 0’s are more than the number of 1’s in the strings.
(b) Show that the following grammar is ambiguous.
E → E+E / E*E / a
Eliminate the ambiguity from the above grammar using precedence of + is higher than
the precedence of * in evaluating the expressions.
6. (a) Define a PDA. Design a PDA for L = { xcxr / x ∈ {a,b} * }. Process the string “abba-
cabba”.
Note: xr stands for reverse of the string x.
(b) What do you mean by an instantaneous description of a PDA. Explain with example.
7. Define a Turing Machine(TM) and the language accepted by a TM. Design a TM for rec-
ognizing the language (a+b)*aba(a+b)*. Draw it’s transition diagram and table. Using the
Instantaneous Description notation. process the string “aabaabaaab”.
8. (a) What is PCP? Find the solution to the following instance of PCP.
w = (1, 10111, 10) and x = (111, 10, 0)
(b) Discuss in detail about LBA model with one example.
?????
Code No: R7310501 2
III B.Tech I Semester(R07) Regular & Supplementary Examinations, November 2010
FORMAL LANGUAGES AND AUTOMATA THEORY
(Computer Science & Engineering)
Time: 3 hours Max Marks: 80
Answer any FIVE questions
All questions carry equal marks
?????
3. Show that the language L = {x²{0, 1}∗ : x has equal number of 01 and 01 as substrings} is
regular.
5. (a) Show that the following grammar is ambiguous and also eliminate the ambiguity using
the if else rules in C language.
S → if (c) S / if (c) S else S / S
(b) What are unit productions? Write the disadvantages of unit productions? Write the
procedure for eliminating unit productions from a given CFG. Eliminate unit productions
from the following grammar.
E → E+T / T T → T*F / F F → (E) / id
6. (a) Design a PDA for L = {xxr / x ∈ {a,b} * }. Process the string abbaabba. Is you PDA
deterministic or non deterministic? Justify your answer.
Note: xr stands for reverse of the string x.
(b) Explain the differences between a PDA and FA.
7. Design a TM for recognizing L = { xx / x ∈ {a, b}* }. Show the moves of the TM for the
strings abaaba and abaabb.
8. (a) What is Modified PCP? Does the following instance of MPCP has solution? If so, give
the answer
w = (1, 10111, 10) and x = (111, 10, 0)
(b) Explain about halting problem of Turing Machine.
?????
Code No: R7310501 3
III B.Tech I Semester(R07) Regular & Supplementary Examinations, November 2010
FORMAL LANGUAGES AND AUTOMATA THEORY
(Computer Science & Engineering)
Time: 3 hours Max Marks: 80
Answer any FIVE questions
All questions carry equal marks
?????
1. (a) Describe the following languages over the input set A={a,b}
i. L1 = {a, ab, abb, aba}
ii. L2 = {an bn | n >= 1}
iii. L3 = {an bn | n > 0}
P
(b) What is the Kleen closure? Let = {a,b} obtain
Σ∗ = Σ0 ∪ Σ1 ∪ Σ2 ∪ Σ3.........
2. Find the Minimal DFA for the language L={an bm , n > 2, m > 1}.
3. Discuss and prove that the closure properties of regular sets are closed.
5. (a) What are useless variable in a CFG? How do you find out useless variable in a given CFG?
Explain with an example.
(b) Eliminate ambiguity from the following grammar.
E → E+E / E*E / (E) / id
6. (a) When do we say that a PDA is non deterministic? Design a PDA for recognizing the
language of palindromes over the input alphabet {a, b}.
(b) Distinguish between a DPDA and NPDA.
7. (a) Design a TM for recognizing the language of palindromes over the input alphabet {a, b}.
Show the moves of TM for the string abbbba.
(b) What is Instantaneous Description of a TM? Briefly explain.
?????
Code No: R7310501 4
III B.Tech I Semester(R07) Regular & Supplementary Examinations, November 2010
FORMAL LANGUAGES AND AUTOMATA THEORY
(Computer Science & Engineering)
Time: 3 hours Max Marks: 80
Answer any FIVE questions
All questions carry equal marks
?????
1. (a) What is the finite state machine? Define finite Automata and discuss the representation
of finite automata.
(b) Discuss the applications of finite automata.
2. Prove the theorem “Let L be a set accepted by non-deterministic finite automata, then there
exists a DFA that accepts L”.
3. Give a DFA for accepting L = {an bm | abs (n − m) mod 3 ≤ 1} and show that L is non regular.
4. (a) What is
i. CFL.
ii. Sentential form? Give example for each.
(b) What is the language generated by the grammar G=(v,t,p,s) where
P = {S → aSb, S → ab} ?
(c) What is
i. Derivation
ii. Derivation/Parse tree.
iii. Sub tree. Give example for each.
5. Write a procedure for eliminating. ∈ - productions from a given CFG. Eliminate ∈ - productions
from the following grammar.
S → ABCBCD A → CD B → Cb C → a / ∈ D → bD / ∈
6. When do you say that a language L is recognized or accepted by a PDA? Design PDA for L
= { ai bj ck / j ≥ i+k and i,j,k > 0}. Process the string aaabbbbbbccc using instantaneous
description.
8. (a) What is an LR(0) grammar? Show that the grammar with following productions is LR(0)
grammar.
S → aA A → Abb / b
(b) Find solution to following PCP instance, if exists?
w = (01, 001, 10) and x = (011, 10, 00)
?????