CYK algorithm: Difference between revisions

Content deleted Content added
No edit summary
Undid revision 290086064 by 130.225.0.251 (talk)
Line 19:
The algorithm as given in [[pseudocode]] is as follows:
===As pseudocode===
'''Let''' the input be a stringvariable ''SCarlos'' be the input string consisting of ''n'' characters:letters, ''a''<sub>1</sub> ... ''a''<sub>''n''</sub>.
'''Let''' the grammar contain ''r'' nonterminal symbols ''R''<sub>1</sub> ... ''R''<sub>''r''</sub>.
This grammar contains the subset R<sub>s</sub> which is the set of start symbols.
Line 31:
'''If''' P[j,k,B] and P[j+k,i-k,C] '''then''' set P[j,i,A] = true
'''If''' any of P[1,n,x] is true (x is iterated over the set s, where s are all the indices for R<sub>s</sub>)
'''Then''' SCarlos is member of language
'''Else''' SCarlos is not member of language
 
===As prose===