Math, asked by jayatiyadav37, 11 months ago

How many 3-digit positive numbers may be formed so that the sum of digit 6?
Please explain step by step......

Answers

Answered by llɱissMaɠiciaŋll
2

Step-by-step explanation:

First I’ll tell you the answer, because it might surprise you. The answer is simply (72) which is 21 .

Where does this binomial coefficient come from? And why 7, and why choose 2?

The derivation of (72) comes from a famous method called “bars and stars”. First, let me translate your question a little bit. You are looking for triples of integers (a0,a1,a2) such that a0>0 and a1,a2>=0 and a0+a1+a2=6 . It would be easier if each ai had the same constraint, so we use a trick of adding 1 to a1 and a2 . This would increase the sum by 2. The upshot is, we get the same answer if we count the number of triples (b0,b1,b2) such that b0,b1,b2>0 and b0+b1+b2=8 . This is commonly called a “composition of 8 into 3 parts”

Here is where the bars and stars come in. Imagine 8 stars in a row, and place two bars among them. The number of stars between each bar tells you the bi numbers, and each triple is determined uniquely in this way.

For example, if your triple is (5,2,1) (corresponding originally to the number 510) then the bars and stars would look like: *****|**|*. If you imagine moving the bars around, you can create all possible ways of adding up to 8 with three positive numbers.

Since there are 7 possible choices for bar positions, and we have 2 bars, the answer is (72) . The reason there are 7 choices is that you can’t put a bar at the very start or very end. The reason we have 2 bars is to divide the stars into three groups.

I would also like to add that with a quick Python script you can get the same answer:

def digits_add_to_6(n):

s = str(n)

return (int(s[0]) + int(s[1]) + int(s[2])) == 6

print(len([x for x in range(100,1000) if digits_add_to_6(x)])) # output: 21

But the combinatorial argument is more flexible if you wanted to change some parameters.

Similar questions