in reply to Coming soon: Algorithm::Loops
A 6 term solution is of the form:
xyz + xzy + yxz + yzx + zxy + zyx
But this can be rewritten as:
(x + y + z) * 222
But this is equivalent with:
((x - k) + (y - l) + (z + k + l)) * 222
So, all you need to find are (x, y, z) such that there is no (k, l) for which ((x - k), (y - l), (z + k + l)) has no duplicates, are less than 10, and 0 or more, and the sum is large enough that there are no solutions with less terms available.
This leads to (9, 8, 7) and (9, 8, 6) as the solutions, and hence to 5328 and 5106 and the only numbers with unique, and six term, solutions.
A simular argument shows that for the four digit problem, only 193314 and 199980 have unique, 24 term solutions. And for five digits, we have unique 120 term solutions for 9066576 and 9333240.
Abigail
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Coming soon: Algorithm::Loops (another analysis of the puzzle)
by tye (Sage) on Apr 13, 2003 at 17:40 UTC |