Thread: January 2019
View Single Post
Old 2019-01-02, 01:08   #26
science_man_88's Avatar
"Forget I exist"
Jul 2009

26×131 Posts

Originally Posted by Dr Sardonicus View Post
AFAIK there is no such thing as repetition of elements in a set. A set is not the same thing as an ordered tuple.

The two sets need not be disjoint, however. Clearly, adding a number to all the elements of one set, and subtracting it from all the elements of the other, creates two sets giving the same sums. So instead of [1,22] and [3,99] we could take [2,23] and [2,98].
multiset is the term for an object like a set, but with multiplicities. the sums need all be squares, and since squares are 0 or 1 mod 4 , any term in A that is 2 mod 4 forces the elements of B to all be 2 or 3 mod 4. presence of an element that is 1 mod 4 forces the opposite set to all be 0 or 3 mod 4. 3 mod 4 forces all elements of the opposite set to be 1 or 2 mod 4. and 0 mod 4 forces 0 or 1 mod 4. mod 9 all squares are 0,1,4, or 7. etc. anyways time to use forpart ( or setbinop etc doh )and forsubset to try my hand at coding it.

Last fiddled with by science_man_88 on 2019-01-02 at 01:13
science_man_88 is offline   Reply With Quote