Consider the following languages.

L1 = {0p 1q 0r | p, q, r ≥ 0}

L2 = {0p 1q 0r | p, q, r ≥  0, p ≠ r}

Which one of the following statements is FALSE?

This question was previously asked in
GATE CS 2013 Official Paper
View all GATE CS Papers >
  1. L2 is context-free.
  2. L1 ∩ L2 is context-free.
  3. Complement of L2 is recursive.
  4. Complement of L1 is context-free but not regular

Answer (Detailed Solution Below)

Option 4 : Complement of L1 is context-free but not regular
Free
GATE CS Full Mock Test
5.4 K Users
65 Questions 100 Marks 180 Mins

Detailed Solution

Download Solution PDF

The correct answer is “option 4”.

EXPLANATION:

Option 1:  TRUE

Language L1 can be written as 0*1*0*.

So, L1 is a regular language.

Language L2 has one comparison p! = r.

So, L2 is a Context-free language.

Option 2:  TRUE

According to the closure property of context-free language, intersection of a regular language with Context-free language is also Context-free language.

 So, L1 ∩ L2 is context-free.

Option 3:  TRUE

According to the closure property of context-free language (CFL), it is not closed under complementation.

So, L2 can be assumed as Context-sensitive language (CSL) since every CFL is CSL.

Also, CSL is closed under complementation and every CSL is recursive.

So complement of L2 is CSL & hence recursive.

Option 4:  FALSE

According to the closure property of regular language, it is closed under complementation.

So, complement is L1 also regular.

Hence, the complement of L1 is context-free but not regular is false.

The correct answer is “option 4”.  

Latest GATE CS Updates

Last updated on Jan 8, 2025

-> GATE CS 2025 Admit Card has been released on 7th January 2025.

-> The exam will be conducted on 1st February 2025 in 2 shifts.

-> Candidates applying for the GATE CE must satisfy the GATE Eligibility Criteria.

-> The candidates should have BTech (Computer Science). Candidates preparing for the exam can refer to the GATE CS Important Questions to improve their preparation.

-> Candidates must check their performance with the help of the GATE CS mock tests and GATE CS previous year papers for the GATE 2025 Exam.

Get Free Access Now
Hot Links: teen patti real cash 2024 teen patti game online teen patti real money app