Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

2019 Dec. CS301-E - Ktu Qbank

Download as pdf or txt
Download as pdf or txt
You are on page 1of 3

A E192010 Pages:3

Reg No.:_______________ Name:__________________________

APJ ABDUL KALAM TECHNOLOGICAL UNIVERSITY


FIFTH SEMESTER B.TECH DEGREE EXAMINATION(R&S), DECEMBER 2019

Course Code: CS301


Course Name: THEORY OF COMPUTATION
Max. Marks: 100 Duration: 3 Hours

PART A
Answer all questions, each carries 3 marks. Marks
1 Define nondeterministic finite automata(NFA). Draw the NFA for the language 3
L={an b m | n, m>=1}
2 Convert the following NFA to DFA. 3

3 Write regular expression for the language L={1n 0 m |n>=1, m>=0} 3

4 Differentiate Moore machine from Mealy machine. Write the tuple 3


representation for both machines.
PART B
Answer any two full questions, each carries 9 marks.
5 a) Write the notation for the language defined by a DFA. Write a string belong to 3
the language L3 if L={0,1} .
b) Construct NFA without ϵ – transitions from the following NFA. M=({q0, q1, 6
q2}, {a, b, c}, δ , q0, {q2}) and δ(q0 , a) = {q0}, δ(q0 , b) = {q1}, δ(q0 , c) = {q2}
δ(q1 , ϵ) = {q0}, δ(q1 , a) = {q1}, δ(q1 , b) = {q2},
δ(q2 , ϵ) = {q1}, δ(q2 , a) = {q2}, δ(q2 , c) = {q0}.
6 a) State Myhill-Nerode Theorem. 3
b) Minimize the following DFA. 6
δ a b
P0 P0 P1

P1 P2 P1

P2 P3 P1

*P3 P3 P4

*P4 P5 P4

Page 1 of 3

For More Visit : KtuQbank.com


A E192010 Pages:3

*P5 P3 P4

7 a) Construct regular expression corresponding to the following state diagram: 4.5

b) Design an ϵ-NFA for the regular expression (0+1)*01 4.5


PART C
Answer all questions, each carries 3 marks.
8 Write the conditions for a pushdown automaton to be considered as 3
deterministic.
9 Which are the methods to accept a string in a PDA? Whether both type of 3
PDAs can define the same language. Justify your answer.
10 Convert the following grammar to Chomsky Normal Form. 3
S-> 0S0|1S1| ϵ
11 Whether the following grammar is ambiguous? 3
E-> E+E| E*E|I
I-> 0|1|a|b
PART D
Answer any two full questions, each carries 9 marks.
12 a) Verify that the following languages is not regular: 4.5
{anb2n | n>0 }

b) Which of the following operations are closed under regular sets. Justify your 4.5
answer.
i) Complementation ii) Set difference iii) string reversal iv) Intersection
13 a) Give a CFG for the language N(M) where M = ({p,q,r}, {0, 1}, {Z, X0}, 4.5
δ, q0, Z, r) and δ is given by δ(p , ϵ , X0) = {(q, ZX0)}, δ(q , ϵ , X0) = {(r, ϵ)}, δ(q
, 1, Z) = {(q, ZZ)}, δ(q , 0, Z) = {(q, ϵ)}.

b) Find the Greibach normal form grammar equivalent to the following CFG: 4.5
S → AB
A → BS| 1
B → SA|0
14 a) Design a PDA to accept the language {02n1n | n ≥ 1}. 4.5
b) Find a CFG without ϵ-productions equivalent to the grammar defined by 4.5
S → ABaC, A→BC, B→b/ ϵ, C→D/ ϵ , D→d
PART E
Answer any four full questions, each carries 10 marks.
15 a) State Pumping lemma for CFLs. Write the applications of pumping lemma for 4
CFL s.
b) Check whether L={aibici | i > 0} belong to CFL or not. 6
16 a) Discuss about Multitape Turing Machines. Explain informally how they can 5
Page 2 of 3

For More Visit : KtuQbank.com


A E192010 Pages:3

simulate the moves of a Turing Machine


b) Write a note on Universal Turing machines. 5
17 a) How to identify deterministic Turing machine from nondeterministic TM 3
b) Write notes on the following: 7
i) decidable and undecidable problems
ii) Halting Problem of Turing machine.
18 a) Write the properties of recursive languages and recursively enumerable 3
languages.
b) Write the Chomsky hierarchy of languages. Prepare a table indicating the 7
automata and grammars for the languages in the Chomsky Hierarchy.
19 a) Define Turing machine [Write the tuple representation for TM]. 5
b) Design a Turing machine to identify the strings belong to the language L={0n1n 5
| n>0}.
20 Design the Turing machine to recognize the language: {0n1n0n | n >=1}. 10
****

Page 3 of 3

For More Visit : KtuQbank.com

You might also like