Model Question Paper

2
Reg. No.: Name : Model Question Paper Programme : MCA Semester :Winter201 4 Course : THEORY OF COMPUTATION Code :ITA414 Faculty : Prof. U.Srinivasa Rao & PROF.NISHA V M Slot : Time : Three Hours Max. Marks :100 ANSWER ALL QUESTIONS Q.No. Sub . Sec . Question Description Mark s Uni t No. Leve l Hot ? 1. (a ) Govt. of Tamilnadu is planning to take the statistics of the names of the people which contains only a and b. In such scenario, the Govt. wants to know in how many names the number of ‘a’s and number of ‘b’s are even in length. Design a DFA to recognize those names. [5] 2 D Y (b ) Construct a Nondeterministic finite automation for the given Nondeterministic machine with Epsilon transition Stat es Input Epsilo n Input 0 Input 1 Inpu t 2 S0 S1,S2 S0 --- --- S 1 S3 ----- S2 --- S 2 ---- --- S3 --- *S3 ---- ----- ----- S3 [10 ] 2 E N 2 Construct an NFA with Epsilon for the following regular expressions (a) a(a+b)*abb (b)b*a*(a+b)aa [10 ] 2 E Y 3 Design a push down automata for the set of balanced strings which you can generate from the given grammar SSS|[S]|{S}|ε [5] 3 E Y Page 1 of 2

Transcript of Model Question Paper

Page 1: Model Question Paper

Reg. No.:

Name :

Model Question Paper

Programme : MCA Semester : Winter2014Course : THEORY OF COMPUTATION Code : ITA414Faculty : Prof. U.Srinivasa Rao & PROF.NISHA V M Slot :Time : Three Hours Max. Marks : 100

ANSWER ALL QUESTIONS

Q.No. Sub. Sec. Question Description Marks Unit

No. Level Hot?

1. (a) Govt. of Tamilnadu is planning to take the statistics of the names of the people which contains only a and b. In such scenario, the Govt. wants to know in how many names the number of ‘a’s and number of ‘b’s are even in length. Design a DFA to recognize those names.

[5] 2 D Y

(b) Construct a Nondeterministic finite automation for the given Nondeterministic machine with Epsilon transition

States

Input Epsilon

Input 0 Input 1 Input 2

S0 S1,S2 S0 --- --- S1 S3 ----- S2 --- S2 ---- --- S3 --- *S3 ---- ----- ----- S3

[10] 2 E N

2 Construct an NFA with Epsilon for the following regular expressions(a) a(a+b)*abb(b)b*a*(a+b)aa

[10] 2 E Y

3 Design a push down automata for the set of balanced strings which you can generate from the given grammarSSS|[S]|{S}|ε

[5] 3 E Y

4 (a) English language contains a word ‘madam’. Design a grammar for that and check whether this word is contained in the set of palindrome or not.

[10] 3 D Y

(b) Simplify the Grammar ( Eliminate null production, unit production and useless symbols)SaS’/ aCD /aES’bC/ εCaS’/ bD EEf

[10] 3 D N

5 (a) Design a Turing machine which will accept two numbers and produce the product of those two numbers

[10] 4 D N

Page 1 of 2

Page 2: Model Question Paper

(b) For a set of given names, which are formed by ‘c’ and‘d’. Check whether the number of ‘c’s and number of‘d’s are same or not. Design a Turing machine to recognize such set of names

[10] 4 D Y

6 Given a Turing machine M=( S,∑,Ґ,δ, S0, B,A) with S= { S0, S1, S2, S3 }, ∑= {0,1}, Ґ={ 0,1,B} and A={ S3}. The transitions are defined as δ(S0, 0 )= (S1,0,R) , δ(S1, 1 )=(S2,1,R),

δ(S2, 0 )=( S2, 0 ,R), δ(S2,1 )= (S3, 1,R). Find the language which is accepted by the Turing Machine.

[5] 4 D Y

7 Two decision problems are given below which involves unrestricted grammars. Check whether the grammars are solvable or not?

(a) Given a grammar G and a string w, does G generate w?

(b) Given a grammar G1 and G2, do they generate the same language?

[10] 5 C Y

8 Find a decision problem and justify your answer [10] 5 D Y

9 Is it possible to reduce one decision problem to another? Justify your answer [5] 5 C Y

Page 2 of 2