CYK starting Input string x=baaba of length 5 Productions of type A -> a 'A' -> 'a' 'B' -> 'b' 'C' -> 'a' Productions of type A -> B C 'S' -> 'A' 'B' 'S' -> 'B' 'C' 'A' -> 'B' 'A' 'B' -> 'C' 'C' 'C' -> 'A' 'B' V the set of variables 'S' 'A' 'B' 'C' T the set of terminals 'a' 'b' All data is in run CYK algorithm to build array Finished first row of V table 'B' ,'C' 'A' ,'C' 'A' ,'B' ,'C' 'A' Finished 2 row of V table 'A' 'S' ,'B' ,'C' 'S' ,'A' 'S' ,null Finished 3 row of V table null ,'B' ,'B' ,null ,null Finished 4 row of V table null ,'A' 'S' 'A' 'C' 'S' ,null ,null ,null Finished 5 row of V table 'C' 'S' 'A' 'S' ,null ,null ,null ,null finish CYK algorithm, check for 'S' and thus Accepted x accepted by G, x is in L(G)