• Courses
  • Tutorials
  • Jobs
  • Practice
  • Contests

Quiz for Sudo GATE 2021

Question 41

The language L = {WbcWR | W ∈ (a+b)*} is _____. Note - This question is multiple select questions (MSQ).
  • Regular
  • DCFL
  • CFL
  • CFL but not DCFL

Question 42

Which of the following regular expression belongs to the language recognized by automaton given below?
Note - This question is multiple select questions (MSQ).
  • 0*(11)*0*
  • (0*1(10*1)*10* + 0*)
  • 0*1(10*1)0(100)*
  • 0*1(10*1)*1

Question 43

Which of the following option(s) is/are correct?

  • (I) Union of two context-sensitive languages is context-sensitive language.
  • (II) Every nondeterministic PDA can be converted to an equivalent deterministic PDA.
  • (III) Complement of an RE language is also an RE language.
  • (IV) There are more than one minimal DFA for every regular language.

Note - This question is multiple select questions (MSQ).

  • Statement (I) is false.

  • Statement (II) is false.

  • Statement (III) is false.

  • Statement (IV) is false.

Question 44

A regular expression is ambiguous when there exists a string which can be constructed in two different ways from the regular expression. Which of the following regular expression(s) are ambiguous? Note - This question is multiple select questions (MSQ).
  • a((ab)*cd)* ∪ a(ababcb*)*a*
  • aab*(ab)* ∪ ab* ∪ a*bba*
  • aaba* ∪ aaaba ∪ aabba* ∪ a
  • None of these

Question 45

Consider the following languages :
(I) {anbm | n > m ∨ n < m }  
(II) {anbm | n ≥ m ∨ n ≤ m }  
(III) {anbm | n > m ∧ n < m } 
(IV) {anbm | n ≥ m ∧ n ≤ m } 
Which of the following languages are regular? Note - This question is multiple select questions (MSQ).
  • (I)
  • (II)
  • (III)
  • (IV)

Question 46

Which of the following option(s) is/are correct regarding grammar :
A → BA\'
A\'→ +BA\' /ϵ 
B → TB\'
B\'→ -TB\'/ ϵ
T → id / (A) 
Note - This question is multiple select questions (MSQ).
  • Follow of A Fo(A) = $, )
  • Follow of B\' Fo(B\') = Fo(B) = +, $, )
  • Follow of B Fo(B) = +, )
  • Follow of T Fo(T) = -, +, $, )

Question 47

Consider the following source code :
c = a + b
d = c
c = c – e
a = d – e
b = b * e
b = d/b
Which of the following is/are NOT correct optimization of given code? Note - This question is multiple select questions (MSQ).
  • c = a + b
          t = b * e
          a = d – e
          b = d/t
          c = a
  • c = a + b
          d = c
          c = c – e
          a = d – e
          b = d/b
  • d = c
         c = c – e
         a = d – e
         b = b * e
         b = d/b
  • None of the above

Question 48

Which is/are True about SR and RR-conflict: Note - This question is multiple select questions (MSQ).
  • If there is no SR-conflict in CLR(1) then definitely there will be no SR-conflict in LALR(1).
  • RR-conflict might occur if lookahead for final items(reduce-moves) is same.
  • Known that CLR(1) has no RR-conflict, still RR-conflict might occur in LALR(1).
  • None

Question 49

Consider the following grammars G1 and G2 respectively. Grammar - G1:
A1 → A2A3
A2 → A3A1 | b
A3 → A1A1 | a
Grammar - G2:
S → AA | 0
A → SS | 1
Consider the following statements regarding above grammars: (I): This grammar is not left recursive and equivalent to grammar - G1:
A1 → A2A3
A2 →  A3A1 | b
A3 → a | bA3A1 | aK | bA3A1K 
k → A1A3A1 | A1A3A1K
(II): This grammar is not left recursive and equivalent to grammar - G2:
S → A A | 0
A → 0S | 1 | 0SK | 1K
K → AS | ASK
Note - This question is multiple select questions (MSQ).
  • Statement (I) is correct
  • Statement (II) is correct
  • Statement (I) is not correct
  • Statement (II) is not correct

Question 50

Consider the following two sets of LR(1) items of an LR(1) grammar.
X -> c.X, c/d
   X -> .cX, c/d
   X -> .d, c/d
   X -> c.X, $
   X -> .cX, $
   X -> .d, $
Which of the following statements related to merging of the two sets in the corresponding LALR parser is/are FALSE? Note - This question is multiple select questions (MSQ).
  • Can be merged since look aheads are different.
  • Can be merged but will result in S-R conflict.
  • Can be merged but will result in R-R conflict.
  • Can be merged since goto on c will lead to two different sets.

There are 55 questions to complete.

Last Updated :
Take a part in the ongoing discussion