0% found this document useful (0 votes)
28 views7 pages

Cseds: Formal Language and Automata Theory

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)
28 views7 pages

Cseds: Formal Language and Automata Theory

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/ 7

GITA AUTONOMOUS COLLEGE, BBSR

(Affiliated to BPUT, Odisha)


Question Bank
B.Tech
Branch-CSE,CSEAI,CSEDS
Subject: Formal Language and Automata Theory

Part – I Module BL CO PO
Short Answer Type Questions
1 Define DFA. 1 1 1 1
2 Define Arden’s Theorem. 2 1 2 1
Define and difference between ε – NFA & NFA 1 1 1
3 1
with suitable example.
4 Define Kleene Closure Operation with example. 1 1 1 1
5 Design a DFA for the language L= {000,111} 1 3 1 3
Design a ε – NFA for regular expression a*b* 3 1 3
6 1
over the alphabet {a,b}.
7 Define ε – Closure of a state. 1 1 1 1
Construct a NFA for the language L= {x is a 3 1 3
8 string starts with a and ends with b}, over the 1
alphabet set {a,b}
Find the ε – closure of all the states,

9 1 2 1 1

Design a DFA for the language L= {x| x is a


10 1 2 1 1
string that ends with bb}
11 Define Kleen’s theorem. 2 1 2 1
Check whether the following language is regular
12 or not- 2 2 2 1
L={anbn| n>=2}
Check whether the string “ab” is a member of the
language L1 or not. The grammar for the language
is
13 S-> AB 3 2 3 1
A->A
B->b

14 State the Pumping Lemma for CFL 4 1 4 1


15 Define ambiguity in CFG. 3 2 3 1
Consider the grammar-
S → bB |aA
16 3 2 3 1
A → b |bS |aAA
B → a |aS |bBB
For the string w = bbaababa, find-
1. Leftmost derivation
2. Rightmost derivation
3. Parse Tree

Consider the grammar-


S → A1B
A → 0A |∈
B → 0B |1B | ∈
17 3 2 3 1
For the string w = 00101, find-
1. Leftmost derivation
2. Rightmost derivation
3. Parse Tree

Define and differentiate between DPDA and


18 NPDA. 4 1 4 1

19 State the Pumping Lemma for regular language 2 1 2 1

20 Define Lc when L={ab,ba,aaa},alphabet set={a,b} 1 2 1 1

What is trap state in DFA, why it is needed 1 1 1


21 explain with example. 1

Prove the following line “Unreachable states are 2 1 1


22 unnecessary in FSM” 1

Differentiate between NFA and DFA with 2 1 1


23 reference to same language. And explain who is 1
the minimized FSM and why?

24 How to check the infiniteness of FSM? 1 2 1 1

Find out the language accepted by the following


automata using Arden’s theorem.

25 2 1 2 1

Find out the grammar correspondence to this


26 language(L)= {an | n>=1} 3 1 3 1

Consider the finite automata transition table


shown below with initial and final state = q0

States Inputs
27 1 3 1 1
0 1

q0 q2 q1
q1 q3 q0
q2 q0 q3
q3 q1 q2

Find the language accepted by the finite


automata.
28 State the definition of Pushdown automata. 4 1 4 1
29 State the definition of Turing machine. 4 1 4 1
30 What is DCFL explain with example. 4 1 4 1
31 What is Chomsky normal form? 3 1 3 1
32 Define a TM. 4 1 4 1
33 What is universal TM 4 1 4 1
34 Define Ackermann Function. 5 1 5 1
35 Give two examples of undecidable problem. 5 1 5 1
36 Differentiate the + closure and * closure 1 1 1 1
37 What is the difference between P and NP? 5 1 5 1
38 Give two example of NP complete problems. 5 1 5 1
39 Give two examples of NP hard algorithms. 5 1 5 1
40 State Chruch-Turing hypothesis. 5 1 5 1
Differentiate between Recursive enumerable set 1 5 1
41 5
and Recursive language
Differentiate between Deterministic TM and non- 1 4 1
42 4
Deterministic TM.
43 What is GNF? 3 1 3 1
44 Define multi-tape TM. 4 1 4 1
45 Define Godel Encoding system with example. 5 1 5 1
46 What is nullable symbol in a grammar. 3 1 3 1
47 What is unit production. 3 1 1
48 Who are useless symbols in a grammar, explain 3 1 3 1
with example.
Design a FSM over the alphabet set {a,b} for the 1 1 1
49 1
language L = Ø.
50 List the closure properties of Regular Languages 2 1 2 1
Check whether the following languages are
regular or not
51 L1={ab,aa,bb,ba} 2 2 2 1
L2= {ap | p is prime number}

Part – II Module BL CO PO
Focussed – Short answer type Questions
Design a DFA for the language L= {x| x is a 3 1 3
1. string starts with a only}, over the alphabet set 1
{a,b}.
Design a PDA for the language L= {a2n.b. cn | 3 1 3
2. 1
n>=0}
Construct a DFA equivalent to given NFA.

3. 1 3 1 3
Find the ε – NFA for regular expression 0(0* + 2 2 2
4. 2
1)1*.
Draw a DFA for the language L= {111, 101, 110}
5. 1 3 1 3
and then convert it into universal DFA
Find the ε – NFA for regular expression 2 2 2
6. 2
(a*+b*+c*)*
Construct a NFA for regular expression (0+1) * 3 2 3
7. 2
(011).
Describe all the algebraic property of regular 2 2 1
8. 2
language.
Design a ε – NFA for regular expression 10(0+1) 3 2 3
9. 2
* over the alphabet {0,1}.
10 Define emptiness of FA with examples. 2 1 2 3
Check whether the following language is regular 2 2 1
11 or not- 2
L={anbn | n>=2}
Define the N. Chomsky hierarchy of languages, 2 3 1
12 3
and machines.
Check for the ambiguity in the grammar
E→ E+E
13 3 2 3 2
E → E*E
E→a
Define and describe the various types of grammar
and find out the highest type of the following
grammar
14 3 2 3 2
A → Ba
B→a

15 Define and describe all the properties of CFL 4 1 4 2


Design a PDA for L= {w| w is any string from
16 4 3 4 3
(a,b)* }
17 Define Mealy and Moore machine. 1 1 1 1
Consider the following grammar for list
structures:
S→ a|^|(T)
18 T→ T,S|S 3 2 3 2
Find left most derivation, rightmost derivation
and parse tree for (((a,a),^(a)),a)

19 Design a PDA for L= {w| wcwr , w belongs to 4 3 4 3


(a,b)* }
Find out the Godel encoding of the following-
(a) 1000100
20 (b) 1000111 5 2 5 2
(c) 1001100
(d) 1100100
Design the PDA for the following language
21 4 3 4 3
L= {ai.bj.ck | j=i+k and i, j,k>=0}
Design the PDA for the following language
22 4 3 4 3
L= {am.bn.cp.dq | m=p,n=q and m,n,p,q>=0}
Design the PDA for the following language
23 4 3 4 3
L={an.b2n| n>=0}
24 What is left and right recursive grammar? 3 2 3 2

Let G be the grammar


S→ aB|bA
25 A→ a|aS|bAA 3 2 3 2
B→ b|bS|aBB
for the string baaabbabba. Find leftmost derivation,
rightmost derivation and parse tree.
Consider the CFG G=({S,T,C,D},{a, €,c,d}, S,
P}where P is:

S→ cCD|dTC|€
C→ aTD|c
T→ cDC|cST|a
26 D→ dC|d 4 2 4 2
Present a PDA that accepts the language
generated by this grammar. Your PDA must
accept by empty store, it must start with S on its
stack, and it must be based on the above
grammar.

Find the context free languages for the following


grammars.
S→ aSbS|bSaS| ε
27 S→ aSb|aAb 4 2 4 2
A→ bAa,
A→ ba

Find the PDA equivalent to the given CFG with


the following productions
28 S→ A, A→ BC, B→ ba, C→ ac 4 2 4 2
S→ aSb|A, A→ bSa|S| ε

Construct minimized automata for the following


automata to define the same language.
a b
q0 q1 q0
q1 q0 q2
q2 q3 q1
29 *q3 q3 q0 1 2 1 2
q4 q3 q5
q5 q6 q4
q6 q5 q6
q7 q6 q3

q0=initial state
30 Convert the R.E. = (a|b)* into DFA 1 2 1 3
Construct CFG, G=({S,A,B}, {a,b},P,S) with
production set P as

S→ aAbB
31 3 2 3 3
A→ Ab|b
B → Ba|a

to CNF
32 Prove that L = {ww | w ∈ {0, 1}*} is not regular. 2 2 2 2
Part – III Module BL CO PO
Long Answer type Questions
Design a DFA over the alphabet {0,1} to accepts
1 1 3 1 3
all the string ends with 1.
Design a DFA over the alphabet {a,b} to accepts
2 1 3 1 3
a language L ={a, aa, aaa ,…}
Convert FA to Regular Expression.

3 2 3 2 2

Design a DFA over the alphabet {a,b} to accepts


4 1 3 1 3
all the string ends with b.
Check whether the following two DFAs are
equivalent or not?

5 2 2 2 2

6 Design the TM for the language L={an.b|n>=0} 4 1 4 1


Covert the following epsilon-nfa to nfa-

7 1 2 1 3

Convert the NFA with ε transition into its


equivalent DFA.

8 1 2 1 3

Minimize the dfa

9 1 3 1 3

Check whether the string “cbba” is a member of


the language L1 or not. The grammar for the
10 3 2 3 3
language is
S→ AB
A→ a|c|CC
B→ b|BC
C→ CB|BA|c
Convert the following CFG to CNF
11 4 2 4 3
A→ #A | [A] | p | q | z
Check whether the following language is CFL or
12 4 2 4 3
not L= {an.bn.cn | n>=0}
Define Ackermann Function, find out the
value of the following-
13 5 2 5 3
A(2,3)
A(1,3)
What is Post Correspondence Problem (PCP)?
Check whether any solution exist to the given
14 instance- 5 2 5 3
[a,aa],[bb,b],[a,bb]
[a,ab],[ba,aba],[bba,b]
Design a TM for finding the complement of any
15 4 3 4 3
binary number
Design a PDA for even length palindrome string
over the alphabet set {a,b,c} and trace the string
16 4 3 4 3
aaabcbaaa
aaabcaaab
Design the PDA for the following languages
17 L1={ai.bj.ck | k=i+j and i,j,k>=0} 4 3 4 3
L2={am.bn.cp.dq | m+n=p+q and m,n,p,q>=0}
Consider the following the CFG
A->0A1
A->B
18 4 3 4 3
B->#
Find out the PDA corresponds to this grammar
and trace the acceptance of the string 00#11.
Draw a DFA for accepting all the strings the ends
19 1 2 1 3
with bbb over the alphabet set={a,b}
Design a NFA for the language L={a, ab, aab ,
20 aaab, …} and convert it into its corresponding 1 3 1 3
DFA

You might also like