I'm pretty sure you forgot to mention that starting terminal (S in this case) needs to be in the top row cell, otherwise the string is not part of the grammar.
@Gazi Mashrurif you are talking about 𝐴,𝑆 and 𝑆,𝐴 which are written in the grid they mean the same thing because the comma denotes OR and order doesn't matter. HOWEVER, if you are talking about 𝐴𝑆 and 𝑆𝐴 which are produced by the cartesian product then they are not the same, order matters in this case.
You are a legend. I tried to figure this out for hour and a half. You managed to basicaly explain it in 4 minutes. The rest was just you showing it for better understanding. i love it.
The best one simply because you showed the different substring combinations you could get and why we could represent those with the values we derived before. Also easier to connect this with why it has to be in Chomsky-normal-form because we need binary derivations for the cartesian products. Not sure everyone who made a video on this understands that. Thank you!
And I was trying to avoid this question from Unit 4 of my Pattern Recognition Course. Now I'm gonna attempt this specifically. Thanks for clarifying so well!
Important note: After you finish this CYK algorithm, if the starting symbol of the grammar (in this case S) is in the top-row (last row) of our procedure, then the given input string is part of the grammar, otherwise it is not. In this case S is part of {S, A, C} which means that the given input string "baaba" is part of the grammar defined by the production rules. The time complexity of the CYK algorithm is O(n^3) where n is the length of the input string (in this case "baaba", so n=5).
I know this video is old, but I have a question: If the string is longer than 5, what happens? or do we have to have a string of that length to use the algorithm?
With this method, how would I be able to find in what position an entry appears in the table? I have a problem like this and I know what the correct answer is, but I don't know how to find that answer.