- #1

Jarfi

- 384

- 12

- TL;DR Summary
- Number of unequal numbers with sum S

Hello, I've been trying to solve this problem for a while, and I found a technical solution which is too computationally intensive for large numbers, I am trying to solve the problem using Combinatorics instead.

Given a set of integers 1, 2, 3, ..., 50 for example, where R=50 is the maximum, and a sample of n numbers from this set, what is the number of ways (number of sets) where sum(n) = S

Example:

R=50, n=4, S = 13

1+2+3+7 = 13

1+2+4+6 = 13

1+3+4+5 = 13

is the possible configurations for 13. But for say 16, we could have

1 + 3 + 4 + 8

1+3+5+7

1 + 2 + 5 + 8

1+ 2 + 6 + 7

etc ..

As you can see, the number of equivalent sums increases the higher S becomes.

Before I confuse you with what I tried does anybody have an idea on this ?

Given a set of integers 1, 2, 3, ..., 50 for example, where R=50 is the maximum, and a sample of n numbers from this set, what is the number of ways (number of sets) where sum(n) = S

Example:

R=50, n=4, S = 13

1+2+3+7 = 13

1+2+4+6 = 13

1+3+4+5 = 13

is the possible configurations for 13. But for say 16, we could have

1 + 3 + 4 + 8

1+3+5+7

1 + 2 + 5 + 8

1+ 2 + 6 + 7

etc ..

As you can see, the number of equivalent sums increases the higher S becomes.

Before I confuse you with what I tried does anybody have an idea on this ?

**Note:**partitions are not easily applicable here as we have a special case, where there needs to be x parts, all unequal, no 0s, etc.
Last edited: