Grammar Ambiguous or not ?


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

Ravi Garg edited question
    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
      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
        Add image to editor add image from link

        Question stats

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