0
$\begingroup$

Given a CFG, is there a systematic way to figuring out how many parse trees there are for a certain string?

For example, given the grammar:

S → AB | C
A → aAb | ab
B → cBd | cd
C → aCd | aDd
D → bDc | bc

How many distinct parse trees are there for the string aabbccdd

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.