-
The normal approach would be to evaluate C over all 44
possible sentences and choose the best one
-
Let us assume that 'sat' was the last word spoken at Time = 4
-
The best four word sentence ending at 'sat' must be a path
extension from one of the best allowed three-word sentences
ending at Time 3.
-
If D(i,j) is defined as the maximum value of C for a sentence
of 'i' words to have ended at word 'j', then D(i,j) can be
calculated recursively as
D(i,j) = max[(D(i-1,k) + Q(j/k) . P(j,i)]