In informal terms, this algorithm considers every possible substring of the input string and sets P [ l , s , v ] {\displaystyle P[l,s,v]} to be true if the substring of length l {\displaystyle l} starting from s {\displaystyle s} can be generated from nonterminal variable R v {\displaystyle R_{v}} . Once it has considered substrings of length 1, it goes on to substrings of length 2, and so on. For substrings of length 2 and greater, it considers every possible partition of the substring into two parts, and checks to see if there is some production P → Q R {\displaystyle P\to Q\;R} such that Q {\displaystyle Q} matches the first part and R {\displaystyle R} matches the second part.