If every solution returned by
D is no better than some solution returned by
X, any optimal solution by
X must be no worse than some optimal solution by
D “What? How could this be true?” It turned out that the reasoning can be correct, and the proof uses indirect equality in an unusual way.
Reviewing Zantema’s “windowing” technique for computing the longest segment of the input that satisfies a suffix-closed predicate.
Translating Zantema’s work to Bird-Meertens style, to compute the longest consecutive segment of the input that satisfies a predicate that is suffix and overlap-closed.