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

B TECH

MODEL PAPER-1
THEORY OF AUTOMATA AND FORMAL LANGUAGE (BCS-402)
----------------------------------------------------------------------------------------------------------------------------------
Note: Attempt all Sections. If require any missing data; then choose suitably.

SECTION-A
1. Attempt all questions in brief. 2 x 10 = 20
Q no. Question Marks CO
a. What are the different representational techniques of finite automata? 2 1
b. What do you understand by grammar? 2 1
c. Differentiate between DFA and NFA. 2 2
d. What do you mean by ε-Closure in FA? 2 2
e. What do you understand Ambiguity in CFG? 2 3
f. State Arden’s Theorem. 2 4
g. Discuss Turing thesis. 2 5

SECTION-B
2. Attempt any three of the following: 10 x 3 = 30
Q no. Question Marks CO
a. Construct a DFA for ternary number divisible by 4 7 1

b. Write the regular expression for the following language: 7 2


i) L= {abnw : n≥3,w€(a,b)+}
ii) L= { anbm : (n+m) is even}
c. Determine the FA accepted by the language described by the regular expression: 7 3
(0+1)*0(0+1)*0(0+1)* over the alphabet {0,1} and also mention the accepted language ?
d. Construct a PDA accepting the set of all strings over {a,b} with equal number of 7 4
a’s and b’s.
e. Design a PDA for the language L= {WWT | W= (a+b)* } 7 5

SECTION C
3. Attempt any one part of the following: 10 x 1 = 10
a. Construct a Moore machine which is equivalent to the Mealy machine M given 7 1
below:

Present State Next State


a=0 a=1
State Output State Output
→q1 q1 1 q2 0
q2 q4 1 q4 1
q3 q2 1 q3 1
q4 q3 0 q1 1
b. Construct a minimum state automata equivalent to a DFA whose transition table is as 7 1
follows where q3 and q4 are final state.

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

Q no. Question Marks CO


a. Find the regular expression corresponding to the finite automata given below: 7 2

b. Give regular expression for the following languages on { a,b,c} 7 2


All the strings containing exactly one “a”
All the strings containing no more than three a’s

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

Q no. Question Marks CO


a Explain Closure properties of regular language. 7 3
b. What do you mean by ambiguity in a grammar? Show that the grammar given 7 3
below is ambiguous. S→a| abSb | aAb, A→bS | aAAb.

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


Q no. Question Marks CO
a. Generate CFG for the given PDA M is defined as 7 4
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, ε)
b. Construct a PDA equivalent to the following CFG: S→0BB, B→0S | 1S | 0. Test 7 4
whether 0104 is in N (A).

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


Q no. Question Marks CO
a. Explain the basic model of a turing machine and design the turing machine that 7 5
can accept the following language.
L = {anb2n | n ≥1}
b. Design a Turing Machine for the language: 7 5
L={an bncn | n>=1}

You might also like