Grammar Ambiguous or not ?

TOC
0

G = {S → SS, S → ab, S → ba, S → c} hows this ambiguous?

Ravi Garg edited question
    0
    Aman Khan (anonymous)

    s-(SS) then one of the s gives ss . is equivalent to the other s giving SS . both will from an sss

    Aman Khan answered
      0
      Prashant Singh (anonymous)

      let take string cc: one way- S → SS->cS->cc(Left most derivation) otherway: S->SS->Sc->cc (right most derivation) hence above grammar is ambigous

      Prashant Singh answered
        Add image to editor add image from link

        Question stats

        • Active
        • Views1623 times
        • Answers2 answers
        • Followers1 follower
        Question and answer is powered by AnsPress