TAFL Unitwise - QuestionBank
TAFL Unitwise - QuestionBank
TAFL Unitwise - QuestionBank
Unit – I
Sl.
Questions CO PO
No
1 Write down the operations on set. 1 1
2 List any three applications of Automata Theory. 1 1
3 Define Finite Automation. 1 1
4 Define Deterministic Finite Automation. 1 1
5 Define Non-Deterministic Finite Automation. 1 1
6 Define NFA with transition. 1 1
7 Design FA which accepts odd number of 1‟s and any number of 0‟s. 1 2,3
8 Design FA to check whether given unary number is divisible by three. 1 2,3
9 Design FA to check whether given binary number is divisible by three. 1 2,3
10 Design FA to accept the string that always ends with 00. 1 2,3
Obtain the closure of states q0 and q1 in the following NFA with
11 1 2
transition.
12 Obtain closure of each state in the following NFA with move. 1 2
13 Explain a transition diagram. 1 1
14 Explain a transition table. 1 1
15 Explain the transition function. 1 1
16 Differentiate DFA and NFA? 1 2
17 Write notes on Moore Machine. 1 1
18 Write the formal definition of Moore Machine. 1 1
19 Short notes on Mealy Machine. 1 1
20 Write the formal definition of Mealy Machine. 1 1
21 Compare the Mealy and Moore Model? 1 2
22 Design FA to accept the string that always ends with 00. 1 2,3
23 Design FA to check whether given binary number is divisible by three. 1 2,3
Show that “For every NFA, there exists a DFA which simulates the
24 behavior of NFA. If L is the set accepted by NFA, then there exists a 1 2
DFA which also accepts L”.
Show that “If L is accepted by NFA with ε-moves, then there exists L
25 1 2
which is accepted by NFA without ε-moves.
Construct DFA equivalent to the given NFA
0, 1
26 0 1 1 2,3
q0 q1 q2
Page 1 of 8
GCET – CSE – II Year IV Sem Mr Rishabh Jain
KCS402 – Formal Languages and Automata Theory– Question Bank
Let M = ({q0, q1}, {0,1}, δ, q0, {q1}) be NFA. Where δ (q0, 0) = {q0,
27 q1}, δ (q0, 1) = {q1}, δ (q1, 0) = {}, δ (q1, 1) = {q0, q1}. Construct its 1 2,3
equivalent DFA.
Let M = ({q0, q1,q2,q3}, {0,1}, δ, q0, {q2,q3}) be -NFA.
Where δ (q0, 0) = {q0, q1}, δ (q0, 1) = {q1}, δ (q1, 0) = {q2,q3}, δ (q1,
28 ε) = {q1}, δ (q1, 1) = {q0, q1}, δ (q2, 0) = {q2}, δ (q2, ε) = {q3}, δ (q2, 1 2,3
1) = {q0, q3,}, δ (q3, 0) = {q3}, δ (q3, 1) = {q2, q3}, δ (q3, ε) = {q0}.
Construct its equivalent DFA.
Consider the following ε–NFA. Compute the ε–closure of each state and
find it‟s equivalent DFA.
ε a b c
29 p Ф {p} {q} Ф 1 2,3
q {p} {q} {r} Ф
*r {q} {r} ф {p}
30 Convert a NFA which accepts the string ends with 01 to a DFA. 1 2,3
Consider the Moore machine described by the transition diagram given
below. To construct a Mealy machine, which is equivalent to moore
machine 1
q3/ 1
0
q0/ 0
1 0
31 1 2,3
0
0 q2/ 0
1
q1/ 1 1
q2 q1 1 q4 0
q3 q2 1 q1 1
q4 q4 1 q3 0
Page 2 of 8
GCET – CSE – II Year IV Sem Mr Rishabh Jain
KCS402 – Formal Languages and Automata Theory– Question Bank
Unit – II
Sl.
Questions CO PO
No
1 State regular expression. 2 1
2 How the kleen‟s closure of L can be denoted? 2 1,2
3 How do you represent positive closure of L? 2 1,2
Write the regular expression for the language accepting all combinations
4 2 2,3
of a‟s over the set = {a}.
Write regular expression for the language accepting the strings which
5 2 2,3
are starting with 1 and ending with 0, over the set = {0,1}.
6 Show that (0*1*)* = (0+1)*. 2 2
7 Show that (r+s)* r* + s*. 2 2
If L = { The language starting and ending with „a‟ and having any
8 2 2,3
combinations of b‟s in between, that what is r?
Give regular expression for L= L1 L2 over alphabet {a,b}
9 where L1 = all strings of even length 2 2,3
L2 = all strings starting with „b‟.
10 Explain the application of the pumping lemma. 2
Describe the following by regular expression
a. L1 = the set of all strings of 0‟s and 1‟s ending in 00.
11 2 2,3
b. L2 = the set of all strings of 0‟s and 1‟s beginning with 0 and
ending with 1.
12 Show that (r*)* = r* for a regular expression r. 2 2
13 Write down the closure properties of regular language. 2 3
14 What is pumping lemma? 2 2
15 State Arden‟s theorem. 2 1
16 What is dead state? 2 2
Show that „r‟ be a regular expression, the there exists an NFA with
17 2 2
transitions that accepts L{r}.
Construct the NFA with for the regular expression using Thomson
construction method.
18 2 2,3
a. 0(0+1)*100
b. a(a+b)*b
Obtain the equivalent DFA from the following regular expressions
19 a. (a+b)*abb 2 2,3
b. (00+11)*(0+1)*
Show that the following languages are not regular using pumping lemma
20 a. L={0i 1i ; i>=1} 2 2,3
b. L={ap ; p is prime}
Find the regular expression for the set of all strings denotes by (R 13)2
from the deterministic finite automata given below
21 2 2,3
Page 3 of 8
GCET – CSE – II Year IV Sem Mr Rishabh Jain
KCS402 – Formal Languages and Automata Theory– Question Bank
Obtain the regular expression using Arden‟s theorem from the given
DFA.
0 1
1
qq21 q2
22 2 2,3
1
0 0
q3
Obtain the regular expression using state elimination method from the
given DFA.
0 1
1
qq21 q2
23 2 2,3
1
0 0
q3
Unit – III
Sl.
Questions CO PO
No
1 Obtain the Right Linear Grammar from the given Left Linear Grammar 3 1
Let G = ( {S,C}, {a,b}, P,S} where P consists of S aCa, C aCa,
2 3 2
Find L(G))?
Consider G whose productions are S aAS/ a ,ASbA / SS / ba, show
3 3 2
that S aabbaa and construct a derivation tree.
4 Find L(G) where G = ({S},{0,1}, {S0S1, sε },S) 3 2
5 Construct a CFL from the given grammar S aaA, AS / a 3 2
6 Define a derivation tree for CFG. 3 1
7 Construct CFG L= { anbn ; n≥1}. 3 2,3
8 Find a LM derivation for aaabbabbba with the productions. 3 2
9 Find L(G), S aSb, S ab. 3 2
Show that id* id can be generated by two distinct leftmost derivation in
10 3 2
the grammar
Page 4 of 8
GCET – CSE – II Year IV Sem Mr Rishabh Jain
KCS402 – Formal Languages and Automata Theory– Question Bank
Write a CFG for the set of strings which does not produce any
11 3 2
palindromes.
Find the derivation tree for the grammar G = ( {S, A, B}, {a,b}, P, S}
Where P is given by
12 S Aa / bB 3 2
Aab
B aBb / a
13 Define parse tree. 3 1
14 What are the two major normal forms for context-free grammar? 3 2
15 What is a useless symbol? 3 2
16 Define Nullable Variable? 3 1
Let G = (V, T, P,S) with the productions given by
S aSbS/ B / ε
17 3 2
B abB
Eliminate the useless production.
18 What is a useful production? 3 2
Determine whether the grammar G has a useless production?
SA
19 3 2
AaA / ε
B bA
20 Write a procedure to eliminate ε production. 3 2
21 Write the procedure to eliminate the unit productions. 3 2
22 Define CNF. 3 1
23 Define GNF. 3 1
Consider the Grammar G whose productions are
S 0B / 1A
A 0 / 0S / 1AA
24 B 1 / 1S / 0BB and the string 0110 3 2
a. Find the left most derivation and associated derivation tree.
b. Find the right most derivation and associated derivation tree.
c. Show that the G is ambiguous.
d. Find L(G)
Consider the Grammar whose productions are
S aAS / a
25 A SbA / SS / ba 3 2
a. Construct a LMD and RMD Tree for S =>* aabbaa
b. Find the above grammar is ambiguous or unambiguous.
Construct Right Linear Grammar from the given Finite Automata
1 0
0 1 qB2
26 S A 3 2,3
0
1
Page 5 of 8
GCET – CSE – II Year IV Sem Mr Rishabh Jain
KCS402 – Formal Languages and Automata Theory– Question Bank
27 3 2,3
Page 6 of 8
GCET – CSE – II Year IV Sem Mr Rishabh Jain
KCS402 – Formal Languages and Automata Theory– Question Bank
Unit – IV
Sl.
Questions CO PO
No
1 Define pushdown automaton. 4 1
What are the different ways of language acceptances by a PDA and
2 define them. 4 2
Page 7 of 8
GCET – CSE – II Year IV Sem Mr Rishabh Jain
KCS402 – Formal Languages and Automata Theory– Question Bank
Unit – V
Sl.
Questions CO PO
No
1 What is a Turning Machine? 5 1
2 Define a Turing Machine. 5 1
3 Define Instantaneous description of TM. 5 1
4 What are the applications of TM? 5 1
What are the required fields of an instantaneous description or
5 5 1
configuration of a TM.
6 Differentiate PDA and TM. 5 2
7 Define Universal TM 5 1
8 When is a function f said to be Turing computable? 5 2
9 Explain the Class of Grammars. 5 1
10 Discuss about PCP. 5 2
11 Differentiate PCP and MPCP. 5 2
Design a TM to recognize the language L ={anbn; n>0} and test whether
12 5 2,3
the strings “aabb” is accepts or not.
Design a TM to recognize the language L ={wwr ; w (a+b)*} and test
13 5 2,3
whether the strings “abba” is accepts or not.
14 Design a TM to recognize the language L ={wcwr ; w (0+1)*}. 5 2,3
15 Design a Turing machine to compute proper subtraction m-n. 5 2,3
16 Explain the class of Grammars with example. 5 1,2
17 Explain the PCP and MPCP with example 5 1,2
Page 8 of 8