We simply augment the dynamic programming table and calculate C[i] [r], which is the score of the best compression of length r that ends at word x i .
this table can be filled in as follows if we require a specific compression rate, we simple determine the number of words r that satisfy this rate and calculate C[n] [r].