FLAT
FLAT
FLAT
UNIT-I
1.a) Convert the following NFA with € - moves to DFA shown in figure 1.
2.a) Design DFA for the language all strings over {0,1} which are ending with 00.
b) Minimize the following DFA shown in figure 2.
Figure: 2
3.a) Check whether the following two Finite Automaton’s are equivalent or not?
Finite Automaton (FA) 1 (figure 3):
Figure: 3
Finite Automaton (FA) 2(figure 4):
Figure: 4
b) Convert the following NFA with € moves to DFA in figure 5.
Figure: 5
4.Design Finite Automaton which accepts set of all strings not Containing 101 as substring.
5.Construct Minimum state Automata for the following DFA?
* denotes final state
δ 0 1
Q1 q2 q6
q2 q1 q3
*q3 q2 q4
q4 q4 q2
q5 q4 q5
*q6 q5 q4
7.a) Convert the Moore machine to determine residue mod 3 into Mealy machine.
b) Construct the minimum state automata for the following.
0 1
→A B C
B B C
C B C
D B E
E B C
8.a) Convert the following NFA with ε to equivalent DFA:
a b ε
→P Φ P Q
Q Q Φ R
R Q P Φ
b) Design NFA Accepting string with a’s and b’s such that string containing two
consecutive a’s or two consecutive b’s.
9. a) Construct DFA for the following: L={w | w has both an even number of 0’s and even
number of 1’s }.
b) Minimize the following DFA using equivalence theorem.
10.a) Construct the equivalent DFA for the NFA which accepts the language (a/b)*abb.
b) Design a Moore Machine to determine the residue mod 5 for each binary string treated as
integer.
UNIT-II
1.a) Convert the following Finite Automata to it’s equivalent Regular Expression as
shown in figure 5.
Figure: 5
b)Construct Finite Automata for the regular expression 0*1*(00)*1.
Figure: 6
b) Construct FA for the following regular expressions (0+1)*(1+00)(0+1)*.
11.a) For the following grammar give the leftmost and rightmost derivation for the
string ‘00101’.
S → A1B
A → 0A / ε
B → 0B / 1B / ε
Figure: 6
b) Construct FA for the following regular expressions (0+1)*(1+00)(0+1)*.
b) (0+1)* 111*
c) (0* 11* + 101)
UNIT-3
1.a) Design Push Down Automata for the language L={wcwR | w Є (0+1)*}
b) Define Ambiguous Grammar. Check whether the grammar.
SaAB, AbC/cd, Ccd, Bc/d Is Ambiguous or not?
2. a) Construct a PDA for the following grammar SAA/a, ASA/b.
b) Show that for every PDA there exists a CFG such that L(G)=N(P).
3. a) Convert the grammar S0AA, A 0S/1S/0 to a PDA that Accepts the same Language by Empty
Stack.
b) Design Push down Automata for the language L = {an b2n | n≥1}.
4.a) For the following grammar give the leftmost and rightmost derivation for the
string ‘00101’.
S → A1B
A → 0A / ε
B → 0B / 1B / ε
b) Construct the right linear grammar for the language (0+1)*00(0+1)*.
5. a)Construct CFG for the PDAM = ({q0,q1}, {0,1}, {R,Z0}, δ, q0, Z0, Φ) and δ is given
by
δ(q0,1,Z0)=(q0,RZ0)
δ(q0,1,R)=(q0,RR)
δ(q0,0,R)=(q1,R)
δ(q1,0, Z0)=(q0, Z0)
δ(q0,ε, Z0)=(q0,ε)
δ(q1,1,R)=(q1,ε)
b) Obtain a CFG to generate unequal number of a’s and b’s.
2.a) Construct the Turing machine for the language L={ anb2n| n>=1}.
b) Explain about various types of Turing Machine.
3.a) Construct a Turing Machine that will accept the Language consists of all palindromes of
0’s and 1’s?
b) Design Turing Machine for the Language L={an bn cn/n≥1}.
4.a) Obtain GNF for SAB, ABS/b , BSA/a.
b) Design a Turing Machine for L={0n1m0n1m/m,n>=1}.
5.a) Convert the following grammar to Chomsky Normal Form
S ABA
A aA | Є
B bB | Є
and simplify the grammar
b) Write and explain closure properties of Context Free Languages.
6.a) State the Pumping Lemma for Context Free Languages.
b)Design Turing Machine for the Language L={ an bn cn/n≥1 }
7. a)Design Turing Machine to compute the function n!
b)Design TM for performing proper subtraction of two numbers.
10.a) Design TM which will recognize strings containing equal number of a's and b's.
b)Design a TM to accept the language L= {w c wR | w ε (a+b)*}.
List A List B
1 wi xi
1 00 0
2 001 11
3 1000 011
b) Define post`s correspondence problem and show that it is undecidable.
7.a) Explain about post correspondence problem in detail.
b) Explain counter machine machine in detail.
8. a) What is post correspondence problem? Verify whether the following PCP has solution or not?
A={ba,ab,a,baa,b}, B={ bab,baa,ba,a,aba }.
b)obtain the solution for the following system of post correspondence problem. A={100,0,1},
B={1,100,00}.
9.Find whether the post correspondence problem p={(10,101),(011,11),(101,011)}has a match.
Give the solution .
10.Give three examples of recursive Languages.