Asked by Bill
How many four integer combinations from numbers 1 to 100 equals 100
Answers
Answered by
mathhelper
This is a very complicated questions, unless I mis-understood the question.
I assume you mean something like this:
12 26 8 54 since 12+26+8+54 = 100
would you count 26 8 12 54 as the same combination?
If not, there would be 4! or 24 arrangements of this same combination.
I made up a rather silly computer program and ran it on my MAC
10 for a = 1 to 100
20 for b = 1 to 100
30 for c = 1 to 100
40 for d = 1 to 100
50 sum = a+b+c+d
60 if sum = 100 then count = count+1
70 next d
80 next c
90 next b
100 next a
110 print count
It gave me a total of 156,849 of them!!
(e.g. one of them was 12 26 8 54)
It would include 4! or 24 same permutations for each sum of 100 of the same 4 integers, so we should divide the 156849 by 24
But....
suppose we look at another one of them:
30 30 10 30 , which is part of my 156,849
but there are only 4!/3! or 4 possible arrangements.
Awwhhh, the complications!
btw, my dinky little program had to perform 100 million iterations to find that sum!!
I assume you mean something like this:
12 26 8 54 since 12+26+8+54 = 100
would you count 26 8 12 54 as the same combination?
If not, there would be 4! or 24 arrangements of this same combination.
I made up a rather silly computer program and ran it on my MAC
10 for a = 1 to 100
20 for b = 1 to 100
30 for c = 1 to 100
40 for d = 1 to 100
50 sum = a+b+c+d
60 if sum = 100 then count = count+1
70 next d
80 next c
90 next b
100 next a
110 print count
It gave me a total of 156,849 of them!!
(e.g. one of them was 12 26 8 54)
It would include 4! or 24 same permutations for each sum of 100 of the same 4 integers, so we should divide the 156849 by 24
But....
suppose we look at another one of them:
30 30 10 30 , which is part of my 156,849
but there are only 4!/3! or 4 possible arrangements.
Awwhhh, the complications!
btw, my dinky little program had to perform 100 million iterations to find that sum!!
There are no AI answers yet. The ability to request AI answers is coming soon!