Back to the 2024 paper

Module 2: Context-Free Languages (CFL) and PDA

20247m

Construct a PDA for the grammar:

S→0BBS \to 0BB
B→0S∣1S∣0B \to 0S \mid 1S \mid 0

Test whether 01040104 is accepted by this PDA.

Similar questions

Official AppAndroid App

PYQDeck for Android

Solve BEU previous-year exam papers anywhere, anytime. Fast search, offline paper viewing, and step-by-step solutions designed specifically for your phone.