Question: I need a code ASAP !!! in PYTHON 2 that checks if a string belongs to a cfg (context free grammar)in cnf(Chomsky normal form) using

I need a code ASAP !!!
in PYTHON 2 that checks if a string belongs to a cfg (context free grammar)in cnf(Chomsky normal form) using cyk (cocke-younger-kasami)
Input strings :
aaabb
aaabbb
Output:
Yes
No
Production rules of the cnf :
S->E(empty string)|AB|XB
T->AB|XB
X->AT
A->a
B->b

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!