How can one find Derivation tree and Productions of a Grammar from left-most derivation and string used?

I was given input string x = abaccacaa , left most derivation lder(x)=(1,2,1,3,4,1,3,5) and two rules :

  1. Length of RHS of each production is 2
  2. Each production's RHS starts with a terminal symbol

How should I go about solving this?


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.