there are a 103 choose 3 positive integer solutions to a+b+c+d = 100. find the number of positive integer solutions to a+b+2c+2d=100, a,b,c,d>=0
Question about your question, so I can choose any 4 values for a b c and d?
Are you sure there are 103 choose 3 positive integer solutions to a+b+c+d = 100 ?
ya with 0 included i think
do you find something wrong with that
I believe it should be \(\dbinom{99}3\). https://en.wikipedia.org/wiki/Stars_and_bars_(combinatorics)#Statements_of_theorems
i can see why 99 choose 3 is right, for some reason i also cant find why this way of thinking is wrong even if its the wrong answer like for 3s and 2 bars 1,1,1,|,| there are 5 spots and i have to pick 2 spots as bars so 5 Choose 2
can you explain what is wrong with that process
hmm wait are u sure 99 choose 3 is right htough
@SithsAndGiggles 99choose3 is right if 0 is not allowed
There are a 99 choose 3 'positive integer solutions' to a+b+c+d = 100. This is because you say 'positive integer solutions, so we exclude zero. If we include zero then it is 103 choose 3= 176847 , I checked with python and both are correct Now as far as your question above, it's better if we say find the number of nonnegative integer solutions to a+b+2c+2d=100, a,b,c,d>=0 Or you can say, find the number of integer solutions to a + b+ 2c + 2d = 100 a>=0, b>=0, c>=0, d>=0 If you say find the number of positive integer solutions, you really mean to solve a + b+ 2c + 2d = 100 a >0 , b > 0 , c > 0 , d > 0 Using python I got 45526 code: count = 0 for a in range(0,101): for b in range(0,101): for c in range(0,51): for d in range (0,51): if a+b+2*c+2*d ==100: count += 1 print count >>>45526 This is a slow method, finding a closed formula is better. I had to wait about 33 seconds for the answer, and if you increase 100 to 10000 or higher, you will wait longer.
I found a better approach using this argument by mathmath333 in her previous post http://openstudy.com/study#/updates/55d8d229e4b05a670c275069 In addition we will use the theorem found here https://en.wikipedia.org/wiki/Stars_and_bars_(combinatorics). Consider two cases, when 'a' ,'b' are both even, and when 'a' ,'b' are both odd. You need not consider 'a' even and 'b' odd or vice a versa, since odd + even +even +even= odd != 100 case 1: a is even, b is even There exist non-negative integers a', b' such that 2a' = a, 2b' = b, where a' can range from 0 to 50 , and b' can range from 0 to 50 2a' + 2b' + 2c + 2d = 100 a' + b' + c + d = 50 There are ( 50 + 4 -1) choose (4-1) nonnegative solutions 53 choose 3 = 23426 case 2: a is odd, b is odd We want to end up with nonnegative integers a' , b ' starting with a' =0, b' = 0 so a = 2a'+ 1 , b = 2b' + 1 , is a good choice 2(a'+1) + 2(b'+1) + 2c + 2d = 100 2a' + 2b' + 2 + 2c + 2d = 100 2( a' + b' + c + d ) = 98 a ' + b ' + c + d = 49 There are ( 49 + 4 -1) choose (4-1) nonnegative solutions 52 choose 3 = 22100 the total is 23426 + 22100 = 45526 this agrees with the python result
nice i really like that method
see if u can think about generalizations for this method like with k1*a+K2*b+k3*c+d...+z=k
ill see what i can come up with, we might be able to write a completely dependant equation on the chosen constants k1,k2,k3...
Join our real-time social learning platform and learn together with your friends!