Files
freeCodeCamp/curriculum/challenges/english/10-coding-interview-prep/project-euler/problem-106-special-subset-sums-meta-testing.md
Oliver Eyton-Williams ee1e8abd87 feat(curriculum): restore seed + solution to Chinese (#40683)
* feat(tools): add seed/solution restore script

* chore(curriculum): remove empty sections' markers

* chore(curriculum): add seed + solution to Chinese

* chore: remove old formatter

* fix: update getChallenges

parse translated challenges separately, without reference to the source

* chore(curriculum): add dashedName to English

* chore(curriculum): add dashedName to Chinese

* refactor: remove unused challenge property 'name'

* fix: relax dashedName requirement

* fix: stray tag

Remove stray `pre` tag from challenge file.

Signed-off-by: nhcarrigan <nhcarrigan@gmail.com>

Co-authored-by: nhcarrigan <nhcarrigan@gmail.com>
2021-01-12 19:31:00 -07:00

51 lines
1.3 KiB
Markdown

---
id: 5900f3d71000cf542c50fee9
title: 'Problem 106: Special subset sums: meta-testing'
challengeType: 5
forumTopicId: 301730
dashedName: problem-106-special-subset-sums-meta-testing
---
# --description--
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:
S(B) ≠ S(C); that is, sums of subsets cannot be equal.
If B contains more elements than C then S(B) > S(C).
For this problem we shall assume that a given set contains n strictly increasing elements and it already satisfies the second rule.
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.
For n = 12, how many of the 261625 subset pairs that can be obtained need to be tested for equality?
NOTE: This problem is related to Problem 103 and Problem 105.
# --hints--
`euler106()` should return 21384.
```js
assert.strictEqual(euler106(), 21384);
```
# --seed--
## --seed-contents--
```js
function euler106() {
return true;
}
euler106();
```
# --solutions--
```js
// solution required
```