{"id":"n-choose-2-for-pair-counting","text":"When counting unordered pairs within groups, solutions apply the combinatorial formula `n*(n-1)//2` per group rather than enumerating pairs, relying on the integer-division-is-exact invariant (one of n, n-1 is always even).","truth_value":"IN","source":"entries/2026/06/06/count-pairs-of-similar-strings-solution.md","source_url":"","source_hash":"","justifications":[],"dependents":[],"metadata":{},"created_at":"","updated_at":"","reviewed_at":"","verified_at":"","retracted_at":"","explanation":{"steps":[{"node":"n-choose-2-for-pair-counting","truth_value":"IN","reason":"premise"}]}}