GATE CS 2021 Set 2 | Question 51

Theory of Computation › Context Free Grammar · MSQ · 2 marks · Answer: B, C, D

  1. Question 51Theory of Computationmsq2 marks
    For a string , we define to be the reverse of . For example, if then . Which of the following languages is/are context-free?
    • A.
    • B.
      ✓
    • C.
      ✓
    • D.
      ✓

    Answer: B, C, D

    Solution

    (B) is a concatenation of two even-palindrome languages and (D) is a nested palindrome structure — both CFL. (C) equals (take ), which is regular, hence CFL. (A) has crossing dependencies between the two reversed parts and is not context-free.

More GATE PYQ on Context Free Grammar

All GATE CS Theory of Computation PYQ →

Attempt GATE CS 2021 Set 2 in real GATE exam mode

Full paper with a timer, the GATE interface and a topic-wise analysis — free.

Create free account →