As one can see, this algorithm is of complexity as opposed to for a bigram grammar. This entails a large memory and computational cost. We will now concentrate on overcoming these problems.