Back to the 2020 paper

Module 2: Context-free languages and pushdown automata

20207m

Design a pushdown automaton for the following context-free grammar:

S→aB∣bAS \to aB \mid bA
A→aS∣bAA∣aA \to aS \mid bAA \mid a
B→bS∣aBB∣bB \to bS \mid aBB \mid b

Similar questions

AI LearningWeb Platform

Coursify — Personal AI Course Generator

Struggling with a difficult subject or concept? Turn any engineering topic into a structured course with interactive lessons, quizzes, and research-backed explanations.