Cse - CS403 - Formal Language and Automata Theory - R16

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

B.TECH.

/ CSE / R16 / EVEN / SEM-4 / CS403 / 2020-2021

FORMAL LANGUAGE AND AUTOMATA THEORY


CS403
TIME ALLOTTED: 3 HOURS FULL MARKS: 70

The figures in the margin indicate full marks.


Candidates are required to give their answers in their own words as far as practicable

GROUP – A
(Multiple Choice Type Questions)
1. Answer any ten from the following, choosing the correct alternative of each question: 10×1=10

Marks CO No.

(i) The set of all strings over ∑ = {a,b} in which all strings having bbbb as 1 2
substring is
(a) (a+b)* bbbb (a+b)*
(b) (a+b)* bb (a+b)*bb
(c) bbbb (a+b)*
(d) bb (a+b)*

(ii) While applying Pumping lemma over a language, we consider a string 1 2


w that belong to L and fragment it into _________ parts.
(a) 2
(b) 5
(c) 3
(d) 6

(iii) Fill in the blank in terms of p, where p is the maximum string length in 1 2
L.
Statement: Finite languages trivially satisfy the pumping lemma by
having n = ______
(a) p*1
(b) p+1
(c) p-1
(d) None of the mentioned

(iv) Which of the functions are not performed by the turing machine after 1 4
reading a symbol?
(a) Writes the symbol
(b) Moves the tape one cell left/right
(c) Proceeds with next instruction or halts
(d) None of the mentioned

Page 1 of 5
B.TECH. / CSE / R16 / EVEN / SEM-4 / CS403 / 2020-2021

(v) How many sub strings of different lengths (non-zero) can be found 1 2
formed from a character string of length n?
(a) n
(b) n2
(c) 2n
(d) n(n+1)/2

(vi) Which of the production rule can be accepted by Chomsky grammar? 1 2


(a) A->BC
(b) A->a
(c) S->e
(d) All of the mentioned

(vii) Let S and T be language over ={a,b} represented by the regular 1 1,3
expressions (a+b*)* and (a+b)*, respectively. Which of the following is
true?
(a) ScT (S is a subset of T)
(b) TcS (T is a subset of S)
(c) S=T
(d) SnT=Ø

(viii) Let L denotes the language generated by the grammar S – OSO/00. 1 1,3
Which of the following is true?
(a) L = O
(b) L is regular but not O
(c) L is context free but not regular
(d) L is not context free

(ix) There exists a language L. We define a string w such that w∈L and 1 2
w=xyz and |w| >=n for some constant integer n.What can be the
maximum length of the substring xy i.e. |xy|<=?
(a) n
(b) |y|
(c) |x|
(d) none of the mentioned

Page 2 of 5
B.TECH. / CSE / R16 / EVEN / SEM-4 / CS403 / 2020-2021

(x) If we select a string w such that w∈L, and w=xyz. Which of the 1 2
following portions cannot be an empty string?
(a) x
(b) y
(c) z
(d) all of the mentioned

(xi) If L1 and L2 are context free language and R a regular set, then which 1 1,3
one of the languages below is not necessarily a context free language?
(a) L1 L2
(b) L1 ∩ L2
(c) L1 ∩ R
(d) L1 ∪ L2

(xii) The set of all strings over the alphabet S = {a, b} (including e) is 1 1,3
denoted by
(a) (a + b)*
(b) (a + b)+
(c) a+b+
(d) a*b*

GROUP – B
(Short Answer Type Questions)
Answer any three from the following: 3×5=15

Marks CO No.

2. Convert the following NFA to DFA 5 1

3. Check whether is context free or not. 5 2

4. If G = ({S}. {0, 1}. {S → 0S1, S→0/1}, S). find L(G). 5 3

5. Write one CFG for the regular language corresponding 5 1


to the Regular Expression 00*11*

6. What is the deterministic Context Free Language? Describe with 5 2


example.

Page 3 of 5
B.TECH. / CSE / R16 / EVEN / SEM-4 / CS403 / 2020-2021

GROUP – C
(Long Answer Type Questions)
Answer any three from the following: 3×15=45

Marks CO No.

7. (a) What are the differences between Finite Automata and Push Down 2 1
Automata?

(b) What do you mean by epsilon-NFA? Compare DFA, NFA and epsilon- 5 3
NFA.

(c) What do you mean by Transition Table? Consider the following 8 3


Expression: . Draw the DFA Diagram and Transition Table.

8. (a) Explain Pumping’s Lemma for CFL 5 2

(b) Draw Merger graph and merger table for following machine 7 2

(c) Convert the following Mealy Machine to an equivalent: Moore 3 1,2


Machine

9. (a) Construct a PDA to accept L = { WWR|W belongs to (a,b)* and 5 3


WR is reverse string of W } by empty stack and final state.

(b) Design a PDA for accepting a language {anb2n | n>=1}. 5 3

(c) Explain the tuples of PDA. How does PDA determine the acceptance of 5 2
CFL?
Page 4 of 5
B.TECH. / CSE / R16 / EVEN / SEM-4 / CS403 / 2020-2021

10. (a) What is grammar? Explain different types of grammar. 5 3

(b) Convert the following grammar in CNF 10 3


E→E+E/E*E/Eb/a N= { E}, T={ a, +, *, b}

11. (a) Design of Turing Machine for L(G)= anb2n n 1 5 4

(b) Derive the String accepted by given transition system 5 1

(c) Design of Turing Machine for L(G)= anb2n n 1 5 4

Page 5 of 5

You might also like