Back to the 2023 paper

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

20237m

Given the grammar:

S→aB∣baB→b∣bs∣aBB S \to aB \mid ba \\ B \to b \mid bs \mid aBB

For the string aaabbabbbaaaabbabbba find:

  1. Leftmost derivation
  2. Rightmost derivation
  3. Parse tree

Similar questions

Free AppAndroid App

Coursify Android App

Generate AI courses, take quick quizzes between classes, and master complex engineering concepts on the go.