Tag: toc

Greibach Normal Form conversion

AnswerAssume A₁ is the start symbol. Substitute A₁→A₂A₃ into A₃, giving A₃→A₂A₃A₂ | a. Substitute A₂→A₃A₁ | b into that rule: A₃→A₃A₁A₃A₂…

Read more →

PDA for aⁿbᵐaⁿ

AnswerUse states q₀ (push), q₁ (middle block), q₂ (pop), qf (accept), stack alphabet {Z,A}, initial stack Z. Acceptance is by final state…

Read more →