greedy-optimality-requires-nonnegative-domain

Status: OUT

Greedy algorithms in the repo are provably optimal across their problem domains, but this universal optimality claim is contingent on non-negative input values — at least one greedy sort-then-pair strategy (max_product_difference) is correct only for positive inputs, where magnitude ordering coincides with value ordering.

Justifications

The positive-input-only constraint on one greedy solution gates the universal optimality claim

Depends on (SL): greedy-algorithms-provably-optimal

Unless: sort-greedy-positive-only

JSON