IAE Academy

GATE 2026 CS1 Q.51: solution and answer

GATE 2026 · CS1Q.51 · 2 marks · MSQ

Let and be two languages over a finite alphabet, such that and are regular languages.

Which of the following statements is/are always true?

  1. (A)

    is regular

  2. (B)

    is regular

  3. (C)

    is context-free

  4. (D)

    is context-free

See the question in the paper

Answer and solution

ANSWER

Only option (C) is always true.

Official answer: CSource: Official answer key, GATE 2026 CS1 (IIT Guwahati)

  1. The only facts given are that and are regular. Nothing else is assumed about , so a statement is "always true" only if it holds for every pair that satisfies these two conditions.

  2. Counterexample for : take , which is regular. Let be any language that is not regular. Then is regular, so both hypotheses hold while is arbitrary.

  3. (A) is regular: false. With and , the hypotheses hold but is not regular.

  4. (D) is context-free: false. With and , which is not context-free, the hypotheses hold but is not context-free.

  5. (B) is regular: false. With we get , which is not regular for the chosen . Note that , which is not the same set as .

  6. (C) is context-free: true. Regular languages are closed under complement (swap the accepting and non-accepting states of a complete DFA), so is regular. Every regular language is context-free, so is context-free for every valid choice of and .

  7. Only (C) is always true.

KEY IDEA

The hypotheses constrain only and the intersection, so can be any language, for example when . Only a statement that depends on alone can be always true. Regular languages are closed under complement and are a subset of the context-free languages.

WATCH OUT FOR

Reading regular as a restriction on . Another slip is treating as and concluding (B). The union simplifies to , not .

From the GATE 2026 CS1 paper. Every question of this paper · Download the full paper · All 5 Regular languages questions, with notes

More Regular languages questions