For the string “ id + id + id” is generated by this grammar then there will be 2 parse tree
e.g. 1:
For the string "3 * 2 + 5",
For the string "3 * 2 + 5", the above grammar can generate two parse trees
Since there are two parse trees for a single string "3 * 2 + 5", the grammar G is ambiguous.
Total 2 parse trees for a single string "3 * 2 + 5”
e.g. 2: For the string " id * id + id * id", there will be more than two parse tree
So, by grammar, we can only conclude whether it is ambiguous.
and there should be a string given for the number of parse trees generated.