0% found this document useful (0 votes)
486 views19 pages

Tafl Pyqs

Uploaded by

bishtmanju352
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
486 views19 pages

Tafl Pyqs

Uploaded by

bishtmanju352
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 19

www.aktuonline.

com
Printed Pages : 3 Roll No. ECS403

B.TECH.
THEORY EXAMINATION (SEM–IV) 2016-17
THEORY OF AUTOMATA AND FORMAL LANGUAGES

Time : 3 Hours Max. Marks : 100


Note : Be precise in your answer. In case of numerical problem assume data wherever not provided.

SECTION – A
1. Explain the following: 10 x 2 = 20
(a) Design the DFA that accepts an even number of a’s and even number of b’s.
(b) Consider the DFA given below and identify the L accepted by the machine.
www.aktuonline.com

(c) State the pumping lemma theorem for regular languages.


(d) Convert the FA given below to left linear grammar.

(e) Check whether the grammar is ambiguous or not.


R-> R+R/ RR/ R*/ a / b / c. Obtain the string w = a+b*c
(f) S->aB/bA A->a/aS/bAA B-> b/bS/aBB. Identify the strings obtained from this
grammar.
(g) Define PDA. Draw the graphical representation for PDA.
(h) Design a PDA which accepts set of balanced paranthesis ( { { } } ).
(i) Eliminate unit productions in the grammar. S->A/bb A->B/b B->S/a
(j) What are checking off symbols?

SECTION – B
2. Attempt any five of the following questions: 5 x 10 = 50
(a) (i) Convert the NFA- ε to DFA.
www.aktuonline.com

(ii) Check with the comparison method for testing equivalence of two FA given
below.

(b) Prove that the compliment, homomorphism and inverse homomorphism, closure of a
www.aktuonline.com

regular language is regular.


(c) State and prove kleene’s theorem with an example.
(d) Consider the grammar with the production S->aSS A->b. Compute the string aababbb
with the left most and right most derivation. Draw the derivation tree.
(e) (i) Find out whether the language L = {xnynzn | n ≥ 1} is context free or not.
(ii) Construct a PDA that accepts L = { wwR | w = (a+b)* }
(f) (i) Convert the following CFG into CNF
S → XY | Xn | p
X → mX | m
Y → Xn | o
(ii) Convert the following CFG into CNF S → ASA | aB, A → B | S, B → b | ε
(g) Design a TM to recognize all strings consisting of an odd number of α’s.
(h) Prove that the halting problem is undecidable.

SECTION – C
Attempt any two of the following questions: 2 x 15 = 30
3. (a) Minimize the automata given below
www.aktuonline.com
(b) Compute the epsilon- closure for the given NFA. Convert it into DFA.

4. (a) Construct PDA to accept L= {0n 1n | n > 0}


(b) Construct a PDA from the following CFG.
G = ({S, X}, {a, b}, P, S) where the productions are −
S → XS | ε , A → aXb | Ab | ab

5. (a) Prove that single tape machines can simulate multi tape machines.
(b) Design a TM to recognize all strings consisting of an odd number of α’s.
www.aktuonline.com
Printed Pages:02 Sub Code: NCS402/CS404/ECS403
Paper Id: 110403 Roll No.

B. Tech.
(SEM IV) THEORY EXAMINATION 2017-18
THEORY OF AUTOMATA & FORMAL LANGUAGES
Time: 3 Hours Total Marks: 100
Note: 1. Attempt all Sections. If require any missing data; then choose suitably.

SECTION A

1. Attempt all questions in brief. 2 x 10 = 20


a. Explain the applications and limitations of finite automata.
b. Explain what modifications will be required to transform a Finite Automata
model into Turing machine.
c. What is MyHillNerode theorem? Explain.
d. What is extended transition function*? Explain with example.
e. Give the difference between Mealy and Moore machine.
f. Define and give the difference between positive closure and Kleene closure.
g. What in nondeterministic PDA? Explain with the help of transition function.
h. Give the regular expression for set of all strings over {0,1} containing exactly
three 0’s.
i. Prove or disprove that union and concatenation of two context free languages
is also context free.
j. Explain recursively enumerable languages with example.

SECTION B

2. Attempt any three of the following: 10 x 3 = 30


a. Explain the purpose of following FA:
(q1, a) = q1, q2, (q1, b) = q3, ( q2, a) = q3, q2
q1is initial state and F = {q2, q3}
b. Let the languageof FA given below be L. Determine the FA accepting L(i.e.
Complemented language).
b
a, b a b
A B C D

c. Prove that for all sets (i) ( S  )   S  , (ii) (S+)* =S*


d. Prove that the language L = {anbncn|n≥0} is neither regular nor context free.
e. Explain Church’s Thesis and prove that Halting problem of Turing machine is
undecidable.
SECTION C
3. Attempt any one part of the following: 10 x 1 = 10
(a) Give finite automata for:
i) L = {anb2mc3l | n, m, l  0}.
ii) L = {anb2m | 0 <n <3, m  0}.
(b) Design DFA to accept all string over {0, 1} not ending with 10.

4. Attempt any one part of the following: 10 x 1 = 10


(a) Determine the language generated by grammar
S Sab | aSb | abS| baS| bSa| Sba| aS| a
(b) What is inherent ambiguity? Explain with the help of suitable example.

5. Attempt any one part of the following: 10 x 1 = 10


(a) Determine the grammar for language L = {anbm| n m}. Also explain the type
of this language.
(b) Construct context free grammar G corresponding to following context free
language, then construct PDA corresponding to G
L = { 0 n 12 n | n 1}

6. Attempt any one part of the following: 10 x 1 = 10


(a) Design PDA for language:
L = {s (0, 1)* |number of 0’s and 1’s are not equal in every string of s}.
(b) Construct a Turing machine to accept the language L = {anbncm| m, n 0}.

7. Attempt any one part of the following: 10 x 1 = 10


(a) Explain variations in Turing machine to make it more capable. How Universal
Turing machine can be considered as model of digital computer?
(b) Explain Modified Post Corresponding Problem. Does the following Post
Corresponding Problem have a solution?
A= (101, 100, 10, 0, 010), B = (10, 01, 0, 100, 1)
RCS403

Printed Pages: 02 Sub Code: RCS403


Paper Id: 110257 Roll No.
B TECH
(SEM-IV) THEORY EXAMINATION 2018-19
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

1. Attempt all questions in brief. 2 x 7 = 14


a. For the given language L1 = ε, L2 = {a}, L3 = Ø. Compute L1 L2* U L3*.
b. Design a FA to accept the string that always ends with 101.
c. Write regular expression for set of all strings such that number of a’s divisible
by 3 over Σ = {a,b}
d. Construct the CFG for the Language L = {a2nbn |n>=3}.
e. What do you mean by ε-Closure in FA?
f. Explain Universal TM.
g. Explain Two Stack PDA.
SECTION B

2. Attempt any three of the following: 7 x 3 = 21


www.aktuonline.com

a. Construct a minimum state DFA from given FA

Fig. 1
b. Find the regular expression corresponding to the finite automata given bellow:

Fig. 2

P.T.O

Page 1 of 2

http://www.aktuonline.com
RCS403

c. Convert the following CFG to its equivalent GNF:


S → AA | a, A → SS | b.
d. Design a PDA for the following language:
L = {aibjck | i = j or j = k}
e. Design a TM for the following language:
L = { an+2bn | n >0 }

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.

4. Attempt any one part of the following: 7x1=7


n n
(a) Prove that the following Language L = {a b } is not regular
(b) Explain the Closure properties of regular expression.

5. Attempt any one part of the following: 7x1=7


(a) Design the CFG for the following language:
i) L = {0m1n | m ≠ n & m,n ≥ 1}
www.aktuonline.com

ii) L = {albmcn | l + m = n & l,m ≥ 1}


(b) Prove that the following Language L = {anbncn} is not Context Free.

6. Attempt any one part of the following: 7x1=7


R *
(a) Design a PDA for the Language L ={WW | W={a,b} }
(b) Generate CFG for the given PDA M is defined as
M = ({q0, q1}, {0,1} {x, z0}, δ, q0, z0, q1) where δ is given as follows:
δ (q0,1, z0) = (q0, xz0)
δ (q0,1, x) = (q0, xx)
δ (q0,0, x) = (q0, x)
δ (q0, ε, x) = (q1, ε)
δ (q1, ε, x) = (q1, ε)
δ (q1,0, x) = (q1, xx)
δ (q1,0, z0) = ( q1, ε)

7. Attempt any one part of the following: 7x1=7


(a) Design a TM for the following language:
L = { anbncn | n≥ 1}
(b) Write short note on:
i) Recursive Language and Recursively Enumerable Language.
ii) PCP problem and Modified PCP Problem

Page 2 of 2

http://www.aktuonline.com
ECS403

Printed Pages: 02 Sub Code: ECS403


Paper Id: 110218 Roll No.

B. TECH.
(SEM IV) THEORY EXAMINATION 2018-19
THEORY OF AUTOMATA & FORMAL LANGUAGES
Time: 3 Hours Total Marks: 100
Note: 1. Attempt all Sections. If require any missing data; then choose suitably.

SECTION A

1. Attempt all questions in brief. 2 x 10 = 20


a. Write a regular expression to denote a language L which accepts all the strings
that begin or end with either 00 or 11.
b. Differentiate between FA and PDA.
c. Write the applications of finite automata.
d. How do we determine equivalence of two DFA? Explain with an example.
e. Remove the Unit productions from the following grammar:
S → aSb|A, A → cAd|cd
f. Identify the language generated by context free grammar S → (S)|SS|( )
g. Explain briefly about two stack PDA.
www.aktuonline.com

h. Distinguish between DPDA & NPDA.


i. Differentiate between Recursive & Recursive enumerable languages.
j. Define halting problem of Turing machine.
SECTION B

2. Attempt any three of the following: 10 x 3 = 30


a. Design FA for the following languages containing binary strings:
(i) Having both 00 and 11 as substring.
(ii) Number of 0’s is odd and number of 1’s is multiple of 3.
b. State closure properties of regular languages. Also Prove that regular languages
are closed under intersection and difference.
c. Convert the following PDA into its equivalent CFG.
Transition function is defined as:
δ (q0 , 0, Z 0 ) = {(q0 , 0Z 0 )}
δ (q0 , 0, 0) = {(q0 , 00)}
δ (q0 ,1, 0) = {(q1 ,∈)}
δ (q1 ,1, 0) = {(q1 ,∈)}
δ (q1 ,∈, Z 0 ) = {(q2 ,∈ )}
d. Write the procedure to convert a given CFG into equivalent grammar in CNF.
Apply the procedure and convert the grammar with following production into
CNF: S → bA|aB, A → bAA|aS|a, B → aBB|bS|b
e. Design a Turing machine that accepts Palindromes of binary numbers.

Page 1 of 2

http://www.aktuonline.com
ECS403

SECTION C
3. Attempt any one part of the following: 10 x 1 = 10
(a) Describe Chomsky hierarchy of languages with proper example.
(b) Design an NFA for the language containing strings ending with ab or ba. Also
convert the obtained NFA into equivalent DFA.

4. Attempt any one part of the following: 10 x 1 = 10


(a) State Arden’s theorem and construct regular expression for the following FA
using Arden’s theorem:
State Input
0 1
A {A, B} φ
B C {A, B}
C B φ
A is the initial state and C is Final State

(b)
{ 2

}
Using pumping lemma, prove that the language L = a i | i ≥ 1 is not regular.

5. Attempt any one part of the following: 10 x 1 = 10


www.aktuonline.com

(a) Define Greibach normal form for a CFG. Reduce the following CFG into GNF:
S → AB, A → BS | a, B → SA | b
(b) Let G be the grammar S → 0B|1A, A → 0|0S|1AA, B → 1|1S|0BB
For the string 00110101, find:
(i) The leftmost derivation. (ii) The rightmost derivation. (iii) The derivation
tree.

6. Attempt any one part of the following: 10 x 1 = 10


(a) Construct a PDA to accept the language L = {WcW R | W ∈ (a, b) + } by empty
stack.
(b) Prove that “L is accepted by a PDA M1 by empty store if and only if L is
accepted by a PDA M2 by final state.

7. Attempt any one part of the following: 10 x 1 = 10


(a) Find a PCP solution for the following sets A = {ab, ba, b, abb, a}, B= {aba,
abb, ab, b, bab}

(b) Explain various types of Turing Machines with example.

Page 2 of 2

http://www.aktuonline.com
NCS402

Printed Pages: 02 Sub Code: NCS402


Paper Id: 110248 Roll No.
B TECH
(SEM-IV) THEORY EXAMINATION 2018-19
THEORY OF AUTOMATA & FORMAL LANGUAGE
Time: 3 Hours Total Marks: 100
Note: 1. Attempt all Sections. If require any missing data; then choose suitably.
SECTION A

1. Attempt all questions in brief. 2 x 10 = 20


a. Design a DFA for languages L containing strings of 0 and 1’s where number of
0’s is not divisible by 3.
b. Write regular expression for a language containing strings of 0’s and 1’s
which does not end in ‘01’.
c. State and prove Arden’s Theorem.
d. What are various applications of Finite Automata?
e. What do you mean by inherently ambiguous grammars? Explain.
f. Prove or disprove the following regarding regular expressions:
*
i. ( R + S ) = R* + S *
www.aktuonline.com

* *
ii. ( RS + R ) RS = ( RR* S )
g. Write CFG for language L = anbn where n>=0. Also convert it into CNF.
h. Differentiate DPDA with NPDA.
i. Define Recursive and recursively enumerable language
j. Explain Post Correspondence Problem.
SECTION B

2. Attempt any three of the following: 10 x 3 = 30


a. Define NFA. What are various points of difference between NFA and DFA?

b. What are various points of difference between Moore & Mealy Machine?
Explain the procedure to convert a moore machine into Mealy machine.

c. Define ambiguity. Show that the grammar G with following production is


ambiguous.
S → a | aAb | abSb, A → aAAb | bS

d. Construct a PDA M equivalent to grammar with following productions:


S → aAA , A → aS / bS / a
Also, check whether the string ‘abaaaa’ is in M or not.

e. Define PCP. Let A = {1, 110, 0111} and B = {111, 001, 11} and  = {0, 1}.
Find the solution of PCP.

Page 1 of 2

http://www.aktuonline.com
NCS402

SECTION C
3. Attempt any one part of the following: 10 x 1 = 10
(a) Minimize the following Automata:

(b) Convert the following NFA { p, q, r , s} , {0,1} , δ , p, {q, s} into DFA where δ is
given by
0 1
→p q, s q
*q r q, r
R s p
*s φ p
www.aktuonline.com

4. Attempt any one part of the following: 10 x 1 = 10


(a) Find the regular expression of Given FA using Arden’s theorem.

(b) Using pumping lemma for Regular languages prove that language
2
L = 0n , n >= 1 is not regular.

5. Attempt any one part of the following: 10 x 1 = 10


(a) Convert the following grammar in GNF: S → AB , A → BS / a , B → SA / b
(b) Define derivation Tree. Show the derivation tree for string ‘aabbbb’ with the
following grammar SAB/Є, AaB, BSb.

6. Attempt any one part of the following: 10 x 1 = 10


(a) Design PDA for Language WcW R , W ∈ ( a , b ) *
(b) Design a two stack PDA for the language L = a nb m c n d m where n, m ≥ 1

7. Attempt any one part of the following: 10 x 1 = 10


(a) Design a Turing machine for language containing palindromes of a’s and b’s.
(b) Write short note on any two:
i. Properties of recursive & recursive enumerable languages.
ii. Variants of Turing Machine.
iii. Universal Turing Machine.

Page 2 of 2

http://www.aktuonline.com
Printed Page: 1 of 2
Subject Code: KCS402
0Roll No: 0 0 0 0 0 0 0 0 0 0 0 0 0

BTECH
(SEM IV) THEORY EXAMINATION 2021-22
THEORY OF AUTOMATA AND FORMAL LANGUAGES

Time: 3 Hours Total Marks: 100


Note: Attempt all Sections. If you require any missing data, then choose suitably.

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

SECTION B
2. Attempt any three of the following: 10x3 = 30
Q.no Questions Marks CO
(a) Explain in detail about the Turing Church’s Thesis and Recursively 10 5
Enumerable languages.
(b) Prove that the Compliment, Homomorphism, Inverse Homomorphism, 10 2
and Closure of a Regular Language is also Regular.
(c) Give the Complete description about the Chomsky Hierarchy. 10 3
(d) Convert the grammar S  aAA, A  a |aS| bS to a PDA that accepts 10 4
the same language by Empty stack.
(e) Grammar G is given with the production S->aSS A->b. Compute the 10 1
string w= aababbb with the Left most and Right most derivation Tree.

SECTION C
3. Attempt any one part of the following: 10x1 = 10
Q.no Questions Marks CO
(a) Write short notes on following. 10 5
i) Turing Machine as Computer of Integer Functions
ii) Universal Turing machine
(b) Explain in detail about the Pumping Lemma and application of 10 2
Pumping Lemma for Regular Languages.

4. Attempt any one part of the following: 10x1 = 10


Q.no Questions Marks CO
(a) Construct a Non Deterministic Finite Automation (NFA) for the 10 1
language L which accepts all the strings in which the third symbol
from right end is always 'a' over  = {a, b}.
(b) Explain in detail about the Myhill-Nerode theorem using suitable 10 3
example.
Printed Page: 2 of 2
Subject Code: KCS402
0Roll No: 0 0 0 0 0 0 0 0 0 0 0 0 0

BTECH
(SEM IV) THEORY EXAMINATION 2021-22
THEORY OF AUTOMATA AND FORMAL LANGUAGES

5. Attempt any one part of the following: 10x1 = 10


Q.no Questions Marks CO
n n
(a) Prove that the following Language L = {a b : n>=0} is not a regular 10 4
language.
(b) Design a Turing Machine for the language L. Where, L={anbncn| n≥1} 10 5

6. Attempt any one part of the following: 10x1 = 10


Q.no Questions Marks CO
(a) Prove that the Compliment, Homomorphism, Closure and Inverse 10 2
Homomorphism of a Regular language is also Regular.
(b) Minimize the given DFA shown below (Figure A). 10 1

Figure A

7. Attempt any one part of the following: 10x1 = 10


Q.no Questions Marks CO
(a) Explain in detail about the following. 10 4
i) Closure properties of Regular Languages
ii) Decidability- Decision properties of Regular Languages
(b) Check whether the grammar is ambiguous or not. 10 3
R-> R+R/ RR/ R*/ a / b / c. Obtain the string w = a+b*c
Printed Pages:02 Sub Code:KCS-402
Paper Id: 238248 Roll No.

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

1. Attempt all questions in brief. 2 x 10 = 20


(a) What do you understand by grammar?
(b) What do you mean by ε-Closure in FA?
(c) State Arden’s Theorem.
(d) State Kleen’s Theorem.
(e) Derive the CFG for (a+b)*.
(f) Explain Chomsky Hierarchy.
(g) Explain pumping lemma for context free language.
(h) Draw the graphical representation for PDA.
(i) Explain Halting Problem of Turing Machine.
(j) Explain Linear bounded Automata.
90

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
33

A→aA | bAa |a
B→bbA | aB | AB
7:

C→aCa |aD
:2

D→aD | bC
Convert the above grammar into Chomsky Normal Form.
13

(d) Design a PDA for the language L= {WWT | W= (a+b)* }


3

(e) Write short notes on:


02

i) Church’s Thesis
ii) Recursive and Recursive Enumerable Language
-2
08

SECTION C
5-

3. Attempt any one part of the following: 10x1=10


|0

(a) Construct a DFA equivalent to the NFA

QP23EP2_290 | 05-08-2023 13:27:33 | 117.55.242.132


(b) Construct a minimum state automata equivalent to a DFA whose transition table is
as follows where q3 and q4 are final state.

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

4. Attempt any one part of the following: 10x1=10


(a) Find the regular expression corresponding to the finite automata given below:

(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

Determine whether the grammar G is ambiguous or not.If ambiguous then construct


an unambiguous grammar equivalent to G.
17
Q

(b) Explain Closure properties of regular language.


|1
33

6. Attempt any one part of the following: 10x1=10


n n n
7:

(a) Design a two stack PDA for the language L={a b c | n>=1}
(b) Generate CFG for the given PDA M is defined as
:2

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

δ (q1,0, z0) = ( q1, ε)


5-
|0

7. Attempt any one part of the following: 10x1=10


(a) Design a Turing Machine for the language:
L={an bncn | n>=1}
(b) Write short notes on:
(i) Variants of Turing Machine
(ii) Post Correspondence problem
(iii) Universal Turing Machine

QP23EP2_290 | 05-08-2023 13:27:33 | 117.55.242.132

You might also like