Q18MCQMarks unknownS→aSbS∣bSaS∣ϵS \rightarrow aSbS\mid bSaS \mid \epsilonS→aSbS∣bSaS∣ϵ Construct all possible parse trees for the string abab. Is the grammar ambiguous?(A)Remove left-recursion from the following grammar: S→Sa∣Sb∣a∣bS \rightarrow Sa \mid Sb \mid a \mid bS→Sa∣Sb∣a∣b(B)Consider the following grammar:Sign in to save attempts.Show answer← PreviousNext →SolutionsDiscussionLoading…Sign in with Google