559 views

1 Answer

0 votes
0 votes
1)

S->aAc/A

A->aAb/λ

2)

S->Bb/aBb

B->Bb/aBb/aaBb/λ

Related questions

0 votes
0 votes
0 answers
2
admin asked Apr 11, 2019
311 views
Modify the $CYK$ algorithm to report the number of distinct parse trees for the given input, rather than just reporting membership in the language$.$
0 votes
0 votes
0 answers
3
admin asked Apr 11, 2019
157 views
Show that in any $CNF$ grammar all parse trees for strings of length $n$ have $2n-1$ interior nodes $(i.e.,$ $2n-1$ nodes with variables for lables$).$
0 votes
0 votes
0 answers
4
admin asked Apr 11, 2019
257 views
Using the grammar $G$ of Example $7.34,$use the $CYK$ algorithm to determine whether each of the following strings is in $L(G):$$ababa$$baaab$$aabab$