Home /
Expert Answers /
Computer Science /
2-show-a-i-parse-tree-ii-left-most-derivation-and-ii-right-most-derivation-for-the-followi-pa523
(Solved):
2. Show a (i) parse tree, (ii) left most derivation and (ii) right most derivation for the followi ...
2. Show a (i) parse tree, (ii) left most derivation and (ii) right most derivation for the following unambiguous Grammar: Here, \( S \) can be called as a Start variable which is related to A, B, where \( A \) and \( B \) are other variables which yield terminal symbols like a, b. [Note: Please consider a sample string \( \mathrm{w}= \) aaabbabbba, and write down the left derivation, right derivation and parse tree required to construct this string \( \mathrm{w} \) ] \[ \begin{array}{l} S \rightarrow a B \mid b A \\ S \rightarrow a S|b A A| a \\ B \rightarrow b S|a B B| b \end{array} \]