Bill
There was/is a problem with this problem. "Euler" later posted probs
105 &
106 which helped put things right. I'm surprised he didn't put a
warning in
the introduction. I don't want to "spoil" this for newcomers, so merely
suggest you go to its forum discussion.
Perhaps we should start a J mathschallenge forum, as this might be boring
for non-aficionados.
Mike
bill lam wrote:
mathchallenge problem#103 is interesting.
http://www.mathschallenge.net/index.php?section=project&ref=problems&id=103
1. S(B) ≠ S(C); that is, sums of subsets cannot be equal.
2. If B contains more elements than C then S(B) > S(C).
n = 1: {1}
n = 2: {1, 2}
n = 3: {2, 3, 4}
n = 4: {3, 5, 6, 7}
n = 5: {6, 9, 11, 12, 13}
It is required to find a special sum set (sss) with minimum sum for n=7.
Although I got the correct answer I'm [not] conviced with solution given by
others which assume some magic number or based on a sub-optimal set.
It seems my solution is also faulty because it does not consider the subset are
disjoint.
I conjecture that it needs to test 7!30 combinations (7 number from a range of
about
30 integers), for each combination, it need to generte (2^7)-2 proper subsets.
and test condition 1 and condition 2 between any two disjoint subset.
Therefore it take exponential time and cannot finished within a few seconds.
Is there any shortcut or any pointer to references in this subject.
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm