Flat R22
Flat R22
OR
2b i. Minimize the following DFA, where Q0 and Q4 are the initial and 6 3 1
final states respectively.
State 0 1
Q0 Q1 Q3
Q1 Q2 Q4
Q2 Q1 Q4
Q3 Q4 Q2
Q4 Q4 Q4
ii.Write different types of languages and their machine counter 4 1 1
parts
***
3a. i. Identifythe language generated by the grammar G=(V,T,P,S) 6 3 2
where P={S->aSb, S->ab}? Also, write the parse trees for it
ii. State and discuss the importance of Kleene’s theorem 4 2
OR
3b. The following are two finite automata M1(Q1,{0,1},q0,δ1,{q0,q1}) and 10 3 2
M2(Q2,{0,1},p0,δ2,{p2}) corresponding to regular languages L1 and
L2 with the transition functions given below. For machine M1,
δ1(q0,0)=q1, δ1(q0,1)=q0, δ1(q1,0)=q2, δ1(q1,1)=q0, δ1(q2,0)=q2,
δ1(q2,1)=q2, where q0 is an initial and a final state and q2 is a final
state respectively. For machine M2, δ2(p0,0)=p1, δ2(p0,1)=p0,
δ2(p1,0)=p1, δ2(p1,1)=p2, δ2(p2,0)=p1, δ2(p2,1)=p0. Here p0 is an
initial state and p2 is a final state. Construct a finite automaton for the
language L=L1UL2.
***
4a. i. Define CFG and Differentiate between CFL and a sentential form of a 5 2 3
CFG
ii. State and explain linear bounded automata and equivalence with CSG 5 3 3
with an example
OR
4b. State and explain pumping lemma for context-free Languages with an 10 3 3
example.
***
5a. i. Design a TM to computer one’s complement of a given binary 5 5 4
number.
ii. Examine the formal definition of a TM to answer the following 5 4 4
questions and explain with your reasoning.
1. Can a TM ever write the blank symbol B on its tape?
2. Can the tape alphabet Г be the same as input alphabet Σ ?
3. Can a TM’s head ever be in the same location in two
successive steps
4. Can a TM Contain just a single state?
OR
5b. i. Design a TM to L = {a2nbn / n > 0} 5 5 4
ii. Design a TM to compute mxn, where m and n are positive integers 5 5 4
***
6a. State and explain Cook’s Theorem 10 3 5
OR
6b. Discuss about NP- completeness 10 3 5
***