Posted by Denis Borris on October 11, 2002 at 14:43:23:
In Reply to: Re: Good one to keep Joel off the streets... posted by Joel on October 11, 2002 at 10:44:58:
: OK - before I even start this we have to clarify the question. The way you wrote it, it sounds like you are looking for a single set {a,b,c...l} such that
: a+b+c+d+e+f = g+h+i+j+k+l
: AND
: a^2+b^2+c^2+d^2+e^2+f^2 = g^2+h^2+i^2+j^2+k^2+l^2
: AND
: a^3+b^3+c^3+d^3+e^3+f^3 = g^3+h^3+i^3+j^3+k^3+l^3
: AND
: a^4+b^4+c^4+d^4+e^4+f^4 = g^4+h^4+i^4+j^4+k^4+l^4
: AND
: a^5+b^5+c^5+d^5+e^5+f^5 = g^5+h^5+i^5+j^5+k^5+l^5
: Well, I don't know how to prove it abstractly, but I'm pretty sure that set is {}; i.e. it don't exist.
That's correct; it DOES exist, and ONLY for powers 1 to 5.
Wanna bet a Canadian Tooney against a USA buck? :)
: So, maybe you are asking for a program that will find ALL sets....
NO!!!!!!!
I'll give you my "a to f" looping as example....
loop a from 1 to 19
loop b from a+1 to 20
loop c from b+1 to 21
loop d from c+1 to 22
loop e from d+1 to 23
loop f from e+1 to 24 OR from x to 24 if x>e+1 (x = 39-a-b-c-d-e)
if a+b+c+d+e+f>111 then get out of here and do next e
(you figure out those last 2 !)
I couldn't come up with any more "shortcuts" for "a to f"
NOTE: handling the next loop (g) is crucial.