- Theory of Automata MCQs
- Finite Automata MCQs
- Regular Languages
- Context-Free Grammars (CFG)
- Pushdown Automata (PDA) MCQs
- Context-Free Languages MCQs
- Turing Machines MCQs
- Decidability and Undecidability MCQs
- Computational Complexity MCQs
- Advanced Topics in Automata Theory
- Applications of Automata Theory MCQs
Closure properties MCQs
Closure Properties of Regular Languages
Regular languages are closed under which of the following operations?
A) Union
B) Intersection
C) Complement
D) All of the above
Answer: D
Which of the following operations on regular languages always results in a regular language?
A) Concatenation
B) Kleene star
C) Reversal
D) All of the above
Answer: D
If L1 and L2 are regular languages, then L1 ∪ L2 is:
A) Regular
B) Context-free
C) Context-sensitive
D) Not necessarily regular
Answer: A
Regular languages are closed under the following operation except:
A) Complement
B) Homomorphism
C) Intersection with a context-free language
D) Inverse homomorphism
Answer: C
If L is a regular language, then the complement of L is:
A) Regular
B) Context-free
C) Context-sensitive
D) Not necessarily regular
Answer: A
Which of the following is not a closure property of regular languages?
A) Subtraction
B) Union
C) Intersection
D) Kleene star
Answer: A
The intersection of a regular language with any other regular language is:
A) Regular
B) Context-free
C) Context-sensitive
D) Not necessarily regular
Answer: A
Regular languages are not closed under:
A) Union
B) Concatenation
C) Complement
D) Infinite intersection
Answer: D
Given two regular languages L1 and L2, their concatenation L1L2 is:
A) Regular
B) Context-free
C) Context-sensitive
D) Not necessarily regular
Answer: A
If L1 is a regular language and L2 is a finite language, their intersection L1 ∩ L2 is:
A) Regular
B) Context-free
C) Context-sensitive
D) Not necessarily regular
Answer: A
Closure Properties of Context-Free Languages
Context-free languages are closed under which of the following operations?
A) Union
B) Concatenation
C) Kleene star
D) All of the above
Answer: D
Which of the following operations on context-free languages does not necessarily result in a context-free language?
A) Union
B) Intersection with a regular language
C) Intersection with another context-free language
D) Kleene star
Answer: C
If L1 and L2 are context-free languages, then L1 ∪ L2 is:
A) Regular
B) Context-free
C) Context-sensitive
D) Not necessarily context-free
Answer: B
The concatenation of two context-free languages is:
A) Always regular
B) Always context-free
C) Always context-sensitive
D) Not necessarily context-free
Answer: B
Context-free languages are not closed under:
A) Union
B) Concatenation
C) Intersection
D) Kleene star
Answer: C
If L is a context-free language, the language L (Kleene star) is:*
A) Regular
B) Context-free
C) Context-sensitive
D) Not necessarily context-free
Answer: B
If L1 is a context-free language and L2 is a regular language, their intersection L1 ∩ L2 is:
A) Regular
B) Context-free
C) Context-sensitive
D) Not necessarily context-free
Answer: B
Which of the following is not a closure property of context-free languages?
A) Union
B) Concatenation
C) Complement
D) Kleene star
Answer: C
The complement of a context-free language is:
A) Always context-free
B) Always context-sensitive
C) Not necessarily context-free
D) Always regular
Answer: C
If L1 and L2 are context-free languages, the language L1 – L2 (difference) is:
A) Context-free
B) Regular
C) Context-sensitive
D) Not necessarily context-free
Answer: D
Context-free languages are closed under the following operations except:
A) Reversal
B) Homomorphism
C) Inverse homomorphism
D) Complement
Answer: D
The union of a context-free language and a regular language is:
A) Regular
B) Context-free
C) Context-sensitive
D) Not necessarily context-free
Answer: B
Which of the following statements is true regarding context-free languages?
A) They are closed under intersection with regular languages.
B) They are closed under intersection with other context-free languages.
C) They are closed under complement.
D) They are not closed under union.
Answer: A
If L1 is a context-free language and L2 is a regular language, their concatenation L1L2 is:
A) Regular
B) Context-free
C) Context-sensitive
D) Not necessarily context-free
Answer: B