Theory of Computation and Compilers – Previous Year Questions
250 questions from past UGC NET Paper 2 – Computer Science papers, each with the correct answer. Open any question for its explanation.
Topic-wise mock tests
- Arrange the following phases of a compiler as per their order of execution (start to end) (a) Target code generation (b) Syntax Analysis (c) Code optimization (d) Semantic Analysis (e) Lexical Analysis
- Consider the following finite automata F1 that accepts a language L Let F2 be a finite automata which is obtained by reversal of F1. Then which of the following is correct?
- Which phase of compiler checks the grammar of programming?
- A. The set of turning machine codes for TM's that accept all inputs that are palindromes (possible along with some other inputs) is decidable B. The language of codes for TM's M that when started with blank tape, eventu…
- Which of the following parser is most powerful parser?
- Which of the following statement is correct?
- The compiler for high level language that runs on one machine and produces code for other machine is called-
- In the context of Binding which one of the following is incorrect?
- In Pumping Lemma for context-free languages, to say a language is satisfying pumping lemma, vx what is the minimum length of ' ' together, if you consider the string as 'uvwxy'?
- Which of the following is -free grammar?
- While processing a string by an LR parser, the reading of the given string by the parser is-
- What is the minimum and maximum number of initial, dead, unreachable and final states in a n valid ' ' state finite automaton, where the φ language accepted is not ' '?
- Which of the following finite automata recognize L = {a, b}*? (Transition tables A–D are shown; in each, the start state q0 is accepting.)
- Match List I with List II
- Consider the following statements: (A) For every regular language, we can design Turing Machine (B) For every context free language, we can design Turing Machine Which of the following is correct?
- The transition function ' ' in multi-tape Turing machine is defined as:
- In Pumping Lemma for regular languages, to say a language is satistying pumping lemma, what is the mınımum length of ' y ' if you consider the string as ' x y z '?
- The item generated by the production is :
- In the ε-NFA M = ({q0, q1, q2, q3}, {a}, δ, q0, {q3}) with δ: q0 –ε→ q1, q1 –ε→ q2, q2 –a→ {q2, q3}, and no other moves, what is the minimum length of a string that reaches the final state?
- Which of the following is (are) correct? 1. The language for the given expression is L = {aⁿbⁿcᵐdᵐ | n ≥ 1, m ≥ 1} ∪ {aⁿbᵐcᵐdⁿ | n ≥ 1, m ≥ 1}. 2. A context-free grammar for it is S → AB | C, A → aAb | ab, B → cBd | cd,…
- Which of the following are correct for regular expressions? a. ∅ + L = L + ∅ = L b. εL = Lε = L c. ∅L = L∅ = ∅ d. ∅L = L∅ = L
- Match the following based on the language accepted by using brute force method of parsing.
- What is the safest order while simplifying Context Free Grammar? ∈
- What is the Move in the cell with number 'M1' of the resultant Table?
- What is the Move in the cell with the number 'M2' of the resultant Table?
- What is the Move in the cell with number 'M3' of the resultant Table?
- What is the Move in the cell with number 'M4' of the resultant Table?
- What is the Move in the cell with number 'M5' of the resultant Table?
- The reduced grammar equivalent to S → AB | CA, B → BC | AB, A → a, C → aB | b is
- Consider the grammar G: S → AbB, A → aAb | λ, B → bB | λ. Which language does G generate?