You are on page 1of 2

21CS51 SIMP Theory Questions

Prepared by the CSE/ISE review team

Module-1

1. .Define the following with example

(i) String (ii)Language (iii)Alphabet (iv)DFSM (v)DFA & NFA

(vi)Symbol (vii) ɛ-NFA (viii) Powers of an Alphabet (ix)Equivalent states

2. List and explain the various phases of compiler and show the output of

each phase for the expression y=2 + 3 * 4

3. Explain the different phases of a compiler with an example, Explain any

5 differences between compiler and Interpreter.

4. Difference between NFA and DFA and epsilon-NFA

5. Explain in detail about the Language processing system

Module-2

6. Regular expressions-Definition

Problems(type: Write RE for following languages)

Applications of RE

Proofs : Prove that for every RE, there is an equivalent finite automaton.

7. State and prove pumping theorem for Regular languages


8. State and prove Kleen’s theorem in TOC
9. What is the main job of the lexical analyzer in a compiler? Also define Input buffering strategy and lexical
analysis phase - 5+5M
10. What is a transition diagram in lexical analysis, and how does it illustrate the recognition process for tokens
like relational operators, identifiers, and unsigned numbers? - Text book question

Or

Explain with Transition diagram for Relop, identifier, unsigned numbers


Module-3
11. Define CFG and Ambiguity. Find the leftmost and rightmost derivation with a parse tree, prove that the given
grammar is ambiguous in nature.
12. What is the role of a parser? Explain the different error recovery strategies.
13. What are the limitations of top-down parsing, and can you provide a recursive descent parser for the given
grammar S →cAd, A →ab | a?"
14. What is left recursion in grammars, and how is it eliminated? Can you provide an example of a grammar with
left recursion and demonstrate how it is removed?

Module-4

15. Define Pushdown Automata. How does it define the language it accepts, Explain
16. What is a shift-reduce parser, and what conflicts can occur during shift-reduce parsing? Also, can you list the
actions performed by a shift-reduce parser?
17. Write an algorithm to construct SLR parsing table

` Module-5

18. Define a Turing machine. Explain the working of a Turing machine


19. Write short notes on (5M each): a) Multitape Turing machine b) Halting problem in TM c) Post
correspondence problem d) Recursive languages e) Universal Turing machine f) Non-deterministic TM g)
Decidable language
20. Prove that complement of a recursively enumerable language is recursive.
21. What are three address codes? Explain different ways of representing three address codes with examples. (
22. Explain the issues in the design of code generation.
23. Explain synthesized attribute, inherited attribute, S-attributed definition and L-attributed definition with
example for each.

You might also like