"Yeah. Sunday."
"It's Sunday? I thought it was Thursday. Isn't it always on February 2?"
"Nope, you've got Super Bowl Sunday confused with Groundhog Day."
"Well, I knew something was happening Thursday."


















The goal is, therefore, to determine for each i from 1 to n such λ(i, zi, ki), where zi = 1 or 2 and 0≤ki≤Kmax, that the resulting solution has the maximum V. In order to do it, we estimate for each λ(i, zi, ki) the maximum V of all the solutions containing that configuration. For any ai in F consider strings F' =a1a2…ai and F" = aiai+1…an. For each λ(i, zi, ki) denote the maximum V of all the aligned solutions of F' that end with λ(i, zi, ki) as P(i, zi, ki). Denote the maximum V of all the aligned solutions of F" that begin with λ(i, zi, ki) as Q(i, zi, ki). Let for a particular λ(i, zi, ki) the sum of the corresponding P and Q be the maximum of all aligned configurations at i. In that case, the maximum V of all the solutions of F containing λ(i, zi, ki) equals the maximum V of any solutions of F.