Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more ➡
Standard view
Full view
of .
×
0 of .
Results for:
P. 1
r7310501-Formal Languages and Automata Theory

# r7310501-Formal Languages and Automata Theory

Ratings: (0)|Views: 612|Likes:

### Availability:

See More
See less

11/19/2010

pdf

text

original

Code No: R7310501
1
III B.Tech I Semester(R07) Regular & Supplementary Examinations, November 2010FORMAL LANGUAGES AND AUTOMATA THEORY
(Computer Science & Engineering)
Time: 3 hours Max Marks: 80Answer any FIVE questionsAll questions carry equal marks
    
1. (a) Deﬁne string and alphabet. Discuss the operations on string.(b) Deﬁne language? Discuss its operations.2. Prove the theorem “if L is accepted by an NFA with
ε
- transitions then L is accepted by anNFA with out
ε
- transitions”.3. Find a string of minimal length in Σ =
{
a,b
}
that is not in the language corresponding to thegiven regular expression.(a) 1
(01)
0
.
(b) (0
+1
)(0
+1
)(0
+1
)
.
4. (a) What are the properties of the CFL generated by a CFG.(b) Find the grammar for the language L=
{
a
2
n
bc, where n
>
1
}
(c) Find the language generated by S
0S1
|
0A
|
0
|
1B
|
1, A
0A
|
0, B
1B
|
1.5. (a) Find out a context free grammar for the language of strings over the alphabet
{
0, 1
}
suchthat 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 / aEliminate the ambiguity from the above grammar using precedence of + is higher thanthe precedence of * in evaluating the expressions.6. (a) Deﬁne a PDA. Design a PDA for L =
{
xcx
r
/ x
{
a,b
}
*
}
. Process the string “abba-cabba”.Note: x
r
stands for reverse of the string x.(b) What do you mean by an instantaneous description of a PDA. Explain with example.7. Deﬁne 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 theInstantaneous 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 2010FORMAL LANGUAGES AND AUTOMATA THEORY
(Computer Science & Engineering)
Time: 3 hours Max Marks: 80Answer any FIVE questionsAll questions carry equal marks
    
1. (a) Prove the following theorem by Induction.1 + 2 + 3 +
........
+
n
=
n
(
n
+ 1)
/
2(b) A tree with ‘n’ vertices has (n-1) edges. Prove the theorem by induction.2. (a) Discuss brieﬂy the signiﬁcance of NFA and DFA.(b) Write about NFA with
ε
transitions and also discuss the signiﬁcance of NFA with
ε
?3. Show that the language
L
=
{
x
{
0
,
1
}∗
:
x
has equal number of 01 and 01 as substrings
}
isregular.4. (a) construct CFG without
production form
a
|
Ab
|
aBa, A
b
|
, B
b
|
A
(b) Explain the relationship between derivation and derivation tree with an example.5. (a) Show that the following grammar is ambiguous and also eliminate the ambiguity usingthe 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 theprocedure for eliminating unit productions from a given CFG. Eliminate unit productionsfrom the following grammar.E
E+T / T T
T*F / F F
(E) / id6. (a) Design a PDA for L =
{
xx
r
/ x
{
a,b
}
*
}
r
stands for reverse of the string x.(b) Explain the diﬀerences between a PDA and FA.7. Design a TM for recognizing L =
{
xx / x
{
a, b
}
*
}
. Show the moves of the TM for thestrings abaaba and abaabb.8. (a) What is Modiﬁed PCP? Does the following instance of MPCP has solution? If so, givethe answerw = (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 2010FORMAL LANGUAGES AND AUTOMATA THEORY
(Computer Science & Engineering)
Time: 3 hours Max Marks: 80Answer any FIVE questionsAll questions carry equal marks

1. (a) Describe the following languages over the input set A=
{
a,b
}
i.
L
1 =
{
a,ab,abb,aba
}
ii.
L
2 =
{
a
n
b
n
|
n >
= 1
}
iii.
L
3 =
{
a
n
b
n
|
n >
0
}
(b) What is the Kleen closure? Let
=
{
a,b
}
obtainΣ
= Σ0
Σ1
Σ2
Σ3
.........
2. Find the Minimal DFA for the language L=
{
a
n
b
m
,n >
2
,m >
1
}
.3. Discuss and prove that the closure properties of regular sets are closed.4. (a) I
Asb
|
aAb, A
bAa, A
ba
. Find out the CFL.(b) Consider the grammar P =
{
aS
|
aSbS
|
ε
}
Prove that it is ambiguous byconstructing:i. Two parse trees.ii. Two leftmost derivation.iii. Rightmost derivation.(c) Find CFG with no useless symbols equivalent to
AB
|
CA, B
BC
|
AB, A
a,
aB
|
b
.5. (a) What are useless variable in a CFG? How do you ﬁnd out useless variable in a given CFG?Explain with an example.(b) Eliminate ambiguity from the following grammar.E
E+E / E*E / (E) / id6. (a) When do we say that a PDA is non deterministic? Design a PDA for recognizing thelanguage 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? Brieﬂy explain.8. (a) Discuss about P and NP complexity of algorithms.(b) What is PCP? Find solution to the following PCP instance, if exists?w = (10, 011, 101) and x = (101, 11, 011)


## Activity (1)

### Showing

AllMost RecentReviewsAll NotesLikes