Question
Consider the following languages.
Which one of the following statements is FALSE?
Official answer and solution
- Official answer
- D
- From
- Official GATE 2013 answer key
Solution
Classify the given languages in the Chomsky hierarchy and test closure properties.
Let us examine the two languages:
- . This is simply the language denoted by the regular expression . Thus, is regular.
- . This requires comparing and ( or ). A non-deterministic pushdown automaton can push zeros, ignore ones, and verify whether the number of trailing zeros differs from the leading zeros. Thus, is a deterministic context-free language (DCFL), hence context-free.
Now evaluate each statement:
- (A) is context-free: TRUE, as shown above.
- (B) is context-free: Since , , which is context-free. Even generally, the intersection of a regular language () and a CFL () is always a CFL. Thus, TRUE.
- (C) Complement of is recursive: Every CFL is recursive (decidable). The class of recursive languages is closed under complementation. Therefore, the complement of is recursive. Thus, TRUE.
- (D) Complement of is context-free but not regular: Since is regular, and regular languages are closed under complementation, the complement of is regular! Saying it is "not regular" is false.
Hence, statement (D) is FALSE.
Final answer
D
The answer is the one in the official GATE answer key. The solution is this site's own explanation.
Source
- Paper
- GATE 2013 Computer Science and Information Technology (CS)
- Question
- 32 of 65, printed as CS Q.32
- 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.