Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more
Download
Standard view
Full view
of .
Look up keyword
Like this
33Activity
0 of .
Results for:
No results containing your search query
P. 1
JNTU old question papers 2007

JNTU old question papers 2007

Ratings:

4.8

(1)
|Views: 3,674|Likes:
Published by Srinivasa Rao G

More info:

Published by: Srinivasa Rao G on Feb 01, 2008
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as PDF, TXT or read online from Scribd
See more
See less

08/20/2013

pdf

text

original

 
Code No: R05310501
Set No. 1
III B.Tech I Semester Regular Examinations, November 2007FORMAL LANGUAGES AND AUTOMATA THEORY(Computer Science & Engineering)Time: 3 hours Max Marks: 80Answer any FIVE QuestionsAll Questions carry equal marks
⋆ ⋆ ⋆ ⋆ ⋆
1. Construct NFAs for the following languages(a) The set of strings over alphabet
{
0,1,.........,9
}
such that the final digit hasappeared before.(b) The set of strings over alphabet
{
0,1,........,9
}
such that the final digit has notappeared before.(c) The set of strings of 0’s and 1’s such that there are two 0’s separated by anumber of positions that is a multiple of 4. Note that 0 is an allowable multipleof 4. [4+4+8]2. For the following NFA with
-moves convert it in to an NFA with out
-movesand show that NFA with
-moves accepts the same language as shown in figure 2.[16]Figure 23. Find a Regular expression corresponding to each of the following subsets over
{
0,1
}
*.(a) The set of all strings containing no three consecutive 0’s.(b) The set of all strings where the 10
th
symbol from right end is a 1.(c) The set of all strings over
{
0,1
}
having even number of 0’s & odd number of 1’s.(d) The set of all strings over
{
0,1
}
in which the number of occurrences of isdivisible by 3. [4
×
4]4. (a) Obtain a CFG to generate unequal number of a’s and b’s.(b) Obtain a CFG to obtain balanced set of parentheses.(i.e every left parenthesesshould match with the corresponding right parentheses). [2
×
8]1 of 2
 
Code No: R05310501
Set No. 1
5. (a) Simplify the grammar=
{ {
S,A, B, C, E
}
,
{
a,b,c
}
, P, S
}
Where, P is S
ABA
aB
bB
CE
c/
(b) Prove that the following language is not context-free languageL =
{
www
|
w
{
a
,
b
}
}
is not context free. [8+8]6. (a) Construct the PDA for the following grammar.S
AA/a A
SA/b(b) Design a PDA for the following grammar.S
0A A
0AB/1 B
1. [8+8]7. Define Turing machine formally; explain how Turing machine can be used to com-pute integer functions. Design the Turing machine to compute following function,Show its transition diagram also f(x,y)=xy where x and y are positive integersrepresented in unary. [16]8. Give LR(0) items for the grammar S
aAB, A
aAb/ab, B
aB/a. Find its equiv-alent DFA. Check the parsing by taking a suitable string. [16]
⋆ ⋆ ⋆ ⋆ ⋆
2 of 2
 
Code No: R05310501
Set No. 2
III B.Tech I Semester Regular Examinations, November 2007FORMAL LANGUAGES AND AUTOMATA THEORY(Computer Science & Engineering)Time: 3 hours Max Marks: 80Answer any FIVE QuestionsAll Questions carry equal marks
⋆ ⋆ ⋆ ⋆ ⋆
1. Construct NFAs for the following languages(a) The set of strings over alphabet
{
0,1,.........,9
}
such that the final digit hasappeared before.(b) The set of strings over alphabet
{
0,1,........,9
}
such that the final digit has notappeared before.(c) The set of strings of 0’s and 1’s such that there are two 0’s separated by anumber of positions that is a multiple of 4. Note that 0 is an allowable multipleof 4. [4+4+8]2. Construct DFA for given (figure 2) NFA with
-moves. [16]Figure 23. Construct a DFA accepting language represented by 0*1*2*. [16]4. (a) Obtain regular grammar for the following FA as shown in figure 4a.Figure 4a(b) What is the language accepted by above FA? [2
×
8]5. (a) What do you mean by Greibach Normal Form (GNF).(b) When is a CFG said to be in GNF?1 of 2

Activity (33)

You've already reviewed this. Edit your review.
1 thousand reads
1 hundred reads
Srinivasa Rao B liked this
Kaushal Elango liked this
Kaushal Elango liked this
rsrshelke6460 liked this
Jaswanth Jasv liked this
rockstadinesh liked this

You're Reading a Free Preview

Download
scribd
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->