Tag: toc

Ambiguity of S→SS|a|b

AnswerThe word aaa has two distinct leftmost derivations: S⇒SS⇒SSS⇒aSS⇒aaS⇒aaa (left grouping), and S⇒SS⇒aS⇒aSS⇒aaS⇒aaa (right grouping). Their trees group (aa)a and a(aa). Therefore…

Read more →