PDA for S→aABB|aAA, A→aBB|a, B→bBB|A

December 4, 2026 · Team EasyExamNotes · 1 min read (est.) · 0 comments

Share on WhatsApp

← RGPV CD-501 Theory of Computation November 2023 Solved Paper

← RGPV CS-501 Theory of Computation November 2023 Solved Paper

Question

Construct a PDA accepting the language generated by S→aABB|aAA, A→aBB|a, B→bBB|A.

Asked in: CS-501 | November 2023 | 6(a)

Construct a PDA for S→aABB|aAA, A→aBB|a, B→bBB|A.

Asked in: CD-501 | November 2023 | 6(a)

Answer

Use one state q, initial stack S, empty-stack acceptance. With stack top written leftmost, add ε transitions replacing S by aABB or aAA, A by aBB or a, B by bBB or A. Add δ(q,a,a)=(q,ε) and δ(q,b,b)=(q,ε). These simulate leftmost derivations. Example S⇒aAA⇒aaA⇒aaa, so aaa is accepted by expanding and matching each terminal. Every accepting computation corresponds to a derivation and vice versa.

← RGPV CD-501 Theory of Computation November 2023 Solved Paper

← RGPV CS-501 Theory of Computation November 2023 Solved Paper

Discussion

Ask a question, share your thoughts or report an error.

Sign in to participate in the discussion.

Join the discussion