← RGPV CS-501-CBGS Theory of Computation June 2020 Solved Paper
Question
Prove that CFL are not closed under intersection.
Asked in: CS-501 | June 2020 | 3(a)
Answer
Let L₁={aⁱbⁱcʲ:i,j≥0} and L₂={aⁱbʲcʲ:i,j≥0}. Both are context-free: L₁ has grammar S→AC, A→aAb|ε, C→cC|ε; L₂ has S→AB, A→aA|ε, B→bBc|ε. Their intersection is {aⁿbⁿcⁿ:n≥0}. Suppose this is context-free with pumping length p. Choose aᵖbᵖcᵖ and split uvxyz with |vxy|≤p and |vy|>0. The pumped region cannot contain both a and c, since the entire b block separates them. Pumping down changes at least one count while leaving at least one other unchanged, so the three counts differ. This contradicts the CFL pumping lemma. Hence CFLs are not closed under intersection.
← RGPV CS-501-CBGS Theory of Computation June 2020 Solved Paper
Discussion
Ask a question, share your thoughts or report an error.
Sign in to participate in the discussion.
Join the discussion