Question
Let and be two languages over a finite alphabet, such that and are regular languages.
Which of the following statements is/are always true?
Official answer and solution
- Official answer
- C
- From
- Official GATE 2026 answer key
Solution
Use the inclusion of regular languages in context-free languages and construct a counterexample with for .
- Option (C) is always true: Since is given to be a regular language, and every regular language is also context-free (), is always context-free.
- Options (A), (B), and (D) are false: Take (regular) and let be any non-context-free (or undecidable) language. Then is regular, but is neither regular nor context-free.
Final answer
Option (C)
The answer is the one in the official GATE answer key. The solution is this site's own explanation.
Source
- Paper
- GATE 2026 Computer Science and Information Technology - Session 1 (CS1)
- Question
- 51 of 65
- Section
- Computer Science and Information Technology
Report an error in this question
GATE questions are the work of the organising institutes. This site is independent and is not affiliated with them.