TAFL AKTU Last 5 Years Papers
TAFL AKTU Last 5 Years Papers
BTECH
(SEM IV) THEORY EXAMINATION 2023-24
THEORY OF AUTOMATA AND FORMAL LANGUAGES
TIME: 3 HRS M.MARKS: 70
Note: 1. Attempt all Sections. If require any missing data; then choose suitably.
SECTION A
1. Attempt all questions in brief. 2 x 7 = 14
a. Give the mathematical definition of DFA. Differentiate between NFA and
DFA.
b. Construct Deterministic Finite Automata (DFA) to accept string that always
ends with 101 over alphabet Σ ={0,1}
c. Give regular expressions that represent the language (L), which has all binary
strings having two consecutive 0s and two consecutive 1s over the alphabet Σ
= {0, 1}.
d. Compute the Language generated by the given CFG G = ({S}, {a, b}, P, S}
where P is defined by:
{S → SS, S → ab, S → ba, S → ε}
e. Let G be the grammar
S 0B | 1A
2
13
A 0 | 0S | 1AA 90
B 1 | 1S | 0BB
2.
_2
Determine the leftmost derivation for the string 00110101
24
f. Explain the concept of two stack PDA. Give an example of a language that is
P2
accepted by two stack PDA but not accepted by normal one stack PDA.
5.
g. Explain Multi Tape Turing Machine.
4E
.5
17
P2
SECTION B
2. Attempt any three of the following: |1
7 x 3 = 21
Q
a. Construct a Finite automata (DFA) which accepts all binary numbers whose
PM
c. Write an equivalent left linear grammar from the given right linear grammar.
20
S0A |1B
g-
A0C |1A |0
Au
B1B |1A |1
C0 |0A
1-
language L = {𝑎 𝑏 | 𝑛 1}.
e. Differentiate between Deterministic Turing machine and Non-Deterministic
Turing machine. Design a Turing machine for the language L={ww | w (a +
b)*}.
1|Page
BTECH
(SEM IV) THEORY EXAMINATION 2023-24
THEORY OF AUTOMATA AND FORMAL LANGUAGES
TIME: 3 HRS M.MARKS: 70
SECTION C
3. Attempt any one part of the following: 7x1=7
a. Construct a DFA corresponding to the following NFA with 𝛜 moves:
2
13
90
2.
_2
24
P2
5.
4E
.5
4. Attempt any one part of the following: 7x1=7
17
P2
a. State Pumping Lemma for Regular Language. Show that the given language
L={ap | Where p is a prime} is not regular. |1
Q
A bAA | aS | a
24
B aBB | bS | b
b. Design a CFG for the following language:
20
BTECH
(SEM IV) THEORY EXAMINATION 2023-24
THEORY OF AUTOMATA AND FORMAL LANGUAGES
TIME: 3 HRS M.MARKS: 70
b. Find the equivalent CFG of the following PDA
P = ({q0, q1,}, {a, b}, {a, z0}, δ, q0, z0) where δ is given by:
δ (q0, a, z0) = (q0, az0)
δ (q0, a, a) = (q1, aa)
δ (q1, a, a) = (q1, ε)
δ (q1, ε, z0) = (q1, ε)
2
13
90
2.
_2
24
P2
5.
4E
.5
17
P2
|1
Q
PM
: 32
31
1:
24
20
g-
Au
1-
|2
3|Page
B.TECH
(SEM IV) THEORY EXAMINATION 2022-23
THEORY OF AUTOMATA AND FORMAL LANGUAGES
Time: 3 Hours Total Marks: 100
Note: Attempt all Sections. If require any missing data; then choose suitably.
SECTION A
2
13
_2
SECTION B
2.
P2
24
2. Attempt any three of the following: 10x3=30
3E
5.
(a) Construct a DFA for ternary number divisible by 4.
.5
(b) Determine the FA accepted by the language described by the regular expression:
P2
(0+1)*0(0+1)*0(0+1)* over the alphabet {0,1} and also mention the accepted language
? 17
Q
|1
(c) Consider the grammar with following production rules:
S→ABD | AC
3
A→aA | bAa |a
:3
B→bbA | aB | AB
27
C→aCa |aD
D→aD | bC
:
i) Church’s Thesis
ii) Recursive and Recursive Enumerable Language
-2
08
SECTION C
5-
State/ Input
A b
Q0 Q1 Q2
Q1 Q4 Q3
Q2 Q4 Q3
Q3 Q5 Q6
Q4 Q7 Q6
Q5 Q3 Q6
Q6 Q6 Q6
Q7 Q4 Q6
(b) State pumping lemma for regular language. Prove that the language L= {ap | p is
prime} is not regular. 90
2
13
_2
5. Attempt any one part of the following: 10x1=10
2.
P2
24
(a) A context free grammar G is given by the following productions:
E→E+E|E-E|E∗E|E^E|N
3E
5.
N→0|1|2|3|4|5|6|7|8|9
.5
P2
n n n
(a) Design a two stack PDA for the language L={a b c | n>=1}
27
M = ({q0, q1}, {0,1} {x, z0}, δ, q0, z0, q1) where δ is given as follows: δ (q0,1, z0) =
13
(q0, xz0)
δ (q0,1, x) = (q0, xx)
3
δ (q0,0, x) = (q0, x)
02
δ (q0, ε, x) = (q1, ε)
-2
δ (q1, ε, x) = (q1, ε)
δ (q1,0, x) = (q1, xx)
08
BTECH
(SEM IV) THEORY EXAMINATION 2021-22
THEORY OF AUTOMATA AND FORMAL LANGUAGES
SECTION A
1. Attempt all questions in brief. 2x10 = 20
Q.no Questions Marks CO
(a) Define Alphabet and String in Automata Theory. 2 2
(b) Give the definition of Deterministic Finite Automaton (DFA). 2 1
(c) Explain in brief about the Kleen’s Theorem. 2 2
(d) Define Context Free Grammar (CFG). 2 1
(e) Write the Context Free Grammar (CFG) for regular expression (0+1)* 2 3
(f) What are Right Linear grammar and Left Linear grammars? 2 3
(g) Discuss briefly about the Push Down Automata (PDA). 2 4
(h) What do you mean by Two stack Pushdown Automata? 2 4
(i) What do you mean by basic Turing Machine Model? 2 5
(j) What do you understand by the Halting Problem? 2 5
32
SECTION B
2
2. Attempt any three of the following: 10x3 = 30
_0
1.
Q.no Questions Marks CO
24
P2
(a) Explain in detail about the Turing Church’s Thesis and Recursively 10 5
5.
Enumerable languages.
2E
.5
(b) Prove that the Compliment, Homomorphism, Inverse Homomorphism, 10 2
P2
|1
(e) Grammar G is given with the production S->aSS A->b. Compute the 10 1
23
string w= aababbb with the Left most and Right most derivation Tree.
:
13
SECTION C
22
BTECH
(SEM IV) THEORY EXAMINATION 2021-22
THEORY OF AUTOMATA AND FORMAL LANGUAGES
32
2
_0
1.
24
P2
5.
2E
.5
Figure A
P2
17
Q
|1
7. Attempt any one part of the following: 10x1 = 10
Q.no Questions Marks CO
8
SECTION A
A
g. Explain Two Stack PDA.
PT
SECTION B
.2
a. Construct a minimum state DFA from given FA
AR
62
M
5.
KU
11
5.
Y
|4
JA
27
VI
7:
R
:5
D
Fig. 1
08
b. Find the regular expression corresponding to the finite automata given bellow:
9
01
-2
ay
M
4-
|1
Fig. 2
P.T.O
Page 1 of 2
SECTION C
3. Attempt any one part of the following: 7x1=7
(a) Design FA for ternary number divisible by 5.
(b) Explain Myhill-Nerode Theorem using suitable example.
A
5. Attempt any one part of the following: 7x1=7
PT
(a) Design the CFG for the following language:
i) L = {0m1n | m ≠ n & m,n ≥ 1}
U
G
ii) L = {albmcn | l + m = n & l,m ≥ 1}
.2
AR
(b) Prove that the following Language L = {anbncn} is not Context Free.
62
M
5.
6. Attempt any one part of the following: 7x1=7
KU
11
R *
(a) Design a PDA for the Language L ={WW | W={a,b} }
(b) Generate CFG for the given PDA M is defined as
5.
Y
|4
M = ({q0, q1}, {0,1} {x, z0}, δ, q0, z0, q1) where δ is given as follows:
JA
δ (q0,0, x) = (q0, x)
R
:5
δ (q0, ε, x) = (q1, ε)
D
δ (q1, ε, x) = (q1, ε)
08
Page 2 of 2
B. TECH
(SEM IV) THEORY EXAMINATION 2017-18
THEORY OF AUTOMATA AND FORMAL LANGUAGES
Time: 3 Hours Total Marks: 70
Note: Attempt all Sections. If require any missing data; then choose suitably.
SECTION A
SECTION B
Fig.1
c. Reduce the given grammar G=({S,A,B},{a,b},P,S) to Chomsky Normal Form.
Where P is defined as:
S→ bA | aB
A→ bAA | aS | a
B → aBB | bS | b
d. What is Push Down Automata (PDA)? Design the PDA for the language
L = {wcwR│w{a,b}*}
e. Define Turing Machine (TM). Construct the TM for the language
L = {anbn│n>0}.
SECTION C
3. Attempt any one part of the following: 7x1=7
(a) Describe Mealy and Moore machines with example. Convert the given Mealy
machine as shown in Fig. 2 into Moore Machine.
Fig. 2
(b) Construct the minimum state automata equivalent to DFA described by Fig. 3
Fig. 3
4. Attempt any one part of the following: 7x1=7
p
(a) State Pumping Lemma for regular sets. Show that the set L={a | p is a prime} is
not regular.
(b) Discuss closure properties i.e. concatenation, union, intersection, complement
of regular languages.
5. Attempt any one part of the following: 7x1=7
(a) Discuss inherent ambiguity of context free languages with suitable example.
Construct the context free grammar that accepts language L={aibjck| i = j or j =
k; i, j, k are positive integers}.
(b) Define parse tree. Find parse tree for the string abbcde considering the
productions-
SaAcBe
AAb
Ab
Bd
Is this ambiguous? Justify.
6. Attempt any one part of the following: 7x1=7
(a) Differentiate between deterministic PDA (DPDA) and non-deterministic PDA
(NPDA) with suitable example. Also discuss two stack PDA with example.
(b) Construct a PDA equivalent to the following CFG productions:
S→aAA, A→aS│bS│a