Sem QB
Sem QB
ii) State and Prove the theorem of Mathematical Induction (5) BTL-3 Apply
2. i) State and Prove any two closure properties of Regular
Languages. (5) CO1 BTL-4 Analyze
4.
Construct the DFA for the given NFA. (13)
States/Input
CO1 BTL-2 Understand
0 1
q0 {q0,q1} {q2}
q1 {q0} {q1}
*q2 ɸ {q0,q1}
5. i) Explain the theorem for Pumping Lemma for regular BTL-3 Apply
language (7)
CO1
n m m+n
ii)Prove that the language L={0 1 2 /n>=1, m>=1} is BTL-3 Apply
not regular. (6)
UNIT-II
GRAMMARS
Grammar Introduction: Types of Grammar, Context Free Grammars and Languages, Derivations,
Simplification of CFG: Elimination of Useless Symbols Simplification of CFG: Unit productions, Null
productions, Chomsky normal form, Greibach Normal form – Pushdown Automata-phases of a compiler
– lexical analysis
PART-A
1. Write a Context Free Grammar for the language consisting of CO2 BTL-4 Analyze
equal number of a’s and b’s
2. Write CFG to accept the language defined by, L={aibjck|i,j,k>=0 CO2 BTL-4 Analyze
and i=j+k}
3. When do you say a CFG is ambiguous? CO2 BTL-1 Remember
4. What are the two normal forms of CFG? Write their CO2 BTL-2 Understand
production format.
5. State Chomsky normal form theorem. CO2 BTL-1 Remember
6. What is ambiguous grammar? Give example CO2 BTL-1 Remember
7. Define PDA CO2 BTL-1 Remember
8. What do you mean by null production and unit production? CO2 BTL-1 Remember
Give an example
9. Does a pushdown automata has memory? Justify CO2 BTL-3 Apply
10. Derive a string ‘aababa’ for the following Context Free CO2 BTL-3 Apply
Grammar
SaSX/b;
XXb/a
11. Give the steps to eliminate useless symbol. CO2 BTL-3 Apply
12. What is the role of lexical analysis phase? CO2 BTL-1 Remember
PART -B &C
1. Solve the following grammar CO2 BTL-5 Evaluate
SaAa | bBb | BB
AC
BS|A
CS | ε for the string abaaba. Give
i)Left most derivation (3)
ii)Right most derivation (3)
iii)Derivation Tree (3)
iv)For the string abaabbba, find the right most derivation (4)
2. Explain simplification of CFG with example. (13) CO2 BTL-3 Apply
ii) State and prove Greibach Normal form (8) BTL-3 Apply
4. i) Construct PDA for the language{WCWR/WЄ{0,1}} (5) CO2 BTL-3 Apply
ii) Discuss the role of lexical analyzer in detail with necessary BTL-3 Apply
example (8)
5. i) Express a PDA for the language anbman+m (6) CO2 BTL-2 Understand
ii) Construct PDA for the language L={anbn | n>=0} BTL-3 Apply
6. Express the following grammar G into Greibach Normal CO2 BTL-1 Remember
Form(GNF) (13)
SXA | BB
Bb | SB
Xb
Aa
7. Explain the phases of compiler with neat diagram (13) CO2 BTL-2 Understand
UNIT-III
5. Discuss the following in detail about the syntax directed CO4 BTL-2 Understand
Definitions.
i)Inherited attributes and synthesized attributes (7)
ii) Evaluate SDD of a parse tree (6)
UNIT-V
UNDECIDABILITY
Undecidability: Basic definitions – Decidable Problems – Examples of undecidable problems – Semi-
decidability – Rice’s Theorem, problems about Turing Machine – Post’s Correspondence Problem –
Properties of Recursive and Recursively enumerable languages.
PART-A
1. State Post’s Correspondence Problem CO5 BTL-1 Remember
2. What are recursive languages? CO5 BTL-2 Understand
3. Define NP-class CO5 BTL-1 Remember
4. State when a problem is said to be decidable and give an CO5 BTL-1 Remember
example of an undecidable problem.
5. What do you mean by Universal Turing Machine? CO5 BTL-1 Remember
6. Describe an example of Undecidable problem CO5 BTL-1 Remember
7. Illustrate about time and space complexity of TM CO5
8. Describe Post Correspondence Problem CO5 BTL-2 Understand
9. When is a language said to be recursively enumerable? CO5 BTL-3 Apply
10. Point out the properties of Recursive and Recursively CO5 BTL-4 Analyze
enumerable languages
PART-B & C
1. With proper examples, explain P and NP complete problems CO5 BTL-2 Understand
(13)
4. Show that the Halting Problem is undecidable. (13) CO5 BTL-3 Apply
5. Prove that Universal language is recursively enumerable but not CO5 BTL-3 Apply
recursive (13)