The class of CFG is not closed under ______.

2025

The class of CFG is not closed under ______.

  1. A.

    Concatenation

  2. B.

    Intersection

  3. C.

    Union

  4. D.

    Repeated Concatenation

Attempted by 23 students.

Show answer & explanation

Correct answer: B

Context-Free Grammars (CFGs) have specific closure properties that define which operations preserve the context-free nature of the language.

Closed Operations: - Union: The union of two context-free languages is context-free. - Concatenation: The concatenation of two context-free languages is context-free. - Kleene Star: The Kleene star of a context-free language is context-free.

Non-Closed Operations: - Intersection: The intersection of two context-free languages is not necessarily context-free. - Complement: The complement of a context-free language is not necessarily context-free.

Therefore, the class of CFGs is not closed under intersection.

Explore the full course: Bpsc