1 votes 1 votes if following grammar ambiguous ? S->aSbS|bSaS|λ Sanjay Sharma asked May 17, 2016 Sanjay Sharma 2.8k views answer comment Share Follow See 1 comment See all 1 1 comment reply Leen Sharma commented May 17, 2016 reply Follow Share Given Grammar is a Unambiguous Grammar.we Can't draw more than one parse tree for a string. 1 votes 1 votes Please log in or register to add a comment.
Best answer 5 votes 5 votes Ambiguous grammer shivanisrivarshini answered May 17, 2016 selected May 17, 2016 by Praveen Saini shivanisrivarshini comment Share Follow See all 2 Comments See all 2 2 Comments reply soniasimran commented Nov 22, 2018 reply Follow Share Given grammer is unambiguous because first asbs start with a and next bsas start with b both output are not same .bsas make ba and asbs make ab Ab and ba are not same 0 votes 0 votes Sanjay Sharma commented Nov 23, 2018 reply Follow Share the fact is the string abab can be derived by using 2 different parse tree so it is ambiguous 0 votes 0 votes Please log in or register to add a comment.
0 votes 0 votes Given grammer is unambiguous because first asbs start with a and next bsas start with b both output are not same soniasimran answered Nov 22, 2018 soniasimran comment Share Follow See all 0 reply Please log in or register to add a comment.