Back to the 2025 paper

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

20257m

Given the grammar
G=({S},{a,b},P,S)G = (\{S\}, \{a, b\}, P, S)
P:SaSbabP: S \rightarrow aSb | ab

Derive the string aabb using leftmost derivation, rightmost derivation and also draw the parse tree.

Similar questions