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

Toc Cie Papers

Uploaded by

SAKSHAM PRASAD
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)
120 views

Toc Cie Papers

Uploaded by

SAKSHAM PRASAD
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/ 5

-v
"1-.,.,.,r vt '-ov""
R V College of Engineering
Department of Computer Science and Engineering
TEST - I : Question Paper
Subject:
(Code)
Theory of Computation
(16CS46)
ISemester: 4 th
B _E

Date :Feb-2019 Duration: 120 minutes Staff : HKK/MRA/SSV/ASI'


Name: USN : Section: I A/B/C/D
SI.No
Note: answer all questions Ma •u.
rks L6
•co

I.a Define regular expression. Give regular expression which generates the Ll ,L3 COl

following languages over the alphabet I= {a, b}.


1. The language of all strings containing both bah and aha as
substrings.
ii. The language of all strings in which the number of a's is even and
the number of h's is odd.
Give DFA's accepting the following languages over the alphabet I= {a, b} .
Ll C04
l.b 4

i. Strings that contain either ab or bba.


ii. The language of all strings in which both the number of a's and the
numbers ofb's are even.
Define NFA-e, Extended transition function o' for NFA- e and Language
LI CO i
l.c
acce ted b NF A- e.
2.a For each of the regular expressions below, find an NFA-e: recognizing the 4 L2 Co2

language corresponds to the regular expressions by applying the Kleen's theorem


part-I. Do not attempt to simplify the answer.
i. ((ab)*b+ab')*
ii. ab+ aab • (aa+a)
6 L4 C04
2.b Consider the NFA- e below, using the subset construction method draw the DFA
accepting the language whicl is same as the language accepted by NF A- e.
C

4 L2 Co2
3.a For the DFA given beloyy.~ how that there cannot be any other DFA with fewer
states accepting the same languagn b
0-- ce
(U

b
3.b Use Kleen's theorem part-II to find a regular expression corresponds to the DFA 6 L3 COJ

below.

4.a State and prove pumping lemma for regular languages. Using pumping lemma 6 u Co4

for regular sets show that the language below is not regular.
L={ xy I x, ye {O, I}* and y = x'}.

4.b Let Ml and M2 be the DFAs as shown below, accepting languages LI and L2, LJ COJ

respectively. Draw DFAs accepting the following languages.


a. LI u L2

5.a Describe the decision algorithms to answer the following questions. L2 Col

i. Given an FA M accepting a language L, and given two strings x and


y, are x and y distinguishable with respect to L?
ii. Given two DFAs Ml and M2, is L(MI) a subset of L(M2)?

5.b Define CFG, Language generated by CFG and Ambiguity in CFG . Describe the LI CO2

language generated by the grammar I Sa I bSS I SSb I SbS and show it is


ambiguous.

S.c Define null productions and unit productions. For the CFG below find an 4 L4 C04

equivalent CFG with no null productions and no unit productions that generates
the same language, except possibly fore.
ABC, BC a €, CB b € , AB I A IC
R V College of Engineering
Department of CSE
TEST - II : Question Pa er
Subject: Theory ofComputation-16CS46 Semester: 4 th BE
(Code)
Date :March~2019 Duration : 90 minutes Staff: HKK/AS!MRA/SSV
Name: USN: Section : A/B/C/D

SI.No Note: answer all questions Ma •co


rks

fY
L< [OJ
Define GNF grammar. Given below a CFG G, find a CFG G 1 in GNF geverating
L(G)-{ e }.
S->AB I AC, A->aAb I bAa I a, B->bbA I aaB I AB, C->abCa I aDb, D->bDJaC
I ,Y.b Show that every regular language is also a context free language. 2 LI COi

L2 Co2
· Define PDA. Design PDA to accept each of the following languages. You may
accept either by final state or by empty stack, whichever is convenient.
i. L=f0°1 ° I n>O l ii. L=faiJ>iJ I i=i or Pi((
LI C"ll.\
2.b Let L be L(Ml) for some PDA with final state Ml=(Q,I;,f,o,qo,Zo,F), prove that
there exists an empty stack PDA M2 such that L=L(M2). Construct final state
PDA to accept L={ailJi/ I i#j or j;tk}. Convert it into equivalent empty stack
PDA. .
3.a. 2 L2 CO2
Show that every regular grammars are linear grammars but every linear
1rrammars are need not be reirular 1ITammars.
3.b. How to find an equivalent CFG from a given PDA. Find the equivalent CFG to 8 L4 COi

the PDA whose transition diagram is shown below. Show that the string aba1aba
is acce\ted by the PDA and it is generated by the equivalent CFG.

o.,-i:\~ .
.

'o~ ct,2::IQ"i; ---

___, .
.oL,
. _- r>;c I?::. a' ·1
.-V bo..' a_a.. I1a...c...
e
°-1!>l E: '
b1J,;, \ b.b .
IA
4.a. State and prove pumping lemma for context free languages.
Show that L=f ww I w E fa,b l *l is not context free.
Ll COJ
4.b. IfLI is a context free language and L2 is a regular language, then prove that

d:~
LI nL2 is a context free lanirua!!e.
COJ
5.a ·Give the equivalent left linear grammar to the finite automata whose transition L4

0--
5.b Draw the NFA accepting the language generated by the grammar with L2 CO:?

oroductions .S->abAlbBlaba, A->blaBlbA, B--+aBJaA

COl: Get in depth lmowledge of fundamental concepts of theory of computations.


CO2: An~lyze the ~ools of finite automata to variou.s fields of computet science.
C03: Design ~olution model for complex problems, using the appropriate skills of automata theory
for better results. ·
C04: Apply aufiimata skills in situations that describe computation effectively and efficiently.
E!
_':N..
R V College of Engineering
1-
J",-IT(J't\o
... Department of Computer Science and Engineering
Test - ill : Question Paner
Course: Theory of Computation(16CS46) I Semester : 4 .
(Code)
Date :April-19 Duration : 90 minutes Staff: HKK /ASP /MRA/SSV
Name: USN: Section: IA/8/C/D
Note: answer aII quesfions
SI.no Mar * Ll- *CO
Questions ks L6
la) Define multitape TM. Explain how Multitape TM can be simulated 6 L2 CO2
using single tape TM.
lb) Discuss the halting oroblem of a TM 4 L2 COi
2a). Consider the following unrestricted grammar. Identify the language 4 L4 CO2
generated by this grammar.

aS1b,

2b) Construct a TM that will accept the languages on {a,b}


-- -
6 L3
- ·-
CO3
L=fW: n.(W)=nb(W)}
3a) IfL 1 and Li are recursively enumerable languages over L, then Prove that 4 LI COi
,
L1nl,i and L1U 1,iare recursively enumerable.
3b) Let x and y are two positive integers represented using unary 6 L4 CO4
notation. Design a Turing Machine that computes the function f(x,y),
where x,y E 1+
f(x; y) =x-y ifx>y
f(x, y) = y - x -ify>x
f(x, v)=O ifx=v
4a) Define post correspondence problem (PCP) and solve PCP given 6 L3 C03
below.
List A ListB List A ListB
Xi Yi Xi Yi
I 11 l ll I 110 110110
2 100 001 2 00II 00
3 111. 11 3 . 0II0 110

4b) Discuss the relationshio between the families of languages. 4 LI COi


Sa) Discuss Multi stack Turing Machine and explain. how it can be used 4 L2 CO2
as counter machines.
5b) Define Linear Bounded Automata. Design a linear bounded 6 L4 C04
automata to acceot the language L={WcWRIW £ (a,b)*}.

COURSE OUTCOMES:

After completing the course, the students will be ab!e to


1. Get in depth knowledge of fundamental concepts of theory of computations.
2. Analyze the tools of finite automata to various fields of computer science.
3. Design solution model for complex pr:J!::lems, using the appropriate skills of automata theory
for better results.
4. Apply automata skills in situations that dP,scribe computation effectively and efficiently.

• - = - - -- -
i LI L2 L3 L4 i 15 L6 COi CO2 C03 C04
/ Total 8 14, 12 16 - 12 14 12 12
Marks I-

You might also like