2018-09-30 22:01:58 +00:00
---
id: 5900f3d71000cf542c50fee9
title: 'Problem 106: Special subset sums: meta-testing'
2020-11-27 18:02:05 +00:00
challengeType: 5
2019-08-05 16:17:33 +00:00
forumTopicId: 301730
2021-01-13 02:31:00 +00:00
dashedName: problem-106-special-subset-sums-meta-testing
2018-09-30 22:01:58 +00:00
---
2020-11-27 18:02:05 +00:00
# --description--
2018-09-30 22:01:58 +00:00
Let S(A) represent the sum of elements in set A of size n. We shall call it a special sum set if for any two non-empty disjoint subsets, B and C, the following properties are true:
2020-11-27 18:02:05 +00:00
2018-09-30 22:01:58 +00:00
S(B) ≠ S(C); that is, sums of subsets cannot be equal.
2020-11-27 18:02:05 +00:00
2018-09-30 22:01:58 +00:00
If B contains more elements than C then S(B) > S(C).
2020-11-27 18:02:05 +00:00
2018-09-30 22:01:58 +00:00
For this problem we shall assume that a given set contains n strictly increasing elements and it already satisfies the second rule.
2020-11-27 18:02:05 +00:00
2018-09-30 22:01:58 +00:00
Surprisingly, out of the 25 possible subset pairs that can be obtained from a set for which n = 4, only 1 of these pairs need to be tested for equality (first rule). Similarly, when n = 7, only 70 out of the 966 subset pairs need to be tested.
2020-11-27 18:02:05 +00:00
For n = 12, how many of the 261625 subset pairs that can be obtained need to be tested for equality?
2018-09-30 22:01:58 +00:00
2020-11-27 18:02:05 +00:00
NOTE: This problem is related to Problem 103 and Problem 105.
2018-09-30 22:01:58 +00:00
2020-11-27 18:02:05 +00:00
# --hints--
2018-09-30 22:01:58 +00:00
2020-11-27 18:02:05 +00:00
`euler106()` should return 21384.
2018-09-30 22:01:58 +00:00
2020-11-27 18:02:05 +00:00
```js
assert.strictEqual(euler106(), 21384);
2018-09-30 22:01:58 +00:00
```
2020-11-27 18:02:05 +00:00
# --seed--
2018-09-30 22:01:58 +00:00
2020-11-27 18:02:05 +00:00
## --seed-contents--
2018-09-30 22:01:58 +00:00
```js
function euler106() {
2020-09-15 16:57:40 +00:00
2018-09-30 22:01:58 +00:00
return true;
}
euler106();
```
2020-11-27 18:02:05 +00:00
# --solutions--
2018-09-30 22:01:58 +00:00
```js
// solution required
```