- #1
adoado
- 72
- 0
Hey all,
I recently encountered a problem that I cannot seem to solve...
Let's say I have the following coins A, B, C, D and E, each one with an associated integer value such that:
A = 1
B = 2
C = 3
D = 4
E = 5
Let's say I can pick N of them, and order does matter (so ABC is not equal to BCA, so we are dealing with permutations I would assume). How many combinations (of size N) exist such that the total sum of their values is equal to or greater than some integer J?
For example, how many permutations (pairs of 2) exist such that their sum is equal to or greater than 9? Clearly only two pairs, DE (4+5) and ED (5+4)... I have found a formula to deal with pairs, but I cannot find anyway to generalize it based on permutations of length N..
Any help would be greatly appreciated!
Thanks,
Adrian
I recently encountered a problem that I cannot seem to solve...
Let's say I have the following coins A, B, C, D and E, each one with an associated integer value such that:
A = 1
B = 2
C = 3
D = 4
E = 5
Let's say I can pick N of them, and order does matter (so ABC is not equal to BCA, so we are dealing with permutations I would assume). How many combinations (of size N) exist such that the total sum of their values is equal to or greater than some integer J?
For example, how many permutations (pairs of 2) exist such that their sum is equal to or greater than 9? Clearly only two pairs, DE (4+5) and ED (5+4)... I have found a formula to deal with pairs, but I cannot find anyway to generalize it based on permutations of length N..
Any help would be greatly appreciated!
Thanks,
Adrian