You are viewing a single comment's thread from:

RE: Elemental Subset Sum Problem

in STEMGeeks7 months ago

I have another approach.

The numbers 1,5,9,11,21,25 are all odd. Odd + Odd is Even and Odd + Even is Odd. Adding three odd numbers is an odd sum.

Fifty is even so any subset of three numbers from that list can never be even or 50.

Sort:  

This actually mod 2 number theory. We call even numbers 0 and odd numbers one. Thats why 1+1+1 is 1 (mod 2)

Posted via D.Buzz