The maximum flow equivalence breaks down when the c(•) variables are introduced, so in the general case, replacing max with sum is only an approximation.
returning to our sample problem, the linear programming solver simply needs to assign: due to the maximum covering weights constraint, we can give the following value assignment, implying that all n-grams have been matched.