0% found this document useful (0 votes)
27 views

10CS56 Dec14

The document discusses formal languages and automata theory. It contains 8 questions covering topics such as finite automata, regular expressions, context-free grammars, pushdown automata, Turing machines, and applications. The questions involve tasks like designing automata and grammars for specific languages, proving properties of language classes, and explaining concepts like ambiguity and correspondence problems.

Uploaded by

geetha megharaj
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
27 views

10CS56 Dec14

The document discusses formal languages and automata theory. It contains 8 questions covering topics such as finite automata, regular expressions, context-free grammars, pushdown automata, Turing machines, and applications. The questions involve tasks like designing automata and grammars for specific languages, proving properties of language classes, and explaining concepts like ambiguity and correspondence problems.

Uploaded by

geetha megharaj
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

USN lOCS56

Fifth Semester B.E. Degree Examination,


Dec.2014/Jan.2015
Formal Languages and Automata .Theory

Time: 3 hrs. Max. Marks: 1OQ

ote: Answer any FIVE full questions, selecting


atleast TWO questions from each part.

PART-A
1 a. Define the following with proper examples:
i) Alphabet ii) Powers of an alphabet. (03 Marks)
b. Design the DF A's for the following languages:
i) Set of all strings with at least one 'a' and exactly two 'b's on I = {a, b}.
ii) Set ofal! strings such that number of 1's is even and the number ofO's is a multiple of
3 on }' = {O, I}. (08 Marks)
'c. Desil1n an NFA with no more than 5 states for the following language:
i I I
L = abab" n ~ 0 }U {aba n n ~ O} (03 Marks)

d. Prove that if D = (Qo, I, 00, {qo}, Fo) is the DFA constructed from FA
= (Q ., L, ON, qo, F .) by the subset construction, then L(D) = L( ). (06 Marks)

2 a. Convert the following E - FA into an equivalent DFA: (05 Marks)


8 E a b c
~p {q, r} $ {q} {r}
*q $ {p} {r}' '{p, q}
r . <I> <I> <I> <I>

b. Define regular expression and also write the regular expressions for the following languages:
i) L= {WE {a, b}« Iw has exactly one pair of consecutive a's}.
ii) Set of all strings not ending in substring 'ab' over I = {a, b}. (06 Marks)
c. Prove that if L = L(A) for some DF A A, then there is a regular expression R such -that
L = L(R). (06 Marks)
d. Obtain the regular expression for the following DFA using state elimination technique:
~03Marks)

I i

<U
-0 j
z•.. Fig.Q.2(d) . I !

~
t
o
c,
3 a. State and prove pumping lemma for regular languages. ' (07 Marks)
E
b. Let I = {a, b}. Show that the language L = {w E '2:°1 na (w) < nb(w) } is not regular.
(05 Marks)
I of3

I ,
'~
lOCS56
c. Consider the OF A given by the transition table:
8 a b
-)qo q, q2
q, q, q3
q2 q, q2
q3 q, q4
=q, q, q2

i) Draw the table of distinguishabilities for this automaton.


r ,
ii) Construct the minimum state equivalent OFA.
iii) Write the language accepted by the OFA. (08 Marks)

4 a. Defme a Context-Free Grammar (CFG) and also obtain the CFG's for the following
languages:
i) L\ = {a"wwRb"lw E {O,lf and n ~ 2}
ii) L2={akbmc lm+n=k
ll
andm,n~l}
iii) L3 = {w E {afllwlmod3:t:lwlmod2}. (10 Marks)

b. Consider the CFG with productions


E-)E*T:T
T-)F-T:F
F -) (E) : 0 : 1
Write the leftmost derivation, rightmost derivation and parse tree for the string
'0-((1 *0)-0)'. (06 Marks)
c. Show that the following grammar is ambiguous:
S -) SbS
S -) a. (04 ~arks)

PART-B
5 a. Design a PDA for the following language: L = {wwRlw E {a,b} +}. Also, draw
, the
transition diagram for the constructed PDA. Write the instantaneous description (10) for the
string 'abbbba'. (08 Marks)
b. Convert the following CFG to a PDA that accepts the same language by empty stack:
E -) E + E I E *EI (E) 11
1-) IalIbl!01 III a I b 05 Marks)

c. Defme a deterministic PDA (OPDA). Also, design a DPDA along with transition diagram
I
for the following language: L = {anb2n n ~ 0 }. (07 Marks)

a. Begin with the grammar


S -) aAalbBblE
A -) Cia

B -) Clb
C -) COEIE

D-)AIBlab
20f3
lOCS56

i) Eliminate e-productions.
ii) Eliminate any unit productions in the resulting grammar.
iii) Eliminate any useless symbols in the resulting grammar. (08 Marks)
b. Define Chomsky onnal Form (C F). Also, convert the following CFG to CNF:
S -7 ABla
A aab
-7
B-7 Ac . (06 Marks)
c.. Show that the language L = {XE {O, 1)*1 Ixl is a perfect square} is not context-free.
(06 Marks)

7 a. Defme a Turing machine. Also, design a Turing machine to accept the set of all palindromes
over {a, l}*. Write the transition diagram for the constructed Turing machine and write the
sequence ofID's for the input string' 100 I'. (12 Marks)
b. Explain multitape Turing machine and non-deterministic Turing machines with neat block I

diagrams. (08 Marks)

8 Write short notes on the following topics:


a. Applications of finite automata in text search.
b. Inherent ambiguity of context-free languages.
c. Post's correspondence problem.
d. Recursive language and it's relationship with RE and non-RE languages. (20 Marks)

*****
I I I

I I

30f3

You might also like