QB Flat

You might also like

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

QUESTION BANK 2023

UNIT I
Introduction To Finite Automata

1. a) Consider the below finite automata and check the strings are accepted or not

(i) 1110 (ii) 0001 (iii) 1010

b) Define NFA. What are the differences between DFA & NFA?

2. Convert the following NFA with ε moves to DFA without ε moves.

3. Minimize the following finite automata.

FLAT Page 1
QUESTION BANK 2023

4. Convert the following Mealy machine into its equivalent Moore machine.

Present I/P=0 I/P=1


State
Next State O/P Next State O/P

A C 0 B 0
B A 1 D 0
C B 1 A 1
D D 1 C 0

5. a) Write about relations on sets.


b) Define Grammar? What are the tuples?
c) Define Finite Automaton.
d) Show that (0*1*)* = (0+1)*.
e) Define Mealy machine and Moore machine.

6. a) Discuss Chomsky’s Hierarchy of formal languages.


b) Explain briefly about DFA and NFA?

7. a) Define Moore machine? Construct Mealy machine corresponding to Moore machine?

b) Prove i) R= (1+00*1) + (1+00*1) (0+10*1)* (0+10*1)* = 0*1(0+10*1)*


ii) R= Є+1*(011)*(1*(011)*)*= (1+011)*

FLAT Page 2
QUESTION BANK 2023

8. a) Define relations on set and explain its property with an example


b) Define NFA and DFA. Construct DFA for the given NFA

9. a) List out the identities of Regular expression.


b) From the identities of RE, prove that
i) 10+(1010)*[^+(1010)*]=10+(1010)*
ii)(0+011*)+(0+011*)(01+0100*)(01+0100*)*=01*(010*)*
c) Define finite automata? Explain detail about the tuples.

FLAT Page 3
QUESTION BANK 2023

UNIT II
Regular Languages

1. a) Construct an equivalent FA for the given regular expression (0+1)*(00+11)(0+1)*


b) State Arden’s theorem and construct the regular expression for the following FA using Arden’s
theorem.
2. Explain about Arden’s theorem, for constructing the RE from a FA with an example.

3. a) List out the identities of Regular expression.


b) From the identities of RE, prove that
i) 10+(1010)*[^+(1010)*]=10+(1010)*
ii)(0+011*)+(0+011*)(01+0100*)(01+0100*)*=01*(010*)*
4. a) Consider the below finite automata and check the strings are accepted or not

(i) 1110 (ii) 0001 (iii) 1010


b) Construct an equivalent FA for the given regular expression (0+1)*(00+11)(0+1)*
5. a) Prove R=Q+RP has unique solution, R=QP*
b) Explain about the Arden’ theorem, for constructing the RE from a FA with an example

6. Explain how equivalence between two FA is verified with an example.


7. Prove that the language L= {anbn | n>=1} is not regular using pumping lemma
with procedure.

FLAT Page 4
QUESTION BANK 2023

8.
State Arden’s theorem and construct the regular expression for the following FA usingArden’s
theorem.

9. a)Write the process of equivalence two FA’s? Find whether the equivalence two FA’s or not.

b) List out the identities of Regular expression.


10. Prove that the language L= {anbn cn | n>=1} is not regular using pumping lemma.

FLAT Page 5
QUESTION BANK 2023

UNIT III
Context Free Grammars and Languages
1. Write the procedure and Eliminate left recursion from the following Grammar
EE+T/T
TT*F/F
F(E)/id
2. a) Explain about derivation and parse trees? Construct the string 0100110 from the Leftmost
and Rightmost derivation.
S0S/1AA
A0/1A/0B
B1/0BB
b) Find the parse tree for generating the string 11001010 from the given grammar.
S1B/0A
A1/1S/0AA
B0/0S/1BB
3. a) Define Ambiguous grammar.
b) Remove Left recursion from the grammar SSab/T
TTcd/F
FFa/G
4. a) Explain Left recursion and Left factoring.
b) Perform left factor from the grammar AabB/aB/cdg/cdeB/cdfB

5. Convert the following grammar into CNF.


SbA/aB AbAA/aS/a BaBB/bS/a.

6. a) What is linear grammar? Explain in detail with example.


b) Explain the closure properties of context free languages.
7. a)Remove the unit production from the grammar
SAB,AE,BC,CD,Db,Ea
b) Remove ϵ productions from the grammar
SABaC, ABC, Bb/ ϵ, CD/ ϵ, Dd
8.
b) What is the differentiate between CFG and Regular Language?

FLAT Page 6
QUESTION BANK 2023

UNIT IV
Pushdown Automata

1. a) Construct a PDA which recognizes all strings that contain equal number
of 0’s and 1’s.
b) A PDA is more powerful than a finite automaton. Justify this statement.
2. Construct PDA from the following Grammar.
S aB
B bA/b
A aB
3. Construct PDA from the following Grammar
S0BB
B0S/1S/0
Show an ID for the string 010000 is generated for PDA?
4. Construct a CFG equivalent to the following PDA.
PDA={(p, q), (0, 1), δ, p, q, (Z, X)}, where p is initial state, q is final state.
δ is defined as δ(p,0,Z)=(p,XZ), δ(p,0,X)=(p,XX), δ(p,1,X)=(q,ϵ), δ(p,1,X)=(p,ϵ), δ(p,ϵ,Z)=(p,ϵ).

5. a) Construct an equivalent PDA for the following CFG


SaAB | bBA
AbS | a
B aS | b
b) Explain the informal introduction and formal definition of PDA.
6. a) Define Instantaneous description (ID) in PDA.
b) Explain about the graphical notation of PDA.
7. a) Write the process for convert PDA into an equivalent CFG.
b) Convert the following PDA into an equivalent CFG.
δ (q0,a0,z0)(q1,z1z0)
δ(q0,b,z0)(q1,z2z0)
δ(q1,a,z1)(q1, z1z1)
δ(q1,b,z1)(q1, λ)
δ(q1,b,z2)(q1,z2z2)
δ(q1,a,z2)(q1, λ)
δ(q1, λ,z2)(q1, λ) // accepted by the empty stack.
8. a) Define push down automata? Explain acceptance of PDA with empty stack.
b) Define Instantaneous description (ID) in PDA.
9. a) Explain about the graphical notation of PDA.
b) Construct an equivalent PDA for the following CFG.
SaAB | bBA
AbS|a
BaS | b.
10. Explain Deterministic Push down Automata with example?

FLAT Page 7
QUESTION BANK 2023

UNIT - V
Turing machines & Undecidability

1. Construct a Turing machine which multiplies two unary numbers.


2. Construct a Turing machine that recognizes the bLanguage L={anbn, n>1}.
3. Explain the various types of Turing machine.
4. Explain Universal Turing Machine
5. Construct a Turing machine that recognizes the language {anbncn , n>0}.
6. Describe linear bounded automaton.

FLAT Page 8

You might also like