0% found this document useful (0 votes)
140 views

Formal Language and Automata Theory: Group - A (Multiple Choice Question)

The document contains multiple choice and short answer questions related to formal languages and automata theory. Some of the questions covered in the document include: 1. Identifying which strings are generated by a given grammar. 2. Determining which non-terminals a symbol is part of the follow set for. 3. Properties of regular sets and operations on regular and context-free languages. 4. Differences between Moore and Mealy machines and constructing equivalent machines. 5. Properties of deterministic and non-deterministic finite automata including pumping lemma. 6. Converting between regular expressions and finite automata. 7. Defining pushdown automata and context-free grammars.

Uploaded by

Shounak Chandra
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)
140 views

Formal Language and Automata Theory: Group - A (Multiple Choice Question)

The document contains multiple choice and short answer questions related to formal languages and automata theory. Some of the questions covered in the document include: 1. Identifying which strings are generated by a given grammar. 2. Determining which non-terminals a symbol is part of the follow set for. 3. Properties of regular sets and operations on regular and context-free languages. 4. Differences between Moore and Mealy machines and constructing equivalent machines. 5. Properties of deterministic and non-deterministic finite automata including pumping lemma. 6. Converting between regular expressions and finite automata. 7. Defining pushdown automata and context-free grammars.

Uploaded by

Shounak Chandra
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/ 5

FORMAL LANGUAGE AND AUTOMATA THEORY

CS 402
Group – A

(Multiple Choice Question)

1. Choose the correct alternative –


i) A grammar has the following production:
S -> aSSb | a | bSa
Which of the following sentences are in the language that is generated by this
grammar?
a) aaaaabb c) bbbaabbaa

om
b) aabbaabb d) All of these
ii) Take a look at the following grammar:
S -> AaC | Bd
A -> BC
B -> bB | C
t.c
C -> accS |
For which non-terminals N is symbol a part of the collection follow N ? Give the best
answer.
bu
a) { A }
b) { A, C }
c) { A, B, C }
yw

d) { A, B, C, S }
iii) Let R1 and R2 be regular sets defined over alphabet then
a) R1 R2 is not regular
m

b) R1 R2 is regular
c) R2 is not regular
d) R2 * is not regular
iv) The intersection of CFL and regular language
a) is always regular
b) is always context-free
c) both (a) & (b)
d) need not be regular
v) Moore machine output depends on
a) input
b) input and present state
c) present state
d) none of these
vi) Let = { 0, 1 }. The number o fpossible strings of length n that can be formed by the
element of set is
a) n
b) n2
c) nn
d) 2n
vii) DFA has
a) a single final state
b) more than one initial state
c) a unique path to the final state for a set of inputs
d) all of thsese
viii) Pumping lemma is generally used for proving that
a) a given grammar is regular
b) a given grammar is not regular

om
c) a given grammar is context sensitive
d) a given grammar is context free
ix) If Q be the number of states in NDFA, then equivalent DFA can have maximum number
of states
a) Q
t.c
b) Q – 1
c) 2Q
bu
d) 2Q – 1
x) a* (a + b)* is equivalent to
a) a* + b*
b) (ab)*
yw

c) a*b*
d) none of these
m

Group – B

(Short Answer Type Questions)

2. a) State pumping Lemma for regular language.


b) Using this Lemma prove that L = { anbn | n is not regular.

3. Consider the following machine :


a) Draw the testing table
b) Draw the testing graph.
c) Use connection matrix to determine or not it has a finite memory.

om
d) If it does, find the order of finite memory with justification.
4. a) What is ambiguous grammar?
b) Check whether the following grammar is ambiguous:
S -> iCtS | iCtSeS | a t.c
C -> b
5. Show that L = { 0n 1n | n 1} is not regular.
6. What is the basic difference between Mealy machine and Moore machine? Construct a Mealy
machine which is equivalent to the Moore machine given below:
bu
yw
m
Group – C

(Long Answer Type Questions)

7. a) What do you mean by k-equivalent? Why any two final states 0-quivalent and any two non-
final states are 0-equivalent?
b) Construct the minimum state equivalent DFA for the following DFA.

om
t.c
c) Find a grammar generating L = { an bn cj | n 1, j 0}
bu
8. a) State and prove Arden’s Theorem.
b) Prove that
( 1 + 00* 1) + ( 1 + 00* 1) ( 0 + 10* 1) * ( 0 + 10* 1) = 0* 1 ( 0 + 10* 1)*
yw

c) Find the regular expression for the given transition diagram:


m

9. a) Find a reduced grammar equivalent to the grammar S -> aAa, A -> bBB, B - > ab, C -> aB.
b) Construct a regular grammar G generating the regular set represented by
P = a*b (a + b)*
c) Find the regular expression corresponding to the following figure:
om
10. a) Define Pushdown Automata. Discuss with an example.
b) Find if the string aaa bbb ccc can be derived from the productions.
S -> ABSc, S -> Abc, BA -> AB, Bb -> bb, Ab -> ab, AA -> aa
t.c
c) Design a PDA which accepts the language
L = { W (a,b)* | W has equal no. of a & b}
bu
11. Design a two-input, two-output sequence detector, which produces an output of 1 every time
the sequence 0101 is detected an output of 0 at all other times. Draw the circuit diagram using
gates.
yw
m

You might also like