0
$\begingroup$

So I understand how to do this with there being multiple symbols in each possible production, but when it is singular, it seems to get more complicated, or I am overthinking it? Would the left-most derivations be the exact same as the two different derivation trees for some string x in this case? Both cases lead me to S -> T -> ba and S -> V -> ba

I'm also not too sure on the second question, but I think that would be more straight forward with a) answered.

I was hoping someone could help me to understand this a bit better. Here is the grammar, thanks!

For the following grammar S → T│V T → bTa│ba V → baV│Λ

a. Show that it is ambiguous (by providing two different derivation trees for some string x, and two different left-most derivations for the same x)

b. Find an equivalent unambiguous grammar.

$\endgroup$
2

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.