0% found this document useful (0 votes)
212 views2 pages

Theory of Automata and Formal Languages (KCS-402) Online Assessment-II B.Tech CS-4 Semester

This document contains an assessment for an automata and formal languages theory course. It has three parts with multiple choice and descriptive questions. Part A contains three multiple choice questions about grammars, finite automata, and deterministic context-free languages. Part B contains three descriptive questions about proving a language is not context-free, constructing a pushdown automaton for a grammar, and providing an example of how finite automata can model real-world problems. Part C also contains three descriptive questions about the subset construction for nondeterministic finite automata, ambiguity in grammars, and eliminating left recursion from a context-free grammar and providing a transition table for a top-down parser.

Uploaded by

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

Theory of Automata and Formal Languages (KCS-402) Online Assessment-II B.Tech CS-4 Semester

This document contains an assessment for an automata and formal languages theory course. It has three parts with multiple choice and descriptive questions. Part A contains three multiple choice questions about grammars, finite automata, and deterministic context-free languages. Part B contains three descriptive questions about proving a language is not context-free, constructing a pushdown automaton for a grammar, and providing an example of how finite automata can model real-world problems. Part C also contains three descriptive questions about the subset construction for nondeterministic finite automata, ambiguity in grammars, and eliminating left recursion from a context-free grammar and providing a transition table for a top-down parser.

Uploaded by

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

Theory of Automata and Formal Languages(KCS-402)

Online Assessment-II
B.Tech CS-4th Semester

Attempt Questions in all Sections

Part A: (3*5=15)
1. What set is generated by the following grammar? [CO2]
S  bS | Sa | aSb |ԑ
Give proof.
2. Give dfa’s for the languages: [CO1]
5 4
a. L={ab wb : wԑ{a,b}*}
b. L={w1abw2:w1ԑ{a,b}*,w2ԑ{a,,b}*}
3. Give an example of a deterministic context free language whose reverse is not
deterministic. [CO2]

Part B (3*10=30)
1. Show that the language L=anbjanbj: n>=0,j>=0} is not context free grammar. [CO2]
2. Construct the NPDA corresponding to the grammar [CO2]
SaABB|aAA
AaBB|a
BbBB|A
3. “Finite automata is also suited for real world problem.” Justify your answer with suitable
example. [CO4]

Part C (3*10=30)
1. How we can eliminate the nondeterminism of a finite automata using the subset
construction, illustrate it for given NFA M=(Q,{a,b},0,δ,F) as below [CO1]

2. If G is a context-free grammar, then for every x ∈ L(G), these three statements are
equivalent:
1. x has more than one derivation tree.
2. x has more than one leftmost derivation.
3. x has more than one rightmost derivation.
On the basis of above statement how we define ambiguity of a grammar. Are the given
productions Sa|S+S|S*S|(S) having similarity or difference from dangling else
problem. Justify it. [CO4]
3. Consider the CFG with productions [CO3]
SS1$
S1S1+T|T
TT*F|F
F[S1]|a
a) Write the CFG obtained from this one by eliminating left recursion
b) Give a transition table for a DPDA that acts as a top down parser for this language.

You might also like